hectorr
committed
on 30 Mar 18
Fix typos
openacs-4/.../tcl/lors-imscp-procs.tcl (+3 -3)
130 130             # so we can define permission on different ims_items. The
131 131             # attribute is dotLRN:permission.
132 132             # if it doesn't exists it keeps default
133 133             # permissions. Otherwise it takes the permission as sets
134 134             # it accordingly
135 135
136 136             # dotLRN:permission
137 137             set dotlrn_permission [lors::imsmd::getAtt $itemx dotLRN:permission]
138 138
139 139             ns_log Notice "lorsm ims_item dotLRN:permission $dotlrn_permission"
140 140
141 141             if {![empty_string_p $dotlrn_permission]} {
142 142                 set cc [concat $cc "$dotlrn_permission"]
143 143             } else {
144 144                 set cc [concat $cc "{}"]
145 145             }
146 146
147 147             set itemxx [$itemx child all item]
148 148             if { ![empty_string_p $itemxx] } {
149 149                 incr parent
150                   set cc [concat $cc [list [getItems $itemx $parent]]]
  150                 lappend cc [getItems $itemx $parent]
151 151                 incr parent -1
152 152             }
153 153             set items [concat $items [list $cc]]
154 154         }
155 155     }
156 156     return $items
157 157 }
158 158
159 159  # end IMS CP XML extraction
160 160
161 161
162 162 ad_proc -public lors::imscp::countItems {
163 163     {tree}
164 164 } {
165 165     Counts number of items.
166 166     Returns an integer.
167 167
168 168     @option tree the XML node that contains the Items to get.
169 169     @author Ernie Ghiglione (ErnieG@mm.st)
170 170
 
638 638                         -maxtimeallowed $p_maxtimeallowed \
639 639                         -timelimitaction $p_timelimitaction \
640 640                         -datafromlms $p_datafromlms \
641 641                         -masteryscore $p_masteryscore \
642 642                         -dotlrn_permission $p_dotlrn_permission \
643 643                         -itm_folder_id $itm_folder_id]
644 644
645 645         if {$p_hasmetadata == 1} {
646 646             set aa [lors::imsmd::addMetadata \
647 647                         -acs_object $item_id \
648 648                         -node $md_node \
649 649                         -dir $tmp_dir]
650 650         }
651 651
652 652         lappend retlist [list $item_id $p_identifierref]
653 653
654 654         if { [llength $item] > 13} {
655 655             set subitem [lors::imscp::addItems \
656 656                             -itm_folder_id $itm_folder_id \
657 657                             -org_id $p_org_id [lindex $item 13] $item_id $tmp_dir]
658               set retlist [concat $retlist $subitem]
  658             lappend retlist {*}$subitem
659 659         }
660 660     }
661 661     return $retlist
662 662 }
663 663
664 664
665 665 ad_proc -public lors::imscp::resource_add {
666 666     {-res_id ""}
667 667     -man_id:required
668 668     {-identifier ""}
669 669     {-type ""}
670 670     {-href ""}
671 671     {-scorm_type ""}
672 672     {-hasmetadata "f"}
673 673     {-package_id ""}
674 674     {-user_id ""}
675 675     {-creation_ip ""}
676 676     {-num ""}
677 677     {-res_folder_id ""}
678 678