-@items.title;noquote@ + @items.question_text;noquote@ #assessment.Edit# #assessment.Copy# Index: openacs-4/packages/assessment/lib/section-items.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/lib/section-items.xql,v diff -u -r1.10 -r1.11 --- openacs-4/packages/assessment/lib/section-items.xql 12 Jun 2006 02:49:50 -0000 1.10 +++ openacs-4/packages/assessment/lib/section-items.xql 4 Aug 2006 19:06:03 -0000 1.11 @@ -4,7 +4,8 @@ - select i.as_item_id, i.subtext, cr.title, cr.description, i.field_name,asr.item_id as as_item_id_i, + select i.as_item_id, i.subtext, cr.title, cr.content as + question_text, cr.description, i.field_name,asr.item_id as as_item_id_i, ism.required_p, ism.section_id, ism.sort_order, ism.max_time_to_complete, ism.points from as_items i, cr_revisions cr, cr_items ci, as_item_section_map ism, cr_revisions asr Index: openacs-4/packages/assessment/tcl/as-assessment-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-assessment-procs.tcl,v diff -u -r1.30 -r1.31 --- openacs-4/packages/assessment/tcl/as-assessment-procs.tcl 12 Jun 2006 03:02:38 -0000 1.30 +++ openacs-4/packages/assessment/tcl/as-assessment-procs.tcl 4 Aug 2006 19:06:03 -0000 1.31 @@ -86,8 +86,8 @@ [list section_navigation $section_navigation] \ [list survey_p $survey_p] \ [list package_id $package_id] \ - [list type $type]]] - + [list type $type]]] + } db_dml update_clobs {} -clobs [list $instructions $consent_page] @@ -229,9 +229,9 @@ [list section_navigation $a(section_navigation)] \ [list type $a(type)]]] - set instructions $a(instructions) - set consent_page $a(consent_page) - db_dml update_clobs {} -clobs [list $a(instructions) $a(consent_page)] + set instructions $a(instructions) + set consent_page $a(consent_page) + db_dml update_clobs {} -clobs [list $a(instructions) $a(consent_page)] copy_sections -assessment_id $a(assessment_rev_id) -new_assessment_id $new_rev_id copy_categories -from_id $a(assessment_rev_id) -to_id $new_rev_id @@ -454,19 +454,23 @@ Returns a pretty string of min:sec } { + if {$seconds eq "0" || $seconds eq ""} { + return $seconds + } set time "" if {![empty_string_p $seconds]} { if {$hours_p} { set time_hour [expr $seconds / 3600] set seconds [expr $seconds - ($time_hour * 3600)] - } - set time_min [expr $seconds / 60] - set time_sec [expr $seconds - ($time_min * 60)] - set pad "00" - if {$hours_p} { - append time "[string range $pad [string length $time_hour] end]$time_hour\:" - } - append time "[string range $pad [string length $time_min] end]$time_min\:[string range $pad [string length $time_sec] end]$time_sec min" + + set time_min [expr $seconds / 60] + set time_sec [expr $seconds - ($time_min * 60)] + set pad "00" + if {$hours_p} { + append time "[string range $pad [string length $time_hour] end]$time_hour\:" + } + append time "[string range $pad [string length $time_min] end]$time_min\:[string range $pad [string length $time_sec] end]$time_sec min" + } } return $time } Index: openacs-4/packages/assessment/tcl/as-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-procs.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/assessment/tcl/as-item-procs.tcl 12 Jun 2006 02:49:50 -0000 1.15 +++ openacs-4/packages/assessment/tcl/as-item-procs.tcl 4 Aug 2006 19:06:03 -0000 1.16 @@ -41,11 +41,13 @@ if {[empty_string_p $field_name]} { set field_name $name } - set item_item_id [content::item::new -item_id $item_item_id -parent_id $folder_id -content_type {as_items} -name $name -creation_user [ad_conn user_id] -creation_ip [ad_conn peeraddr]] + set item_item_id [content::item::new -item_id $item_item_id -parent_id $folder_id -content_type {as_items} -name $name -creation_user [ad_conn user_id] -creation_ip [ad_conn peeraddr] -storage_type text] set as_item_id [content::revision::new -item_id $item_item_id \ -content_type {as_items} \ - -title $title \ + -title [string range $title 0 999] \ + -content $title \ + -mime_type "text/html" \ -description $description \ -attributes [list [list subtext $subtext] \ [list field_name $field_name] \ Index: openacs-4/packages/assessment/tcl/as-section-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-section-procs-postgresql.xql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/assessment/tcl/as-section-procs-postgresql.xql 12 Jun 2006 02:49:50 -0000 1.7 +++ openacs-4/packages/assessment/tcl/as-section-procs-postgresql.xql 4 Aug 2006 19:06:03 -0000 1.8 @@ -5,7 +5,8 @@ - select s.as_item_id, ci.name, r.title, r.description, i.subtext, m.required_p, + select s.as_item_id, ci.name, r.title, r.content as + question_text, r.description, i.subtext, m.required_p, m.max_time_to_complete, r2.revision_id as content_rev_id, r2.title as content_filename, ci2.content_type, ir.target_rev_id as as_item_type_id, i.validate_block @@ -31,7 +32,7 @@ - select i.as_item_id, ci.name, cr.title, cr.description, i.subtext, + select i.as_item_id, ci.name, cr.content as question_text, cr.title, cr.description, i.subtext, m.required_p, m.max_time_to_complete, r2.revision_id as content_rev_id, r2.title as content_filename, ci2.content_type, m.fixed_position, ir.target_rev_id as as_item_type_id, i.validate_block Index: openacs-4/packages/assessment/tcl/as-section-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-section-procs.tcl,v diff -u -r1.27 -r1.28 --- openacs-4/packages/assessment/tcl/as-section-procs.tcl 12 Jun 2006 03:02:38 -0000 1.27 +++ openacs-4/packages/assessment/tcl/as-section-procs.tcl 4 Aug 2006 19:06:03 -0000 1.28 @@ -224,7 +224,7 @@ set open_positions "" set max_pos 0 db_foreach section_items {} { - set section_items($as_item_id) [list $name $title $description $subtext $required_p $max_time_to_complete $content_rev_id $content_filename $content_type $as_item_type_id $validate_block] + set section_items($as_item_id) [list $name $title $description $subtext $required_p $max_time_to_complete $content_rev_id $content_filename $content_type $as_item_type_id $validate_block $question_text] if {![empty_string_p $fixed_position] && $fixed_position != "0"} { set fixed_positions($fixed_position) $as_item_id if {$max_pos < $fixed_position} { Index: openacs-4/packages/assessment/www/assessment-section-submit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/assessment-section-submit.adp,v diff -u -r1.14 -r1.15 --- openacs-4/packages/assessment/www/assessment-section-submit.adp 12 Jul 2006 06:01:40 -0000 1.14 +++ openacs-4/packages/assessment/www/assessment-section-submit.adp 4 Aug 2006 19:06:03 -0000 1.15 @@ -34,7 +34,7 @@ @items.description;noquote@
- @items.content;noquote@
@items.title;noquote@ +* @items.question_text;noquote@ *