Index: openacs-4/packages/assessment/www/asm-admin/assessment-form.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/assessment-form.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/assessment/www/asm-admin/assessment-form.tcl 27 Jun 2006 19:11:41 -0000 1.11 +++ openacs-4/packages/assessment/www/asm-admin/assessment-form.tcl 26 Sep 2006 00:22:46 -0000 1.12 @@ -56,7 +56,7 @@ {name:text(inform) {label "#assessment.Name#"} {html {size 80 maxlength 1000}} {help_text "[_ assessment.assessment_Name_help]"}} } } else { - if {$type > 1 } { + if {$type > "survey" } { ad_form -extend -name assessment_form -form { {name:text,optional,nospell {label "[_ assessment.Name]"} {html {size 80 maxlength 1000}} {help_text "[_ assessment.assessment_Name_help]"}} } @@ -80,7 +80,7 @@ ad_form -extend -name assessment_form -form {{instructions:text(textarea),optional {label "[_ assessment.Instructions]"} {html {rows 5 cols 80}} {help_text "[_ assessment.as_Instructions_help]"}}} -if { $type == 2 } { +if { $type eq "test" } { ad_form -extend -name assessment_form -form { {run_mode:text,optional,nospell {label "[_ assessment.Mode]"} {html {size 25 maxlength 25}} {help_text "[_ assessment.as_Mode_help]"}} } @@ -98,7 +98,7 @@ } } -if { $type == 2 } { +if { $type eq "test" } { ad_form -extend -name assessment_form -form { {secure_access_p:text(select) {label "[_ assessment.Secure_Access_1]"} {options $boolean_options} {help_text "[_ assessment.as_Secure_Access_help]"}} {reuse_responses_p:text(select) {label "[_ assessment.Reuse_Responses_1]"} {options $boolean_options} {help_text "[_ assessment.as_Reuse_Responses_help]"}} @@ -111,23 +111,23 @@ } -if { ($type == 2 || $type == 5) } { +if { ($type eq "test" || $type eq "5") } { ad_form -extend -name assessment_form -form { {show_item_name_p:text(select) {label "[_ assessment.Show_Item_Name_1]"} {options $boolean_options} {help_text "[_ assessment.as_Show_Item_Name_help]"}} } } else { ad_form -extend -name assessment_form -form { {show_item_name_p:text(hidden) {value "f"}} } } -if { ($type == 2 || $type == 5) } { +if { ($type eq "test" || $type eq "5") } { ad_form -extend -name assessment_form -form { {random_p:text(select) {label "[_ assessment.Allow_Random]"} {options $boolean_options} {help_text "[_ assessment.as_Allow_Random_help]"}} } } else { ad_form -extend -name assessment_form -form { {random_p:text(hidden) {value "t"}} } } -if { ($type == 2 || $type == 3 || $type == 4) } { +if { ($type eq "test" || $type eq "3" || $type eq "4") } { ad_form -extend -name assessment_form -form { {consent_page:text(textarea),optional,nospell {label "[_ assessment.Consent_Page]"} {html {rows 5 cols 80}} {help_text "[_ assessment.as_Consent_Page_help]"}} } @@ -144,7 +144,7 @@ } -if { $type == 2 } { +if { $type eq "test" } { ad_form -extend -name assessment_form -form { {start_time:date,to_sql(sql_date),to_html(display_date),optional {label "[_ assessment.Start_Time]"} {format $form_format} {help} {help_text "[_ assessment.as_Start_Time_help]"}} {end_time:date,to_sql(sql_date),to_html(display_date),optional {label "[_ assessment.End_Time]"} {format $form_format} {help} {help_text "[_ assessment.as_End_Time_help]"}} @@ -156,7 +156,7 @@ } } -if { $type == 2 } { +if { $type eq "test" } { ad_form -extend -name assessment_form -form { {number_tries:integer,optional,nospell {label "[_ assessment.Number_of_Tries]"} {html {size 10 maxlength 10}} {help_text "[_ assessment.as_Number_Tries_help]"}} {wait_between_tries:integer,optional,nospell {label "[_ assessment.Minutes_for_Retry]"} {html {size 10 maxlength 10}} {help_text "[_ assessment.as_Minutes_Retry_help]"}} @@ -168,7 +168,7 @@ } } -if { $type == 2 } { +if { $type eq "test" } { ad_form -extend -name assessment_form -form { {time_for_response:integer,optional,nospell {label "[_ assessment.time_for_response]"} {html {size 10 maxlength 10}} {help_text "[_ assessment.as_time_help]"}} } @@ -178,7 +178,7 @@ } } -if { $type == 2 } { +if { $type eq "test" } { ad_form -extend -name assessment_form -form { {ip_mask:text,optional,nospell {label "[_ assessment.ip_mask]"} {html {size 20 maxlength 100}} {help_text "[_ assessment.as_ip_mask_help]"}} {password:text,optional,nospell {label "[_ assessment.password]"} {html {size 20 maxlength 100}} {help_text "[_ assessment.as_password_help]"}} @@ -190,7 +190,7 @@ } } -if { $type == 2 } { +if { $type eq "test" } { ad_form -extend -name assessment_form -form { {show_feedback:text(select),optional {label "[_ assessment.Show_Feedback]"} {options $feedback_options} {help_text "[_ assessment.as_Feedback_help]"}} } @@ -200,7 +200,7 @@ } } -if { $type == 2 } { +if { $type eq "test" } { ad_form -extend -name assessment_form -form { {section_navigation:text(select),optional {label "[_ assessment.Section_Navigation]"} {options $navigation_options} {help_text "[_ assessment.as_Navigation_help]"}} } @@ -306,7 +306,7 @@ if {![empty_string_p $end_time]} { db_dml update_end_time {} } - if { $type == 1} { + if { $type eq "survey"} { db_transaction { set new_assessment_rev_id [as::assessment::new_revision -assessment_id $assessment_id]