Index: openacs-4/packages/lorsm/www/shared/course-info.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/shared/Attic/course-info.tcl,v diff -u -r1.4 -r1.4.4.1 --- openacs-4/packages/lorsm/www/shared/course-info.tcl 17 May 2005 17:03:43 -0000 1.4 +++ openacs-4/packages/lorsm/www/shared/course-info.tcl 5 Dec 2006 10:49:45 -0000 1.4.4.1 @@ -40,45 +40,11 @@ # Checks whether this course is already in use on this community -set active [db_0or1row check " - select - man_id, - community_id, - lorsm_instance_id - from - ims_cp_manifest_class - where - man_id = :man_id - and - community_id = :community_id"] +set active [db_0or1row check ""] -if {[db_0or1row manifest " - select - cp.man_id, - cp.course_name, - cp.identifier, - cp.version, - text 'Yes' as hello, - case - when hasmetadata = 't' then 'Yes' - else 'No' - end as man_metadata, - case - when isscorm = 't' then 'Yes' - else 'No' - end as isscorm, - cp.isshared, - acs.creation_user, - acs.creation_date, - acs.context_id - from - ims_cp_manifests cp, acs_objects acs - where - cp.man_id = acs.object_id - and cp.man_id = :man_id - and cp.parent_man_id = 0"]} { +if {[db_0or1row manifest ""]} { # Sets the variable for display. set display 1 @@ -100,15 +66,7 @@ set creation_date [lc_time_fmt $creation_date "%x %X"] # Check for submanifests - if {[db_0or1row submans " - select - count(*) as submanifests - from - ims_cp_manifests - where - man_id = :man_id - and - parent_man_id = :man_id"]} { + if {[db_0or1row submans ""]} { } else { set submanifests 0 } @@ -128,21 +86,7 @@ Items " -db_foreach organizations { - select - org.org_id, - org.org_title as org_title, - org.hasmetadata, - tree_level(o.tree_sortkey) as indent - from - ims_cp_organizations org, acs_objects o - where - org.org_id = o.object_id - and - man_id = :man_id - order by - org_id -} { +db_foreach organizations {} { append orgs_list "$org_title$hasmetadata" @@ -161,64 +105,8 @@ } 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)* 3) as indent, - i.ims_item_id as item_id, - i.item_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 - res.href - FROM - ims_cp_items_to_resources i2r, - ims_cp_resources res - WHERE - i2r.res_id = res.res_id - AND - i2r.ims_item_id = i.ims_item_id -) - 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.ims_item_id = i.ims_item_id -) - else '' - end as type, - m.fs_package_id, - m.folder_id, - m.course_name - FROM - acs_objects o, ims_cp_items i, ims_cp_manifests m - WHERE - o.object_type = '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 - tree_sortkey, object_id + - } $table_def] append orgs_list "$table_item"