Index: openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student-2.tcl,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student-2.tcl 31 Dec 2006 00:36:09 -0000 1.1 +++ openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student-2.tcl 10 Jul 2007 15:52:22 -0000 1.1.2.1 @@ -82,13 +82,17 @@ # { title "" "no_sort" "Item: $item_id $indent [if {![empty_string_p $identifierref]} {set href \"$item_title\"} else {set href \"AAA $item_title\"}]" } # } + regsub -all {[\{\}]} $org_title "" org_title + append orgs_list "
" - append orgs_list "" + append orgs_list "" + set indent_items [lorsm::get_items_indent -org_id $org_id] + db_foreach organization_item { SELECT o.object_id, - repeat(' ', (tree_level(tree_sortkey) - :indent)* 2) as indent, + --repeat(' ', (tree_level(tree_sortkey) - :indent)* 2) as indent, i.ims_item_id, i.item_title as item_title, i.hasmetadata, @@ -101,32 +105,46 @@ FROM acs_objects o, ims_cp_items i, ims_cp_manifests m WHERE - o.object_type = 'ims_item' + o.object_type like 'ims_item_object' AND i.org_id = :org_id AND o.object_id = i.ims_item_id AND m.man_id = :man_id ORDER BY - object_id, tree_sortkey + object_id + --, tree_sortkey } { + foreach indent_item $indent_items { + set indent_item_id [lindex $indent_item 0] + set indent_indent [lindex $indent_item 1] + if { [string equal $indent_item_id $ims_item_id] } { + set indent $indent_indent + } + } + + set table_item "" + + for {set x 0} {$x<$indent} {incr x} { + append table_item "" + } + append table_item "" } + append orgs_list "
Organization: $org_title ($org_id)
$org_title (id: $org_id)
" + + if { [empty_string_p $identifierref] } { - set table_item "" } else { #set table_item "" + append orgs_list " : No RTE scorm data " append orgs_list "" } else { append orgs_list "" + append orgs_list "
Item: $item_id $indent AAA $item_title" - #set table_item "Item: $item_id $indent AAA $item_title" + append table_item "Item: $ims_item_id $indent $item_title" + #set table_item "Item: $item_id $indent AAA $item_titleItem: $item_id $indent [string trim $item_title]" - set table_item "$indent $indent [string trim $item_title]" + append table_item "[string trim $item_title], (id: $ims_item_id)" } # set table_item [concat $table_item [ad_table -Tmissing_text $missing_text -Textra_vars {fs_local_package_id track_id} -Ttable_extra_html $table_extra_html $table_def]] #set table_item [concat $table_item [ad_table -Tmissing_text $missing_text -Textra_vars {fs_local_package_id track_id} -Ttable_extra_html $table_extra_html $table_def]] append orgs_list [string trim $table_item] - - - set item_table "" db_foreach student_activity { @@ -148,7 +166,7 @@ and user_id=:user_id and - imsitems.item_id=cmi.item_id + imsitems.ims_item_id=cmi.item_id order by cmi.track_id asc } { @@ -167,17 +185,22 @@ } if { [empty_string_p $item_table] } { - append orgs_list ": No scorm data
" append orgs_list "" append orgs_list "" append orgs_list $item_table - append orgs_list "
scorestatustotal timefirst visitdetail sessions
" + append orgs_list "
" + append orgs_list "" } + +append orgs_list "" append orgs_list "" }