@assessment_data.title@ | ||
---|---|---|
@assessment_data.html_title;noquote@ | ||
@assessment_data.instructions;noquote@ | ||
-#assessment.section_counter#
- #assessment.item_counter# + #assessment.session_time_remaining# #assessment.section_time_remaining# |
@assessment_data.title@ | ||
---|---|---|
@assessment_data.html_title;noquote@ | ||
@assessment_data.instructions;noquote@ | ||
-#assessment.section_counter#
- #assessment.item_counter# + #assessment.session_time_remaining# #assessment.section_time_remaining# |
#assessment.Assessment_Title#: #assessment.Description#: #assessment.Instructions#: |
+ #assessment.Assessment_Title#: #assessment.Description#: #assessment.Instructions#: #assessment.Type#: |
- #assessment.Edit#
- @assessment_data.title@ @is_reg_asm_p@
+ #assessment.Edit#
+ @assessment_data.title;noquote@ @is_reg_asm_p@
|
+
#assessment.View_Responses# | Index: openacs-4/packages/assessment/www/asm-admin/one-a.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/one-a.tcl,v diff -u -r1.9.2.2 -r1.9.2.3 --- openacs-4/packages/assessment/www/asm-admin/one-a.tcl 21 Jun 2005 15:14:25 -0000 1.9.2.2 +++ openacs-4/packages/assessment/www/asm-admin/one-a.tcl 18 Jul 2005 18:01:01 -0000 1.9.2.3 @@ -23,7 +23,8 @@ set admin_p [acs_user::site_wide_admin_p] # Get the assessment data as::assessment::data -assessment_id $assessment_id -set context [list [list index [_ assessment.admin]] $assessment_data(title)] +set title [as::assessment::title -title $assessment_data(title)] +set context [list [list index [_ assessment.admin]] $title] set assessment_rev_id $assessment_data(assessment_rev_id) set subsite_id [subsite::main_site_id] @@ -68,7 +69,7 @@ set notification_chunk [notification::display::request_widget \ -type assessment_response_notif \ -object_id $assessment_id \ - -pretty_name $assessment_data(title) \ + -pretty_name $title \ -url [export_vars -base one-a {assessment_id reg_p}] ] db_multirow sections assessment_sections {} { Index: openacs-4/packages/assessment/www/asm-admin/section-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/section-delete.tcl,v diff -u -r1.3.2.1 -r1.3.2.2 --- openacs-4/packages/assessment/www/asm-admin/section-delete.tcl 31 May 2005 23:13:02 -0000 1.3.2.1 +++ openacs-4/packages/assessment/www/asm-admin/section-delete.tcl 18 Jul 2005 18:01:01 -0000 1.3.2.2 @@ -32,7 +32,7 @@ {section_id:key} {section_title:text(inform) {label "[_ assessment.remove_1]"}} {from:text(inform) {label "[_ assessment.from]"} {value $assessment_data(title)}} - {confirmation:text(radio) {label " "} {options $confirm_options} {value f}} + {confirmation:text(radio) {label " "} {options $confirm_options} {value t}} } -select_query_name {section_title} \ -on_submit { if {$confirmation} { Index: openacs-4/packages/assessment/www/asm-admin/section-display-form.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/section-display-form.tcl,v diff -u -r1.4 -r1.4.2.1 --- openacs-4/packages/assessment/www/asm-admin/section-display-form.tcl 7 Apr 2005 22:54:56 -0000 1.4 +++ openacs-4/packages/assessment/www/asm-admin/section-display-form.tcl 18 Jul 2005 18:01:01 -0000 1.4.2.1 @@ -34,6 +34,7 @@ set package_id [ad_conn package_id] set boolean_options [list [list "[_ assessment.yes]" t] [list "[_ assessment.no]" f]] +set type $assessment_data(type) set order_types [list] foreach one_order_type [list alphabetical randomized order_of_entry] { @@ -46,12 +47,26 @@ {title:text {label "[_ assessment.Title]"} {html {size 80 maxlength 1000}} {help_text "[_ assessment.sect_disp_Title_help]"}} {description:text(textarea) {label "[_ assessment.Description]"} {html {rows 5 cols 80}} {help_text "[_ assessment.sect_disp_Description_help]"}} {num_items:integer,optional,nospell {label "[_ assessment.section_num_Items]"} {html {size 10 maxlength 10}} {help_text "[_ assessment.sect_num_items_help]"}} +} + +if { $type > 1} { + ad_form -extend -name section_display_form -form { {adp_chunk:text(textarea),optional,nospell {label "[_ assessment.Section_Template]"} {html {rows 5 cols 80}} {help_text "[_ assessment.section_template_help]"}} {branched_p:text(select) {label "[_ assessment.section_Branched]"} {options $boolean_options} {help_text "[_ assessment.section_branched_help]"}} {back_button_p:text(select) {label "[_ assessment.Back_Button]"} {options $boolean_options} {help_text "[_ assessment.back_button_help]"}} {submit_answer_p:text(select) {label "[_ assessment.Submit_Answer]"} {options $boolean_options} {help_text "[_ assessment.submit_answer_help]"}} {sort_order_type:text(select) {label "[_ assessment.Section_Order]"} {options $order_types} {help_text "[_ assessment.section_order_help]"}} -} -new_request { + } +} else { + ad_form -extend -name section_display_form -form { + {adp_chunk:text(hidden) {value ""}} + {branched_p:text(hidden) {value ""}} + {back_button_p:text(hidden) {value ""}} + {submit_answer_p:text(hidden) {value ""}} + {sort_order_type:text(hidden) {value ""}} + } +} +ad_form -extend -name section_display_form -new_request { set title "" set description "" set num_items "" Index: openacs-4/packages/assessment/www/asm-admin/section-form.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/section-form.tcl,v diff -u -r1.5.2.1 -r1.5.2.2 --- openacs-4/packages/assessment/www/asm-admin/section-form.tcl 5 Jul 2005 16:34:05 -0000 1.5.2.1 +++ openacs-4/packages/assessment/www/asm-admin/section-form.tcl 18 Jul 2005 18:01:01 -0000 1.5.2.2 @@ -17,9 +17,11 @@ permission::require_permission -object_id $package_id -privilege create permission::require_permission -object_id $assessment_id -privilege admin + # Get the assessment data as::assessment::data -assessment_id $assessment_id + if {![info exists assessment_data(assessment_id)]} { ad_return_complaint 1 "[_ assessment.Requested_assess_does]" ad_script_abort @@ -37,8 +39,8 @@ set display_types [db_list_of_lists section_display_types {}] set display_types [concat [list [list "[_ assessment.no_display]" ""] [list "[_ assessment.section_new_display]" "-1"]] $display_types] +set type $assessment_data(type) - ad_form -name section_form -action section-form -export { assessment_id after } -form { {section_id:key} } @@ -55,19 +57,45 @@ ad_form -extend -name section_form -form { {title:text {label "[_ assessment.Title]"} {html {size 80 maxlength 1000}} {help_text "[_ assessment.section_Title_help]"}} - {description:text(textarea),optional {label "[_ assessment.Description]"} {html {rows 5 cols 80}} {help_text "[_ assessment.section_Description_help]"}} } +if {$type > 1} { + ad_form -extend -name section_form -form { + {description:text(textarea),optional {label "[_ assessment.Description]"} {html {rows 5 cols 80}} {help_text "[_ assessment.section_Description_help]"}} + } +} if {![empty_string_p [category_tree::get_mapped_trees $package_id]]} { category::ad_form::add_widgets -container_object_id $package_id -categorized_object_id $_section_id -form_name section_form } + ad_form -extend -name section_form -form { {instructions:text(textarea),optional {label "[_ assessment.Instructions]"} {html {rows 5 cols 80}} {help_text "[_ assessment.section_Instructions_help]"}} - {feedback_text:text(textarea),optional {label "[_ assessment.Feedback]"} {html {rows 5 cols 80}} {help_text "[_ assessment.section_Feedback_help]"}} - {max_time_to_complete:integer,optional,nospell {label "[_ assessment.time_for_completion]"} {html {size 10 maxlength 10}} {help_text "[_ assessment.section_time_help]"}} +} +if {$type > 1} { + ad_form -extend -name section_form -form { + {feedback_text:text(textarea),optional {label "[_ assessment.Feedback]"} {html {rows 5 cols 80}} {help_text "[_ assessment.section_Feedback_help]"}} + {max_time_to_complete:integer,optional,nospell {label "[_ assessment.time_for_completion]"} {html {size 10 maxlength 10}} {help_text "[_ assessment.section_time_help]"}} + } +} + +ad_form -extend -name section_form -form { {num_items:integer,optional,nospell {label "[_ assessment.num_items]"} {html {size 5 maxlength 5}} {help_text "[_ assessment.num_items_help]"}} - {points:integer,optional,nospell {label "[_ assessment.points_section]"} {html {size 10 maxlength 10}} {help_text "[_ assessment.points_section_help]"}} +} +if {$type > 1} { + ad_form -extend -name section_form -form { + {points:integer,optional,nospell {label "[_ assessment.points_section]"} {html {size 10 maxlength 10}} {help_text "[_ assessment.points_section_help]"}} + } +} else { + ad_form -extend -name section_form -form { + {description:text(hidden) {value ""}} + {feedback_text:text(hidden) {value ""}} + {max_time_to_complete:text(hidden) {value ""}} + {points:text(hidden) {value ""}} + } +} + +ad_form -extend -name section_form -form { {display_type_id:text(select),optional {label "[_ assessment.Display_Type]"} {options $display_types} {help_text "[_ assessment.section_Display_Type_help]"}} {no_display:text(hidden) {value f} } @@ -125,12 +153,13 @@ } -edit_data { db_transaction { - if { $display_type_id == -1} { - set display_type_id "" - } if { [empty_string_p $display_type_id]} { set no_display "t" } + + if { $display_type_id == -1} { + set display_type_id "" + } set new_assessment_rev_id [as::assessment::new_revision -assessment_id $assessment_id] set section_id [as::section::latest -section_id $section_id -assessment_rev_id $new_assessment_rev_id] |