Index: openacs-4/packages/lorsm/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/index.tcl,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/lorsm/www/admin/index.tcl 6 Mar 2008 14:00:28 -0000 1.3 +++ openacs-4/packages/lorsm/www/admin/index.tcl 17 Nov 2008 13:36:44 -0000 1.4 @@ -20,10 +20,18 @@ set actions [list] -lappend actions "[_ lorsm.Add_Course]" [export_vars -base "course-add"] "[_ lorsm.lt_Add_a_IMSSCORM_Compli]" -lappend actions "[_ lorsm.lt_Search_Learning_Objec]" [export_vars -base "/search"] "[_ lorsm.lt_Search_for_Learninng_]" -lappend actions "[_ lorsm.Available_Courses]" [export_vars -base "shared/"] "[_ lorsm.lt_View_Available_Course]" - +lappend actions "[_ lorsm.Add_Course]" \ + [export_vars -base "course-add"] \ + "[_ lorsm.lt_Add_a_IMSSCORM_Compli]" + +lappend actions "[_ lorsm.lt_Search_Learning_Objec]" \ + [export_vars -base "/search"] \ + "[_ lorsm.lt_Search_for_Learninng_]" + +lappend actions "[_ lorsm.Available_Courses]" \ + [export_vars -base "shared/"] \ + "[_ lorsm.lt_View_Available_Course]" + template::list::create \ -name d_courses \ -multirow d_courses \ @@ -34,161 +42,162 @@ -elements { course_name { label "[_ lorsm.Available_Courses]" - display_template {@d_courses.course_url;noquote@} + display_template {@d_courses.course_url;noquote@} display_col course_name link_html {title "Access Course"} - } - hasmetadata { + + } hasmetadata { label "[_ lorsm.Metadata_1]" display_template { - -
- @d_courses.hasmetadata@ -
-
- -
@d_courses.hasmetadata@
-
- } - } - isscorm { + +
+ @d_courses.hasmetadata@ +
+
+ +
@d_courses.hasmetadata@
+
+ } + + } isscorm { label "[_ lorsm.SCORM]" - html { align center } - } - isenabled { + html { align center } + + } isenabled { label "[_ lorsm.Status_1]" - html { align center } - } - istrackable { + html { align center } + + } istrackable { label "[_ lorsm.Tracking]" link_url_eval {tracking/?[export_vars man_id]} - link_html {title "[_ lorsm.lt_Track_Students_Progre]" class button} - html { align center } - } - deliverymethod { + link_html {title "[_ lorsm.lt_Track_Students_Progre]" class button} + html { align center } + + } deliverymethod { label "[_ lorsm.Default_delivery]" - html { align center } - } - hasrtedata { + html { align center } + + } hasrtedata { label "[_ lorsm.SCORM_session]" display_template { - -
- @d_courses.hasrtedata@ -
-
- } - } - creation_user { + +
+ @d_courses.hasrtedata@ +
+
+ } + + } creation_user { label "[_ lorsm.Owner]" display_eval {[person::name -person_id $creation_user]} link_url_eval {[acs_community_member_url -user_id $creation_user]} - } - creation_date { + + } creation_date { label "[_ lorsm.Creation_Date]" display_eval {[lc_time_fmt $creation_date "%x %X"]} - } - export { + + } export { label "[_ lorsm.Export]" - display_template { - -
- \[zip\] -
+ display_template { + +
+ \[zip\] +
- } - } - admin { + } + + } admin { label "[_ lorsm.Admin_Course]" - display_eval {Admin} + display_eval {Admin} link_url_eval {[export_vars -base course-structure man_id]} link_html {title "[_ lorsm.Admin_Course]" class button} - html { align center } + html { align center } + + } permissions { + label "Permissions" + display_eval {Permissions} + link_url_eval {[export_vars -base permissions {{object_id $man_id}}]} + link_html {class button} } - permissions { - label "Permissions" - display_eval {Permissions} - link_url_eval {[export_vars -base permissions {{object_id $man_id}}]} - link_html {class button} - } } db_multirow -extend { ims_md_id course_url } d_courses select_d_courses { - select - cp.man_id, - cp.course_name, - cp.identifier, - cp.version, - case - when cp.hasmetadata = 't' then 'Yes' - else 'No' - end as hasmetadata, - case - when isscorm = 't' then 'Yes' - else 'No' - end as isscorm, - cp.fs_package_id, - case when fs_package_id is null then 'f' - else 't' - end as lorsm_p, - cp.folder_id, - acs.creation_user, - acs.creation_date, - pf.folder_name, - pf.format_name, - acs.context_id, - case - when cpmc.isenabled = 't' then 'Enabled' - else 'Disabled' - end as isenabled, - case - when cpmc.istrackable = 't' then 'Yes' - else 'No' - end as istrackable, - -- micheles - -- addition for rte stuff --- 'Click here' as hasrtedata, - case - when - upper(scorm_type) = 'SCO' - then 'Click here' - else '' - end as hasrtedata, - case - when - upper(scorm_type) = 'SCO' - then 'delivery-scorm' - else 'delivery' - end as deliverymethod + select + cp.man_id, + cp.course_name, + cp.identifier, + cp.version, + case + when cp.hasmetadata = 't' then 'Yes' + else 'No' + end as hasmetadata, + case + when isscorm = 't' then 'Yes' + else 'No' + end as isscorm, + + cp.fs_package_id, + case + when fs_package_id is null then 'f' + else 't' + end as lorsm_p, + + cp.folder_id, + acs.creation_user, + acs.creation_date, + pf.folder_name, + pf.format_name, + acs.context_id, + case + when cpmc.isenabled = 't' then 'Enabled' + else 'Disabled' + end as isenabled, + + case + when cpmc.istrackable = 't' then 'Yes' + else 'No' + end as istrackable, + + -- micheles + -- addition for rte stuff + -- 'Click here' as hasrtedata, + case + when upper(scorm_type) = 'SCO' then 'Click here' + else '' + end as hasrtedata, + + case + when upper(scorm_type) = 'SCO' then 'delivery-scorm' + else 'delivery' + end as deliverymethod + from - acs_objects acs, - ims_cp_manifest_class cpmc, + acs_objects acs, + ims_cp_manifest_class cpmc, lorsm_course_presentation_formats pf, -- micheles - ims_cp_manifests cp left join (select man_id, max(scorm_type) as scorm_type from ims_cp_resources group by man_id ) as cpr using (man_id) + ims_cp_manifests cp left join (select man_id, max(scorm_type) as scorm_type + from ims_cp_resources + group by man_id ) as cpr using (man_id) - where - cp.man_id = acs.object_id - and - cp.man_id = cpmc.man_id - and - cpmc.community_id = :community_id - and - cp.course_presentation_format = pf.format_id - and - cp.man_id in (select cr.live_revision - from cr_items cr where content_type = 'ims_manifest_object') + where cp.man_id = acs.object_id + and cp.man_id = cpmc.man_id + and cpmc.community_id = :community_id + and cp.course_presentation_format = pf.format_id + and cp.man_id in (select cr.live_revision + from cr_items cr + where content_type = 'ims_manifest_object') order by acs.creation_date desc, cp.man_id asc } { set ims_md_id $man_id -# if { [string eq $format_name "default"] } { - set course_url "$course_name" +# if { [string eq $format_name "default"] } { + set course_url "$course_name" # } else { -# set course_url "$course_name" +# set course_url "$course_name" # } } - +