Index: openacs-4/packages/simple-survey/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simple-survey/www/index.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/simple-survey/www/index.adp 20 Apr 2001 20:51:22 -0000 1.1 +++ openacs-4/packages/simple-survey/www/index.adp 18 Feb 2002 20:48:01 -0000 1.2 @@ -1,9 +1,5 @@ - - - Surveys - - -

Surveys

+ +Surveys Index: openacs-4/packages/simple-survey/www/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simple-survey/www/Attic/master.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/simple-survey/www/master.adp 18 Feb 2002 20:48:01 -0000 1.1 @@ -0,0 +1,6 @@ + +@title@ + +

@title@

+

+ Index: openacs-4/packages/simple-survey/www/one.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simple-survey/www/one.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/simple-survey/www/one.adp 15 Jun 2001 00:45:42 -0000 1.2 +++ openacs-4/packages/simple-survey/www/one.adp 18 Feb 2002 20:48:01 -0000 1.3 @@ -1,20 +1,15 @@ - - - @name@ - + +One Survey: @name@ -

@name@

- - - + - + @@ -38,4 +33,3 @@
@name@


@description@
- Index: openacs-4/packages/simple-survey/www/process-response.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simple-survey/www/process-response.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/simple-survey/www/process-response.adp 20 Apr 2001 20:51:22 -0000 1.1 +++ openacs-4/packages/simple-survey/www/process-response.adp 18 Feb 2002 20:48:01 -0000 1.2 @@ -1,9 +1,5 @@ - - - Response Submitted - -

@survey_name@

+ +Response Submitted
Response submitted. Thank you.
- Index: openacs-4/packages/simple-survey/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simple-survey/www/admin/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/simple-survey/www/admin/index.adp 18 Feb 2002 20:48:01 -0000 1.1 @@ -0,0 +1,13 @@ + +Survey Administration +@context_bar@ + + Index: openacs-4/packages/simple-survey/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simple-survey/www/admin/index.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/simple-survey/www/admin/index.tcl 20 Apr 2001 20:51:22 -0000 1.1 +++ openacs-4/packages/simple-survey/www/admin/index.tcl 18 Feb 2002 20:48:01 -0000 1.2 @@ -11,43 +11,17 @@ } -set page_content "[ad_header "Simple Survey System (Admin)"] +set context_bar [ad_context_bar_ws_or_index "Simple Survey Admin"] -

Simple Survey System Administration

- -[ad_context_bar_ws_or_index "Simple Survey Admin"] - -
- -
    - -" set package_id [ad_conn package_id] # bounce the user if they don't have permission to admin surveys ad_require_permission $package_id survsimp_admin_survey set disabled_header_written_p 0 -db_foreach survsimp_surveys "select survey_id, name, enabled_p +db_multirow surveys select_surveys "select survey_id, name, enabled_p from survsimp_surveys -order by enabled_p desc, upper(name)" { +order by enabled_p desc, upper(name)" - if { $enabled_p == "f" && !$disabled_header_written_p } { - set disabled_header_written_p 1 - append page_content "

    Disabled Surveys

    \n" - } - append page_content "
  • $name\n" -} - -append page_content " - -

    - -

  • Create a new survey -
- -[ad_footer] -" - -doc_return 200 text/html $page_content +ad_return_template Index: openacs-4/packages/simple-survey/www/admin/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simple-survey/www/admin/Attic/master.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/simple-survey/www/admin/master.adp 18 Feb 2002 20:48:01 -0000 1.1 @@ -0,0 +1,7 @@ + +@title@ + +

@title@

+@context_bar@ +

+ Index: openacs-4/packages/simple-survey/www/admin/question-add-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simple-survey/www/admin/question-add-3.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/simple-survey/www/admin/question-add-3.tcl 11 Feb 2002 07:10:48 -0000 1.3 +++ openacs-4/packages/simple-survey/www/admin/question-add-3.tcl 18 Feb 2002 20:48:01 -0000 1.4 @@ -98,13 +98,13 @@ set sort_key 1 } - db_exec_plsql create_question { + set question_id [db_exec_plsql create_question { begin :1 := survsimp_question.new ( question_id => :question_id, survey_id => :survey_id, sort_key => :sort_key, - question_text => empty_clob(), + question_text => :question_text, abstract_data_type => :abstract_data_type, presentation_type => :presentation_type, presentation_alignment => :presentation_alignment, @@ -114,7 +114,7 @@ creation_user => :user_id ); end; - } + }] db_dml add_question_text { update survsimp_questions @@ -192,7 +192,7 @@ question_id => :question_id, survey_id => :survey_id, sort_key => :sort_key, - question_text => :question_text, + question_text => empty_clob(), abstract_data_type => :abstract_data_type, presentation_type => :presentation_type, presentation_options => :presentation_options, @@ -204,6 +204,13 @@ end; } + db_dml add_question_text { + update survsimp_questions + set question_text = :question_text + where question_id = :question_id + } + + # For questions where the user is selecting a canned response, insert # the canned responses into survsimp_question_choices by parsing the valid_responses # field.