Index: openacs-4/packages/survey/www/one-respondent.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/one-respondent.adp,v
diff -u -r1.6 -r1.6.4.1
--- openacs-4/packages/survey/www/one-respondent.adp 7 Jul 2003 13:46:39 -0000 1.6
+++ openacs-4/packages/survey/www/one-respondent.adp 28 Jul 2004 04:59:54 -0000 1.6.4.1
@@ -2,7 +2,7 @@
#survey.lt_Answers_to_survey_nam#
@context_bar;noquote@
- @description@
+ @description;noquote@
Index: openacs-4/packages/survey/www/one-respondent.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/one-respondent.tcl,v
diff -u -r1.3 -r1.3.2.1
--- openacs-4/packages/survey/www/one-respondent.tcl 12 Mar 2004 13:45:39 -0000 1.3
+++ openacs-4/packages/survey/www/one-respondent.tcl 28 Jul 2004 04:59:54 -0000 1.3.2.1
@@ -36,8 +36,14 @@
set survey_name $survey_info(name)
set description $survey_info(description)
+set description_html_p $survey_info(description_html_p)
set editable_p $survey_info(editable_p)
set context_bar [ad_context_bar "[_ survey.Responses]"]
+
+if {$description_html_p != "t" } {
+ set description [ad_text_to_html $description]
+}
+
db_multirow -extend {answer_summary pretty_submission_date} responses responses_select {} {
set answer_summary [survey_answer_summary_display $response_id 1]
set pretty_submission_date [lc_time_fmt $pretty_submission_date_ansi %x]
Index: openacs-4/packages/survey/www/respond.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/respond.tcl,v
diff -u -r1.5 -r1.5.4.1
--- openacs-4/packages/survey/www/respond.tcl 12 Mar 2003 01:05:39 -0000 1.5
+++ openacs-4/packages/survey/www/respond.tcl 28 Jul 2004 04:59:54 -0000 1.5.4.1
@@ -30,10 +30,16 @@
}
set name $survey_info(name)
set description $survey_info(description)
+ set description_html_p $survey_info(description_html_p)
set single_response_p $survey_info(single_response_p)
set editable_p $survey_info(editable_p)
set display_type $survey_info(display_type)
- if {($single_response_p=="t" && $editable_p=="f" && $number_of_responses>0) || ($single_response_p=="t" && $editable_p=="t" && $number_of_responses>0 && $response_id==0)} {
+
+ if {$description_html_p != "t"} {
+ set description [ad_text_to_html $description]
+ }
+
+ if {($single_response_p=="t" && $editable_p=="f" && $number_of_responses>0) || ($single_response_p=="t" && $editable_p=="t" && $number_of_responses>0 && $response_id==0)} {
ad_complain "[_ survey.lt_You_have_already_comp]"
} elseif {$response_id>0 && $editable_p=="f"} {
ad_complain "[_ survey.lt_This_survey_is_not_ed]"
Index: openacs-4/packages/survey/www/admin/name-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/name-edit.tcl,v
diff -u -r1.3.4.1 -r1.3.4.2
--- openacs-4/packages/survey/www/admin/name-edit.tcl 28 Jul 2004 03:10:23 -0000 1.3.4.1
+++ openacs-4/packages/survey/www/admin/name-edit.tcl 28 Jul 2004 04:59:55 -0000 1.3.4.2
@@ -16,22 +16,29 @@
}
get_survey_info -survey_id $survey_id
-set survey_name $survey_info(name)
+set survey_name "$survey_info(name)"
ad_require_permission $survey_id survey_modify_survey
ad_form -name edit-name -form {
survey_id:key
- {name:text(text) {label "[_ survey.Survey_Name_1]"} {html {size 80}}
- {value $survey_info(name)}}
- {description:text(textarea) {value "HI"} {label "[_ survey.Description_1]"}
+ {name:text(text) {label "[_ survey.Survey_Name_1]"} {html {size 80}}}
+ {description:text(textarea) {label "[_ survey.Description_1]"}
{html {rows 10 cols 65}}}
+ {description_html_p:text(radio) {label "[_ survey.lt_The_Above_Description]"}
+ {options {{"[_ survey.Preformatted_Text]" "f"}
+ {"HTML" "t"} }}
+ {value "pre"}}
+
} -validate {
{name {[string length $name] <= 4000}
"[_ survey.lt_Survey_Name_must_be_l]"
}
} -edit_request {
- set name $survey_info(name)
+ get_survey_info -survey_id $survey_id
+ set name "$survey_info(name)"
+ set description "$survey_info(description)"
+ set description_html_p "$survey_info(description_html_p)"
} -edit_data {
db_dml survey_update ""
ad_returnredirect "one?[export_vars survey_id]"
Index: openacs-4/packages/survey/www/admin/name-edit.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/name-edit.xql,v
diff -u -r1.1 -r1.1.8.1
--- openacs-4/packages/survey/www/admin/name-edit.xql 16 Sep 2002 00:00:24 -0000 1.1
+++ openacs-4/packages/survey/www/admin/name-edit.xql 28 Jul 2004 04:59:55 -0000 1.1.8.1
@@ -4,7 +4,8 @@
update surveys
set name= :name,
- description= :description
+ description= :description,
+ description_html_p = :description_html_p
where survey_id = :survey_id
Index: openacs-4/packages/survey/www/admin/one-respondent.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/one-respondent.tcl,v
diff -u -r1.2 -r1.2.4.1
--- openacs-4/packages/survey/www/admin/one-respondent.tcl 12 Mar 2003 01:05:52 -0000 1.2
+++ openacs-4/packages/survey/www/admin/one-respondent.tcl 28 Jul 2004 04:59:55 -0000 1.2.4.1
@@ -20,8 +20,14 @@
get_survey_info -survey_id $survey_id
set survey_name $survey_info(name)
set description $survey_info(description)
+set description_html_p $survey_info(description_html_p)
set type $survey_info(type)
+
+if {$description_html_p != "t"} {
+ set description [ad_text_to_html $description]
+}
+
# survey_name and description are now set
set user_exists_p [db_0or1row user_name_from_id "select first_names, last_name from persons where person_id = :user_id" ]
Index: openacs-4/packages/survey/www/admin/one.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/one.tcl,v
diff -u -r1.5 -r1.5.4.1
--- openacs-4/packages/survey/www/admin/one.tcl 12 Mar 2003 01:05:52 -0000 1.5
+++ openacs-4/packages/survey/www/admin/one.tcl 28 Jul 2004 04:59:55 -0000 1.5.4.1
@@ -25,6 +25,11 @@
ad_return_complaint 1 "[_ survey.lt_Requested_survey_does]"
ad_script_abort
}
+
+if {$survey_info(description_html_p) == "f"} {
+ set survey_info(description) [ad_text_to_html $survey_info(description)]
+}
+
# get users and # who responded etc...
if {[apm_package_installed_p dotlrn]} {
set community_id [dotlrn_community::get_community_id_from_url]
@@ -35,7 +40,6 @@
}
set return_html ""
-
set creation_date [util_AnsiDatetoPrettyDate $survey_info(creation_date)]
set user_link [acs_community_member_url -user_id $survey_info(creation_user)]
if {$survey_info(single_response_p) == "t"} {
Index: openacs-4/packages/survey/www/admin/survey-create-confirm.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/survey-create-confirm.adp,v
diff -u -r1.2 -r1.2.4.1
--- openacs-4/packages/survey/www/admin/survey-create-confirm.adp 12 Mar 2003 01:05:52 -0000 1.2
+++ openacs-4/packages/survey/www/admin/survey-create-confirm.adp 28 Jul 2004 04:59:55 -0000 1.2.4.1
@@ -4,7 +4,7 @@
#survey.lt_Here_is_how_your_surv#
-@description@
+@description;noquote@
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/survey/www/admin/survey-create-confirm.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/survey/www/admin/survey-create.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/survey-create.tcl,v
diff -u -r1.5 -r1.5.4.1
--- openacs-4/packages/survey/www/admin/survey-create.tcl 12 Mar 2003 01:05:52 -0000 1.5
+++ openacs-4/packages/survey/www/admin/survey-create.tcl 28 Jul 2004 04:59:55 -0000 1.5.4.1
@@ -35,8 +35,8 @@
{description:text(textarea) {label "[_ survey.Description_1]"} {html {rows 10 cols 40}}}
{desc_html:text(radio) {label "[_ survey.lt_The_Above_Description]"}
{options {{"[_ survey.Preformatted_Text]" "pre"}
- {"HTML" "html"} {"[_ survey.Plain_Text]" "plain"}}}
- {value "plain"}
+ {"HTML" "html"} }}
+ {value "pre"}
}
} -validate {
@@ -50,10 +50,10 @@
} -new_data {
- if {[string compare $desc_html "plain"] == 0} {
- set description_html_p "f"
- } else {
+ if {[string compare $desc_html "html"] == 0} {
set description_html_p "t"
+ } else {
+ set description_html_p "f"
}
if {[parameter::get -package_id $package_id -parameter survey_enabled_default_p -default 0]} {
Index: openacs-4/packages/survey/www/admin/survey-preview.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/survey-preview.tcl,v
diff -u -r1.2 -r1.2.4.1
--- openacs-4/packages/survey/www/admin/survey-preview.tcl 12 Mar 2003 01:05:52 -0000 1.2
+++ openacs-4/packages/survey/www/admin/survey-preview.tcl 28 Jul 2004 04:59:55 -0000 1.2.4.1
@@ -37,10 +37,16 @@
get_survey_info -survey_id $survey_id
set name $survey_info(name)
set description $survey_info(description)
+ set description_html_p $survey_info(description_html_p)
set single_response_p $survey_info(single_response_p)
set editable_p $survey_info(editable_p)
set display_type $survey_info(display_type)
+ if {$description_html_p != "t"} {
+ set description [ad_text_to_html $description]
+ }
+
+
set context_bar [ad_context_bar "[_ survey.Preview] $name"]
# build a list containing the HTML (generated with survey_question_display) for each question