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.23 -r1.24 --- openacs-4/packages/assessment/lib/section-items.adp 2 Sep 2008 17:41:43 -0000 1.23 +++ openacs-4/packages/assessment/lib/section-items.adp 16 Apr 2009 13:38:00 -0000 1.24 @@ -1,10 +1,15 @@ +
+ - #assessment.lt_Insert_new_question_h# +
@@ -15,20 +20,19 @@

#assessment.Question_Number#

@items.question_text;noquote@

- @items.description;noquote@
-
+ @items.description;noquote@
- @formgroup.widget;noquote@ @formgroup.label;noquote@
+ @formgroup.widget;noquote@ @formgroup.label;noquote@
@formgroup.widget;noquote@ @formgroup.label;noquote@ -
+
@@ -43,12 +47,13 @@ @items.subtext@ - +

(#assessment.max_time# @items.max_time_to_complete@) (@items.points@ #assessment.points#) - #assessment.add_trigger# (@items.checks_related@) + #assessment.add_trigger# + (@items.checks_related@)

@@ -59,20 +64,19 @@ - #assessment.Move_Down# + #assessment.Move_Down# - #assessment.Move_Up# + #assessment.Move_Up#

- #assessment.lt_Insert_new_question_h# +

#assessment.lt_Insert_new_question_h#

- 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.16 -r1.17 --- openacs-4/packages/assessment/lib/section-items.tcl 1 Dec 2008 17:12:28 -0000 1.16 +++ openacs-4/packages/assessment/lib/section-items.tcl 16 Apr 2009 13:38:00 -0000 1.17 @@ -1,7 +1,11 @@ set package_url [ad_conn package_url] as::assessment::data -assessment_id $assessment_id +set item_add_new_url [export_vars -base "item-add" {section_id assessment_id {after 0}}] +set catalog_search_url [export_vars -base "catalog-search" {section_id assessment_id {after 0}}] + set item_add_top_url [export_vars -base item-add {as_item_id section_id assessment_id return_url {after 0}}] + ad_form -name admin_section_${section_id} -form { {section_id:text(hidden) {value $section_id}} } @@ -19,6 +23,8 @@ item_add_url item_swap_up_url item_swap_down_url + add_edit_check_url + checks_admin_url } items section_items {} { set presentation_type [as::item_form::add_item_to_form -name admin_section_${section_id} -section_id $section_id -item_id $as_item_id -random_p f] if {$presentation_type == "fitb"} { @@ -33,33 +39,36 @@ set item_swap_up_url [export_vars -base item-swap {as_item_id section_id assessment_id return_url sort_order {direction up}}] set item_swap_down_url [export_vars -base item-swap {as_item_id section_id assessment_id return_url sort_order {direction down}}] + set add_edit_check_url [export_vars -base "../asm-admin/add-edit-check" {as_item_id section_id assessment_id {after $sort_order}}] + set checks_admin_url [export_vars -base "../asm-admin/checks-admin" {section_id assessment_id {item_id $as_item_id}}] + if {$presentation_type == "rb" || $presentation_type == "cb"} { - array set type [as::item_display_$presentation_type\::data -type_id $item(display_type_id)] - set choice_orientation $type(choice_orientation) -# set allow_other_p $item(allow_other_p) - array unset type + array set type [as::item_display_$presentation_type\::data -type_id $item(display_type_id)] + set choice_orientation $type(choice_orientation) + # set allow_other_p $item(allow_other_p) + array unset type } else { - set choice_orientation "" -# set allow_other_p "f" + set choice_orientation "" + # set allow_other_p "f" } set item_type $item(item_type) array unset item if {[empty_string_p $points]} { - set points 0 + set points 0 } set max_time_to_complete [as::assessment::pretty_time -seconds $max_time_to_complete] set checks [as::section::checks_list -assessment_id $assessment_id -section_id $section_id] set checks_related 0 -# ns_log notice "[llength $checks]" + # ns_log notice "[llength $checks]" foreach check_sql $checks { - set cond_list [split $check_sql "="] - set item_id [lindex [split [lindex $cond_list 2] ")"] 0] - if {$item_id == $as_item_id_i} { - incr checks_related - } - + set cond_list [split $check_sql "="] + set item_id [lindex [split [lindex $cond_list 2] ")"] 0] + if {$item_id == $as_item_id_i} { + incr checks_related + } + } }