Index: openacs-4/packages/lorsm/www/course-structure.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/Attic/course-structure.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/lorsm/www/course-structure.tcl 22 Apr 2004 03:58:09 -0000 1.1 +++ openacs-4/packages/lorsm/www/course-structure.tcl 4 Sep 2004 14:51:21 -0000 1.2 @@ -15,6 +15,8 @@ } -errors { } +set package_id [ad_conn package_id] + ad_proc -public getFolderKey { {-object_id:required} } { @@ -31,6 +33,7 @@ set context [list "Course Structure"] set title "Course Structure" + if {[db_0or1row manifest " select cp.man_id, @@ -48,14 +51,19 @@ end as isscorm, cp.fs_package_id, cp.folder_id, + cp.isshared, acs.creation_user, acs.creation_date, - acs.context_id + acs.context_id, + cpmc.isenabled, + cpmc.istrackable from - ims_cp_manifests cp, acs_objects acs + ims_cp_manifests cp, acs_objects acs, ims_cp_manifest_class cpmc where cp.man_id = acs.object_id and cp.man_id = :man_id + and cp.man_id = cpmc.man_id + and cpmc.lorsm_instance_id = :package_id and cp.parent_man_id = 0"]} { # Sets the variable for display. @@ -105,7 +113,7 @@ } -append orgs_list "
Organization | Metadata? | @@ -129,25 +137,36 @@ } { - append orgs_list "||||||||
---|---|---|---|---|---|---|---|---|---|
$org_title | $hasmetadata | " + append orgs_list " | |||||||
$org_title | $hasmetadata | " set indent [expr $indent +1] set missing_text "Nothing here" - + set return_url [export_vars -base [ns_conn url] man_id] set table_extra_html { width="100%" } + + set table_extra_vars {return_url} set table_def { - { title "" "no_sort" " | $indent[if {![empty_string_p $identifierref]} {set href \"$item_title\"} else {set href $item_title}] | " } - { metadata "" "no_sort" "[if {$hasmetadata == \"f\"} {set hasmetadata \"\"} else {set hasmetadata \"Metadata\"}] | " } + { title "Item Name" "no_sort" "$indent[if {![empty_string_p $identifierref]} {set href \"$item_title\"} else {set href $item_title}] | " } + { Edit "Edit?" "no_sort" "[if {![empty_string_p $identifierref]} {set href \"Edit | \"}]"} + { metadata "Metadata?" "no_sort" "[if {$hasmetadata == \"f\"} {set hasmetadata \"No\"} else {set hasmetadata \"Metadata\"}] | " } + { type "Type" "no_sort" "$type | " } + { shared "Is Shared?" "no_sort" "[if {$isshared == false} {set ret \"No\"}] | " } } - set table_item [ad_table -Tmissing_text $missing_text -Ttable_extra_html $table_extra_html blah { + set table_item [ad_table -Tmissing_text $missing_text -Textra_vars $table_extra_vars -Theader_row_extra "style=\"background-color: #e0e0e0; font-weight: bold;\" class=\"list-header\"" -Ttable_extra_html $table_extra_html blah { SELECT o.object_id, - repeat(' ', (tree_level(tree_sortkey) - :indent)* 5) as indent, + repeat(' ', (tree_level(tree_sortkey) - :indent)* 3) as indent, i.item_id, i.title as item_title, i.hasmetadata, i.org_id, + case + when i.isshared = 'f' then ( + 'false' + ) + else 'true' + end as isshared, case when i.identifierref <> '' then ( SELECT @@ -162,6 +181,20 @@ ) else '' end as identifierref, + case + when i.identifierref <> '' then ( + SELECT + res.type + FROM + ims_cp_items_to_resources i2r, + ims_cp_resources res + WHERE + i2r.res_id = res.res_id + AND + i2r.item_id = i.item_id +) + else '' + end as type, m.fs_package_id, m.folder_id, m.course_name @@ -192,6 +225,7 @@ append orgs_list "