Index: openacs-4/contrib/packages/survey/catalog/survey.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/catalog/Attic/survey.en_US.ISO-8859-1.xml,v diff -u -r1.11 -r1.12 --- openacs-4/contrib/packages/survey/catalog/survey.en_US.ISO-8859-1.xml 18 Mar 2005 02:28:02 -0000 1.11 +++ openacs-4/contrib/packages/survey/catalog/survey.en_US.ISO-8859-1.xml 25 Mar 2005 23:50:10 -0000 1.12 @@ -65,7 +65,7 @@ Delete this survey Description: Description - Description\ + The description is presented to people when they respond to this survey. disable (disabled) Display Options: @@ -368,6 +368,7 @@ Preview Preview %name% Public? + A public survey can be answered anonymously. Non-public surveys may only be answered by registered users. Question Question Text Questions Index: openacs-4/contrib/packages/survey/www/admin/survey-create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/survey-create.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/survey/www/admin/survey-create.tcl 16 Mar 2005 12:26:32 -0000 1.4 +++ openacs-4/contrib/packages/survey/www/admin/survey-create.tcl 25 Mar 2005 23:50:10 -0000 1.5 @@ -14,7 +14,7 @@ } { survey_id:optional {name ""} - {description:html ""} + {desc:html ""} {variable_names ""} {type "general"} {category_id 0} @@ -30,55 +30,62 @@ set display_type "list" -#ad_form -name create_survey -confirm_template survey-create-confirm -form +#ad_form -name create_survey -confirm_template survey-create-confirm -form ad_form -name create_survey -form { survey_id:key - {display_type:text(hidden) {value $display_type}} - {name:text(text) {label "[_ survey.Survey_Name_1]"} {html {size 55}}} - {description:text(textarea) {label "[_ survey.Description_1]"} {html {rows 10 cols 40}} - {help_text "This is used as introductory text before the questions"} {value $description} - } - {desc_html:text(radio) {label "[_ survey.lt_The_Above_Description]"} - {options {{"[_ survey.Preformatted_Text]" "pre"} - {"[_ survey.HTML]" "html"} {"[_ survey.Plain_Text]" "plain"}}} - {value "plain"} - } - {public_p:text(radio) {label "[_ survey.Public]"} {options {{Yes t} {No f}}} {value t}} + {display_type:text(hidden) + {value $display_type}} + {name:text + {label "[_ survey.Survey_Name_1]"} + {html {size 55}}} + {desc:richtext + {label "[_ survey.Description_1]"} + {html {rows 5 cols 40}} + {help_text "[_ survey.Description_help]"} + {value $desc}} + {public_p:text(radio) + {label "[_ survey.Public]"} + {options {{Yes t} {No f}}} + {help_text "[_ survey.Public_help]"} + {value t}} } if {$category_id} { set category_name [category::get_name $category_id] ad_form -extend -name create_survey -form { - {category:text(inform) {label "Associate with element type"} {value $category_name}} + {category:text(inform) + {label "Associate with element type"} + {value $category_name} } } } ad_form -extend -name create_survey -form { {category_id:text(hidden) {value $category_id}} } -ad_form -extend -name create_survey \ - -validate { +ad_form -extend -name create_survey -validate { {name {[string length $name] <= 4000} - "[_ survey.lt_Survey_Name_must_be_4]" -} {name {[string length $name] > 0} - "[_ survey.lt_Please_enter_a_name_f]" -} {description {[string length $description] <= 4000} - "[_ survey.lt_Survey_Description_mu]" -} {description {[string length $description] > 0} - "[_ survey.lt_Please_enter_a_descri]" -} - {survey_id {[db_string count_surveys ""] < 1} "oops" + "[_ survey.lt_Survey_Name_must_be_4]" } - + {name {[string length $name] > 0} + "[_ survey.lt_Please_enter_a_name_f]" + } + {desc {[string length $desc] <= 4000} + "[_ survey.lt_Survey_Description_mu]" + } + {desc {[string length $desc] > 0} + "[_ survey.lt_Please_enter_a_descri]" + } + {survey_id {[db_string count_surveys ""] < 1} + "oops" + } } -new_data { - if {[string compare $desc_html "plain"] == 0} { + set description [template::util::richtext::get_property contents $desc] + set content_format [template::util::richtext::get_property format $desc] + if {[string compare $content_format "plain"] == 0} { set description_html_p "f" } else { set description_html_p "t" - if {[string compare $desc_html "pre"] == 0} { - set description "
$description
" - } } if {[parameter::get -package_id $package_id -parameter survey_enabled_default_p -default 0]} { @@ -106,20 +113,13 @@ if {$category_id} { category::map_object -remove_old -object_id $survey_id [list $category_id] } - + set section_id "" set section_id [db_exec_plsql create_section ""] } ad_returnredirect "question-add?section_id=$section_id" ad_script_abort } - - - # function to insert survey type-specific form html - set context [list [_ survey.Create_Survey]] - -ad_return_template -