Index: openacs-4/packages/survey/www/admin/survey-toggle.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/survey-toggle.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/survey/www/admin/survey-toggle.tcl 14 Jun 2015 00:49:36 -0000 1.5 +++ openacs-4/packages/survey/www/admin/survey-toggle.tcl 3 Sep 2024 15:37:54 -0000 1.6 @@ -1,5 +1,5 @@ ad_page_contract { - Survey,-toggle.tcl will toggle (ie - enable or disable) a single survey. + Survey-toggle.tcl will toggle (i.e. - enable or disable) a single survey. @param section_id survey we're toggling @param enabled_p flag describing original state of survey @@ -11,19 +11,21 @@ @cvs-id $Id$ } { survey_id:naturalnum,notnull - enabled_p:boolean + {enabled_p:boolean,notnull "f"} {target "./"} } permission::require_permission -object_id $survey_id -privilege survey_admin_survey -if {$enabled_p == "f"} { - set enabled_p "t" -} else { - set enabled_p "f" -} +set enabled_p [expr {$enabled_p ? "f" : "t"}] db_dml survey_active_toggle "" ad_returnredirect "$target" + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: