Index: openacs-4/packages/assessment/www/asm-admin/assessment-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/assessment-new.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/assessment/www/asm-admin/assessment-new.tcl 26 Sep 2006 00:22:46 -0000 1.3 +++ openacs-4/packages/assessment/www/asm-admin/assessment-new.tcl 27 Oct 2014 16:41:00 -0000 1.4 @@ -1,7 +1,7 @@ ad_page_contract { @author Anny Flores (annyflores@viaro.net) Viaro Networks (www.viaro.net) } { - assessment_id:integer,optional + assessment_id:naturalnum,optional {type ""} {permission_p ""} {page_title ""} @@ -38,12 +38,12 @@ {value $type} } } -on_submit { - if { [exists_and_not_null assessment_id]} { + if { ([info exists assessment_id] && $assessment_id ne "")} { set new_assessment_rev_id [as::assessment::new_revision -assessment_id $assessment_id] db_dml update_asm { update as_assessments set type=:type where assessment_id=:new_assessment_rev_id} ad_returnredirect [export_vars -base one-a {assessment_id}] } else { - if { ![empty_string_p $permission_p]} { + if { $permission_p ne ""} { ad_returnredirect [export_vars -base assessment-form {type assessment_id permission_p}] } else { ad_returnredirect [export_vars -base assessment-form {type assessment_id}]