Index: openacs-4/packages/assessment/catalog/assessment.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/catalog/assessment.en_US.ISO-8859-1.xml,v diff -u -r1.68.2.7 -r1.68.2.8 --- openacs-4/packages/assessment/catalog/assessment.en_US.ISO-8859-1.xml 18 Jul 2005 18:01:01 -0000 1.68.2.7 +++ openacs-4/packages/assessment/catalog/assessment.en_US.ISO-8859-1.xml 19 Jul 2005 15:57:12 -0000 1.68.2.8 @@ -1,5 +1,5 @@ - + Above Absolute Size @@ -524,6 +524,7 @@ Does the respondee have to submit the answer for each question seperately. Subtext Summary + Section 1 Target Community The condition to branch or execute the action There are no users to notify Index: openacs-4/packages/assessment/lib/section-items.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/lib/section-items.adp,v diff -u -r1.17 -r1.17.2.1 --- openacs-4/packages/assessment/lib/section-items.adp 18 Apr 2005 10:20:40 -0000 1.17 +++ openacs-4/packages/assessment/lib/section-items.adp 19 Jul 2005 15:57:12 -0000 1.17.2.1 @@ -1,5 +1,4 @@

#assessment.Items#

- @@ -28,30 +27,21 @@ - + + + @@ -61,7 +51,20 @@ Index: openacs-4/packages/assessment/lib/section-items.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/lib/section-items.tcl,v diff -u -r1.9.2.1 -r1.9.2.2 --- openacs-4/packages/assessment/lib/section-items.tcl 10 Jun 2005 18:53:30 -0000 1.9.2.1 +++ openacs-4/packages/assessment/lib/section-items.tcl 19 Jul 2005 15:57:12 -0000 1.9.2.2 @@ -1,3 +1,4 @@ +as::assessment::data -assessment_id $assessment_id ad_form -name admin_section -form { {section_id:text(hidden) {value $section_id}} } Index: openacs-4/packages/assessment/www/asm-admin/assessment-form.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/assessment-form.tcl,v diff -u -r1.9.2.3 -r1.9.2.4 --- openacs-4/packages/assessment/www/asm-admin/assessment-form.tcl 18 Jul 2005 22:25:08 -0000 1.9.2.3 +++ openacs-4/packages/assessment/www/asm-admin/assessment-form.tcl 19 Jul 2005 15:57:12 -0000 1.9.2.4 @@ -9,6 +9,7 @@ {permission_p 0} {edit_p:optional "0"} {type ""} + {after "0"} } -properties { context:onevalue page_title:onevalue @@ -47,7 +48,7 @@ ## {exit_page:text,optional,nospell {label "[_ assessment.Exit_Page]"} {html {size 50 maxlength 50}} {help_text "[_ assessment.as_Exit_Page_help]"}} -ad_form -name assessment_form -export permission_p -action assessment-form -form { +ad_form -name assessment_form -export {permission_p after} -action assessment-form -form { {assessment_id:key} } @@ -170,7 +171,7 @@ set section_navigation "default path" } -edit_request { db_1row assessment_data {} - + if {![empty_string_p $start_time]} { set start_time [util::date::acquire ansi $start_time] } @@ -237,6 +238,22 @@ if {![empty_string_p $end_time]} { db_dml update_end_time {} } + if { $type } { + db_transaction { + set new_assessment_rev_id [as::assessment::new_revision -assessment_id $assessment_id] + + set new_section_id [as::section::new -title [_ assessment.survey_section] ] + + db_dml move_down_sections {} + set sort_order [expr $after + 1] + db_dml add_section_to_assessment {} + + if {[exists_and_not_null category_ids]} { + category::map_object -object_id $new_section_id $category_ids + } + } + } + } } -edit_data { db_transaction { Index: openacs-4/packages/assessment/www/asm-admin/assessment-form.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/assessment-form.xql,v diff -u -r1.4 -r1.4.2.1 --- openacs-4/packages/assessment/www/asm-admin/assessment-form.xql 13 Apr 2005 18:51:19 -0000 1.4 +++ openacs-4/packages/assessment/www/asm-admin/assessment-form.xql 19 Jul 2005 15:57:12 -0000 1.4.2.1 @@ -57,4 +57,25 @@ + + + + update as_assessment_section_map + set sort_order = sort_order+1 + where assessment_id = :new_assessment_rev_id + and sort_order > :after + + + + + + + + insert into as_assessment_section_map (assessment_id, section_id,sort_order) + values (:new_assessment_rev_id, :new_section_id,:sort_order) + + + + + Index: openacs-4/packages/assessment/www/asm-admin/item-add-mc.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/item-add-mc.tcl,v diff -u -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/assessment/www/asm-admin/item-add-mc.tcl 18 Jul 2005 18:01:01 -0000 1.8.2.1 +++ openacs-4/packages/assessment/www/asm-admin/item-add-mc.tcl 19 Jul 2005 15:57:12 -0000 1.8.2.2 @@ -169,7 +169,6 @@ set after_submit "{ # now go to form to enter choice-specific data - ad_returnredirect \[export_vars -base \"item-add-mc-choices\" {assessment_id section_id as_item_id after mc_id display_type}\] ad_script_abort Index: openacs-4/packages/assessment/www/asm-admin/one-a.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/one-a.adp,v diff -u -r1.11.2.4 -r1.11.2.5 --- openacs-4/packages/assessment/www/asm-admin/one-a.adp 18 Jul 2005 18:01:01 -0000 1.11.2.4 +++ openacs-4/packages/assessment/www/asm-admin/one-a.adp 19 Jul 2005 15:57:12 -0000 1.11.2.5 @@ -107,29 +107,20 @@ + @@ -142,8 +133,19 @@
#assessment.Edit# + + -#assessment.Copy# +#assessment.Add_New# -#assessment.Add_New# - -#assessment.Search_Item# - +#assessment.Search_Item# -#assessment.add_trigger# (@items.checks_related@) +#assessment.add_trigger# (@items.checks_related@) - - #assessment.Move_Down# - - - #assessment.Move_Up# - -#assessment.remove_item# - (#assessment.max_time# @items.max_time_to_complete@) (@items.points@ #assessment.points#) -
- @items.title;noquote@
@items.description;noquote@
+ @items.title;noquote@ + + #assessment.Edit# + #assessment.Copy# + + #assessment.Move_Down# + + + #assessment.Move_Up# + +#assessment.remove_item# + +

@items.description;noquote@
+ @@ -87,6 +90,7 @@ @items.subtext@ +
@sections.rownum@. @sections.name@
-#assessment.Edit# -#assessment.add_new_section# +#assessment.add_new_section# -#assessment.Search_Section# +#assessment.Search_Section# -#assessment.edit_section_display# +#assessment.edit_section_display# -#assessment.section_preview# +#assessment.section_preview# -#assessment.admin_triggers# +#assessment.admin_triggers# - - - #assessment.Move_Down# - - - #assessment.Move_Up# - -#assessment.remove_section# - (#assessment.max_time# @sections.max_time_to_complete@) (@sections.points@ #assessment.points#)
- @sections.title@ + @sections.title@ + +#assessment.Edit# + + #assessment.Move_Down# + + + #assessment.Move_Up# + +#assessment.remove_section# +
+