Index: openacs-4/packages/lorsm/www/admin/enabler.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/enabler.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/lorsm/www/admin/enabler.tcl 31 Dec 2006 00:36:04 -0000 1.1 +++ openacs-4/packages/lorsm/www/admin/enabler.tcl 17 Nov 2008 13:36:44 -0000 1.2 @@ -1,9 +1,9 @@ # packages/lorsm/www/enabler.tcl ad_page_contract { - + enable/disable courses for a class - + @author Ernie Ghiglione (ErnieG@mm.st) @creation-date 2004-05-19 @arch-tag ebea2a9b-b6d6-4083-83c5-58686ba9e201 @@ -25,38 +25,39 @@ ad_form -name enabler \ -export {package_id} \ -form { - {man_id:key} - {project:text(inform) - {label "[_ lorsm.Course_Name]"} - {value {[lorsm::get_course_name -manifest_id $man_id]}} - } - {isenabled:text(inform) - {label "[_ lorsm.Current_Status]"} - } - {enable:text(radio) - {label "[_ lorsm.Status_3]"} - {options {{"[_ lorsm.Enable]" t} {"[_ lorsm.Disable]" f}}} - } + {man_id:key} + + {project:text(inform) + {label "[_ lorsm.Course_Name]"} + {value {[lorsm::get_course_name -manifest_id $man_id]}} + } + + {isenabled:text(inform) + {label "[_ lorsm.Current_Status]"} + } + + {enable:text(radio) + {label "[_ lorsm.Status_3]"} + {options {{"[_ lorsm.Enable]" t} {"[_ lorsm.Disable]" f}}} + } + } -select_query { - select + select case when isenabled = 't' then 'Enabled' - else 'Disabled' + else 'Disabled' end as isenabled - from ims_cp_manifest_class - where man_id = :man_id and - lorsm_instance_id = :package_id + from ims_cp_manifest_class + where man_id = :man_id + and lorsm_instance_id = :package_id + } -edit_data { db_dml do_update " update ims_cp_manifest_class set isenabled = :enable - where man_id = :man_id and - lorsm_instance_id = :package_id" + where man_id = :man_id + and lorsm_instance_id = :package_id" + } -after_submit { ad_returnredirect [site_node::get_url_from_object_id -object_id package_id] ad_script_abort } - - - - -