|
@@ -161,6 +166,7 @@
@sections.name@
+ (@sections.section_pretty_id@)
@sections.branch_text;noquote@
@@ -182,9 +188,11 @@
-@sections.rownum@. |
+ @sections.rownum@. (@sections.question_pretty_id@) |
-
+ |
+
+
#survey.inactive#
Index: openacs-4/contrib/packages/survey/www/admin/one.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/one.tcl,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/contrib/packages/survey/www/admin/one.tcl 14 Feb 2004 19:57:59 -0000 1.2
+++ openacs-4/contrib/packages/survey/www/admin/one.tcl 2 Sep 2004 15:17:48 -0000 1.2.2.1
@@ -113,5 +113,4 @@
}
}
-
ad_return_template
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/survey/www/admin/process-response.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/contrib/packages/survey/www/admin/question-add-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/question-add-2.tcl,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/contrib/packages/survey/www/admin/question-add-2.tcl 14 Feb 2004 19:57:59 -0000 1.2
+++ openacs-4/contrib/packages/survey/www/admin/question-add-2.tcl 2 Sep 2004 15:17:48 -0000 1.2.2.1
@@ -57,6 +57,10 @@
{required_p:text(hidden) {value $required_p}}
{active_p:text(hidden) {value $active_p}}
{type:text(hidden) {value $type}}
+ {pretty_id:text {label "Variable name"}
+ {help_text "This will be the name of the variable when creating reports. No spaces or special characers."}
+ {value $question_id}
+ }
}
Index: openacs-4/contrib/packages/survey/www/admin/question-add-3-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/question-add-3-postgresql.xql,v
diff -u -r1.1 -r1.1.4.1
--- openacs-4/contrib/packages/survey/www/admin/question-add-3-postgresql.xql 19 Sep 2003 16:48:04 -0000 1.1
+++ openacs-4/contrib/packages/survey/www/admin/question-add-3-postgresql.xql 2 Sep 2004 15:17:48 -0000 1.1.4.1
@@ -28,7 +28,8 @@
:answer_description,
NULL,
:user_id,
- :section_id
+ :section_id,
+ :pretty_id
)
Index: openacs-4/contrib/packages/survey/www/admin/question-add-3.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/question-add-3.tcl,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/contrib/packages/survey/www/admin/question-add-3.tcl 14 Feb 2004 19:57:59 -0000 1.2
+++ openacs-4/contrib/packages/survey/www/admin/question-add-3.tcl 2 Sep 2004 15:17:48 -0000 1.2.2.1
@@ -36,6 +36,7 @@
{scores:multiple,array,integer ""}
{n_variables:integer ""}
{variable_id_list ""}
+ {pretty_id ""}
}
# Variables that will be used later...
Index: openacs-4/contrib/packages/survey/www/admin/question-modify.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/question-modify.tcl,v
diff -u -r1.3 -r1.3.2.1
--- openacs-4/contrib/packages/survey/www/admin/question-modify.tcl 14 Feb 2004 19:57:59 -0000 1.3
+++ openacs-4/contrib/packages/survey/www/admin/question-modify.tcl 2 Sep 2004 15:17:48 -0000 1.3.2.1
@@ -43,10 +43,14 @@
{warning:text(inform) {label "[_ survey.Warning]"} {value "[_ survey.lt_There_isare_n_respons]"}}
}
}
+
ad_form -extend -name modify_question -export {sort_order} -form {
{question_number:text(inform) {label "[_ survey.Modify_Question__]"}}
{survey_name:text(inform) {label "[_ survey.From_1]"} {value $survey_name}}
{question_text:text(textarea) {label "[_ survey.Question]"} {html {rows 5 cols 70}}}
+ {pretty_id:text {label "Variable name"}
+ {help_text "This will be the name of the variable when creating reports. No spaces or special characers."}
+ }
}
if {$allow_question_deactivation == 1} {
Index: openacs-4/contrib/packages/survey/www/admin/question-modify.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/question-modify.xql,v
diff -u -r1.2 -r1.2.4.1
--- openacs-4/contrib/packages/survey/www/admin/question-modify.xql 23 Oct 2003 06:22:26 -0000 1.2
+++ openacs-4/contrib/packages/survey/www/admin/question-modify.xql 2 Sep 2004 15:17:48 -0000 1.2.4.1
@@ -45,7 +45,8 @@
presentation_options,
sort_order as question_number,
required_p,
- sort_order
+ sort_order,
+ pretty_id
from survey_questions
where question_id = :question_id
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/survey/www/admin/question-swap.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/survey/www/admin/report-postgres.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/survey/www/admin/report.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/survey/www/admin/report.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/survey/www/admin/respond.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/survey/www/admin/respond.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/contrib/packages/survey/www/admin/responses.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/responses.tcl,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/contrib/packages/survey/www/admin/responses.tcl 14 Feb 2004 19:57:59 -0000 1.2
+++ openacs-4/contrib/packages/survey/www/admin/responses.tcl 2 Sep 2004 15:17:48 -0000 1.2.2.1
@@ -75,9 +75,9 @@
set n_responses [db_string survey_number_responses {} ]
if { $n_responses == 1 } {
- set response_sentence "[_ survey.lt_There_has_been_1_resp]"
+ set response_sentence "[_ survey.lt_There_has_been_1_resp] $n_responses"
} else {
- set response_sentence "[_ survey.lt_There_have_been_n_res]"
+ set response_sentence "[_ survey.lt_There_have_been_n_res] $n_responses"
}
set context_bar [ad_context_bar [list "one?[export_url_vars survey_id]" $survey_info(name)] "Responses"]
Index: openacs-4/contrib/packages/survey/www/admin/section-add-2-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/section-add-2-postgresql.xql,v
diff -u -r1.1 -r1.1.4.1
--- openacs-4/contrib/packages/survey/www/admin/section-add-2-postgresql.xql 19 Sep 2003 16:48:04 -0000 1.1
+++ openacs-4/contrib/packages/survey/www/admin/section-add-2-postgresql.xql 2 Sep 2004 15:17:48 -0000 1.1.4.1
@@ -26,7 +26,8 @@
FALSE,
:page_break_p,
:user_id,
- :survey_id
+ :survey_id,
+ :pretty_id
);
Index: openacs-4/contrib/packages/survey/www/admin/section-add-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/section-add-2.tcl,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/contrib/packages/survey/www/admin/section-add-2.tcl 14 Feb 2004 19:57:59 -0000 1.2
+++ openacs-4/contrib/packages/survey/www/admin/section-add-2.tcl 2 Sep 2004 15:17:48 -0000 1.2.2.1
@@ -21,6 +21,7 @@
name:notnull
branch_p:boolean,notnull
page_break_p:boolean,notnull
+ {pretty_id "$section_id"}
} -validate {
first_section_not_branch -requires {branch_p:notnull} {
if {$branch_p=="t" && $after==0} {
Index: openacs-4/contrib/packages/survey/www/admin/section-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/section-add.tcl,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/contrib/packages/survey/www/admin/section-add.tcl 14 Feb 2004 19:57:59 -0000 1.2
+++ openacs-4/contrib/packages/survey/www/admin/section-add.tcl 2 Sep 2004 15:17:48 -0000 1.2.2.1
@@ -24,6 +24,10 @@
{section_id:text(hidden) {value $next_section_id}}
{survey_id:text(hidden) {value $survey_id}}
{name:text(text) {label "[_ survey.Section_Name]"} {html {size 30}}}
+ {pretty_id:text {label "Variable name"}
+ {help_text "This will be the name of the variable when creating reports. No spaces or special characers."}
+ {value $next_section_id}
+ }
{description:text(textarea) {label "[_ survey.Description_1]"} {html {rows 5 cols 70}}}
{description_html_p:text(radio) {label "[_ survey.lt_The_above_description]"} {options {{HTML t} {"[_ survey.Plain_text]" f}}} {value f}}
{branch_p:text(radio) {label "[_ survey.Branch]"} {options {{Yes t} {No f}}} {value f}}
Index: openacs-4/contrib/packages/survey/www/admin/section-edit-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/section-edit-2.tcl,v
diff -u -r1.3 -r1.3.2.1
--- openacs-4/contrib/packages/survey/www/admin/section-edit-2.tcl 14 Feb 2004 19:57:59 -0000 1.3
+++ openacs-4/contrib/packages/survey/www/admin/section-edit-2.tcl 2 Sep 2004 15:17:48 -0000 1.3.2.1
@@ -20,6 +20,7 @@
{block_section_p:boolean "f"}
page_break_p:boolean,notnull
{answer_descriptions:trim ""}
+ {pretty_id "$section_id"}
} -validate {
first_section_not_branch -requires {branch_p:notnull} {
if {$branch_p=="t" && $after==0} {
Index: openacs-4/contrib/packages/survey/www/admin/section-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/section-edit.tcl,v
diff -u -r1.3 -r1.3.2.1
--- openacs-4/contrib/packages/survey/www/admin/section-edit.tcl 14 Feb 2004 19:57:59 -0000 1.3
+++ openacs-4/contrib/packages/survey/www/admin/section-edit.tcl 2 Sep 2004 15:17:48 -0000 1.3.2.1
@@ -29,8 +29,15 @@
lappend poslist [list $secname $secsortkey]
}
+if { ![exists_and_not_null pretty_id] } {
+ set pretty_id $section_id
+}
+
ad_form -extend -name modify_section -form {
{name:text(text) {label "[_ survey.Section_Name]"} {html {size 30}} {value $name}}
+ {pretty_id:text {label "Variable name"} {value $pretty_id }
+ {help_text "This will be the name of the variable when creating reports. No spaces or special characers."}
+ }
{description:text(textarea) {label "[_ survey.Description_1]"} {html {rows 5 cols 70}} {value $description}}
{description_html_p:text(radio) {label "[_ survey.lt_The_above_description]"} {options {{HTML t} {"[_ survey.Plain_text]" f}}} {value $description_html_p}}
{branch_p:text(radio) {label "[_ survey.Branch]"} {options {{Yes t} {No f}}} {value $branch_p}}
Index: openacs-4/contrib/packages/survey/www/admin/send-mail.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/send-mail.tcl,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/contrib/packages/survey/www/admin/send-mail.tcl 15 Feb 2004 13:56:12 -0000 1.2
+++ openacs-4/contrib/packages/survey/www/admin/send-mail.tcl 2 Sep 2004 15:17:48 -0000 1.2.2.1
@@ -55,7 +55,9 @@
} else {
ad_form -name send-mail -form {
{to:text(radio) {options {
- {"[_ survey.lt_Everyone_who_has_alre_1]"}
+ {"[_ survey.lt_Everyone_who_has_alre_1]" "responded"}}}
+ {label "[_ survey.Send_mail_to]"}
+ {value ""}
}
}
}
@@ -67,32 +69,32 @@
{package_id:text(hidden) {value $package_id}}
} -on_submit {
-set query ""
+ set query ""
-if {$dotlrn_installed_p} {
- switch $to {
+ if {$dotlrn_installed_p} {
+ switch $to {
all {
- set query [db_map dotlrn_all]
- }
+ set query [db_map dotlrn_all]
+ }
responded {
set query [db_map dotlrn_responded]
- }
-
+ }
+
not_responded {
set query [db_map dotlrn_not_responded]
}
- }
+ }
} else {
set query [db_map responded]
}
-
- bulk_mail::new \
- -package_id $package_id \
- -from_addr $sender_email \
- -subject $subject \
- -message $message \
- -query $query
+
+ bulk_mail::new \
+ -package_id $package_id \
+ -from_addr $sender_email \
+ -subject $subject \
+ -message $message \
+ -query $query
ad_returnredirect "one?survey_id=$survey_id"
ad_script_abort
}
Index: openacs-4/contrib/packages/survey/www/admin/survey-create.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/survey-create.adp,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/contrib/packages/survey/www/admin/survey-create.adp 7 Feb 2004 12:39:50 -0000 1.2
+++ openacs-4/contrib/packages/survey/www/admin/survey-create.adp 2 Sep 2004 15:17:48 -0000 1.2.2.1
@@ -2,6 +2,7 @@
#survey.survey_admin_create_survey#
@context_bar;noquote@
+
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.2 -r1.2.2.1
--- openacs-4/contrib/packages/survey/www/admin/survey-create.tcl 15 Feb 2004 13:56:12 -0000 1.2
+++ openacs-4/contrib/packages/survey/www/admin/survey-create.tcl 2 Sep 2004 15:17:48 -0000 1.2.2.1
@@ -17,6 +17,7 @@
{description:html ""}
{variable_names ""}
{type "general"}
+ {category_id 0}
}
set package_id [ad_conn package_id]
@@ -34,14 +35,30 @@
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}}}
+ {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}}
-} -validate {
+}
+
+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}}
+ }
+}
+
+ad_form -extend -name create_survey -form {
+ {category_id:text(hidden) {value $category_id}}
+}
+
+ad_form -extend -name create_survey \
+ -validate {
{name {[string length $name] <= 4000}
"[_ survey.lt_Survey_Name_must_be_4]"
} {name {[string length $name] > 0}
@@ -85,6 +102,11 @@
# section_id is null to create a new section
# we might want to specify a section_id later for
# multiple section surveys
+ # DEDS: look for a category
+ 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 ""]
}
| |