Index: as-assessment-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-assessment-procs.tcl,v
retrieving revision 1.26.2.16
diff -u -r1.26.2.16 as-assessment-procs.tcl
--- as-assessment-procs.tcl	23 May 2006 11:53:43 -0000	1.26.2.16
+++ as-assessment-procs.tcl	7 Jul 2006 07:34:21 -0000
@@ -6,6 +6,12 @@
 
 namespace eval as::assessment {}
 
+ad_proc -public as::assessment::storage_type {} {
+  return the appriate storage type, "text" for postgres, "file" for Oracle
+} {
+  return text
+}
+
 ad_proc -public as::assessment::new {
     {-name ""}
     {-title:required}
@@ -58,6 +64,7 @@
                                     -content_type {as_assessments} \
                                     -name $name \
                                     -package_id $package_id \
+				    -storage_type [as::assessment::storage_type] \
 				    -context_id $folder_id]
 
 	set as_assessment_id [content::revision::new \
@@ -269,7 +276,7 @@
 	if {[empty_string_p $name]} {
 	    set name "ASS_$new_assessment_id"
 	}
-	set new_assessment_id [content::item::new -item_id $new_assessment_id -parent_id $folder_id -content_type {as_assessments} -name $name]
+	set new_assessment_id [content::item::new -item_id $new_assessment_id -parent_id $folder_id -content_type {as_assessments} -name $name -storage_type [as::assessment::storage_type] ]
 
 	set new_rev_id [content::revision::new \
 			    -item_id $new_assessment_id \
Index: as-callback-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-callback-procs.tcl,v
retrieving revision 1.1.2.13
diff -u -r1.1.2.13 as-callback-procs.tcl
--- as-callback-procs.tcl	10 Mar 2006 15:13:29 -0000	1.1.2.13
+++ as-callback-procs.tcl	7 Jul 2006 07:34:21 -0000
@@ -56,7 +56,7 @@
     will be mapped to the to_user_id.
     
 } {
-    set msg "Merging assesment"
+    set msg "Merging assessment"
     set result [list $msg]
     ns_log Notice $msg
     db_transaction {
Index: as-item-answer-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-item-answer-procs.tcl,v
retrieving revision 1.5.2.1
diff -u -r1.5.2.1 as-item-answer-procs.tcl
--- as-item-answer-procs.tcl	31 May 2005 23:13:00 -0000	1.5.2.1
+++ as-item-answer-procs.tcl	7 Jul 2006 07:34:21 -0000
@@ -26,7 +26,7 @@
 
     # Insert as_item_answer in the CR (and as_item_sa_answers table) getting the revision_id (as_item_answer_id)
     db_transaction {
-        set item_answer_id [content::item::new -parent_id $folder_id -content_type {as_item_choices} -name [as::item::generate_unique_name]]
+        set item_answer_id [content::item::new -parent_id $folder_id -content_type {as_item_choices} -name [as::item::generate_unique_name -storage_type [as::assessment::storage_type] ]]
         set as_item_answer_id [content::revision::new \
 				-item_id $item_answer_id \
 				-content_type {as_item_sa_answers} \
Index: as-item-choice-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-item-choice-procs.tcl,v
retrieving revision 1.7.2.2
diff -u -r1.7.2.2 as-item-choice-procs.tcl
--- as-item-choice-procs.tcl	29 Jul 2005 14:52:18 -0000	1.7.2.2
+++ as-item-choice-procs.tcl	7 Jul 2006 07:34:21 -0000
@@ -31,7 +31,7 @@
 
     # Insert as_item_choice in the CR (and as_item_choices table) getting the revision_id (as_item_choice_id)
     db_transaction {
-        set item_choice_id [content::item::new -parent_id $folder_id -content_type {as_item_choices} -name [as::item::generate_unique_name]]
+        set item_choice_id [content::item::new -parent_id $folder_id -content_type {as_item_choices} -name [as::item::generate_unique_name -storage_type [as::assessment::storage_type] ]]
         set as_item_choice_id [content::revision::new \
 				-item_id $item_choice_id \
 				-content_type {as_item_choices} \
Index: as-item-data-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-item-data-procs.tcl,v
retrieving revision 1.9.2.2
diff -u -r1.9.2.2 as-item-data-procs.tcl
--- as-item-data-procs.tcl	23 May 2006 18:23:19 -0000	1.9.2.2
+++ as-item-data-procs.tcl	7 Jul 2006 07:34:21 -0000
@@ -45,7 +45,7 @@
 		}
 		set new_p 0
 	    } else {
-		set item_data_id [content::item::new -parent_id $folder_id -content_type {as_item_data} -name $name]
+		set item_data_id [content::item::new -parent_id $folder_id -content_type {as_item_data} -name $name -storage_type [as::assessment::storage_type] ]
 	    }
 
 	    set as_item_data_id [content::revision::new \
Index: as-item-display-cb-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-item-display-cb-procs.tcl,v
retrieving revision 1.12.2.2
diff -u -r1.12.2.2 as-item-display-cb-procs.tcl
--- as-item-display-cb-procs.tcl	11 Mar 2006 20:18:30 -0000	1.12.2.2
+++ as-item-display-cb-procs.tcl	7 Jul 2006 07:34:21 -0000
@@ -24,7 +24,7 @@
 
     # Insert as_item_display_cb in the CR (and as_item_display_cb table) getting the revision_id (as_item_display_id)
     db_transaction {
-        set item_item_display_cb_id [content::item::new -parent_id $folder_id -content_type {as_item_display_cb} -name [as::item::generate_unique_name]]
+        set item_item_display_cb_id [content::item::new -parent_id $folder_id -content_type {as_item_display_cb} -name [as::item::generate_unique_name -storage_type [as::assessment::storage_type]]]
 	set as_item_display_cb_id [content::revision::new \
 				-item_id $item_item_display_cb_id \
 				-content_type {as_item_display_cb} \
Index: as-item-display-fu-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-item-display-fu-procs.tcl,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 as-item-display-fu-procs.tcl
--- as-item-display-fu-procs.tcl	11 Mar 2006 20:18:30 -0000	1.1.2.2
+++ as-item-display-fu-procs.tcl	7 Jul 2006 07:34:21 -0000
@@ -18,7 +18,7 @@
     
     # Insert as_item_display_f in the CR (and as_item_display_f table) getting the revision_id (as_item_display_id)
     db_transaction {
-        set item_item_display_f_id [content::item::new -parent_id $folder_id -content_type {as_item_display_f} -name [as::item::generate_unique_name]]
+        set item_item_display_f_id [content::item::new -parent_id $folder_id -content_type {as_item_display_f} -name [as::item::generate_unique_name -storage_type [as::assessment::storage_type]]]
         set as_item_display_f_id [content::revision::new \
 				-item_id $item_item_display_f_id \
 				-content_type {as_item_display_f} \
Index: as-item-display-rb-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-item-display-rb-procs.tcl,v
retrieving revision 1.12.2.2
diff -u -r1.12.2.2 as-item-display-rb-procs.tcl
--- as-item-display-rb-procs.tcl	9 Mar 2006 22:38:26 -0000	1.12.2.2
+++ as-item-display-rb-procs.tcl	7 Jul 2006 07:34:21 -0000
@@ -24,7 +24,7 @@
 
     # Insert as_item_display_rb in the CR (and as_item_display_rb table) getting the revision_id (as_item_display_id)
     db_transaction {
-        set item_item_display_rb_id [content::item::new -parent_id $folder_id -content_type {as_item_display_rb} -name [as::item::generate_unique_name]]
+        set item_item_display_rb_id [content::item::new -parent_id $folder_id -content_type {as_item_display_rb} -name [as::item::generate_unique_name -storage_type [as::assessment::storage_type]]]
         set as_item_display_rb_id [content::revision::new \
 			-item_id $item_item_display_rb_id \
 			-content_type {as_item_display_rb} \
Index: as-item-display-sa-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-item-display-sa-procs.tcl,v
retrieving revision 1.8.2.2
diff -u -r1.8.2.2 as-item-display-sa-procs.tcl
--- as-item-display-sa-procs.tcl	11 Mar 2006 20:18:30 -0000	1.8.2.2
+++ as-item-display-sa-procs.tcl	7 Jul 2006 07:34:21 -0000
@@ -21,7 +21,7 @@
 
     # Insert as_item_display_sa in the CR (and as_item_display_sa table) getting the revision_id (as_item_display_id)
     db_transaction {
-        set item_item_display_sa_id [content::item::new -parent_id $folder_id -content_type {as_item_display_sa} -name [as::item::generate_unique_name]]
+        set item_item_display_sa_id [content::item::new -parent_id $folder_id -content_type {as_item_display_sa} -name [as::item::generate_unique_name -storage_type [as::assessment::storage_type]]]
         set as_item_display_sa_id [content::revision::new \
 				-item_id $item_item_display_sa_id \
 				-content_type {as_item_display_sa} \
Index: as-item-display-sb-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-item-display-sb-procs.tcl,v
retrieving revision 1.10.2.3
diff -u -r1.10.2.3 as-item-display-sb-procs.tcl
--- as-item-display-sb-procs.tcl	11 Mar 2006 20:18:30 -0000	1.10.2.3
+++ as-item-display-sb-procs.tcl	7 Jul 2006 07:34:23 -0000
@@ -24,7 +24,7 @@
 
     # Insert as_item_display_sb in the CR (and as_item_display_sb table) getting the revision_id (as_item_display_id)
     db_transaction {
-        set item_item_display_sb_id [content::item::new -parent_id $folder_id -content_type {as_item_display_sb} -name [as::item::generate_unique_name]]
+        set item_item_display_sb_id [content::item::new -parent_id $folder_id -content_type {as_item_display_sb} -name [as::item::generate_unique_name] -storage_type [as::assessment::storage_type]]
 	set as_item_display_sb_id [content::revision::new \
 				-item_id $item_item_display_sb_id \
 				-content_type {as_item_display_sb} \
Index: as-item-display-ta-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-item-display-ta-procs.tcl,v
retrieving revision 1.8.2.2
diff -u -r1.8.2.2 as-item-display-ta-procs.tcl
--- as-item-display-ta-procs.tcl	11 Mar 2006 20:18:30 -0000	1.8.2.2
+++ as-item-display-ta-procs.tcl	7 Jul 2006 07:34:23 -0000
@@ -22,7 +22,7 @@
 
     # Insert as_item_display_ta in the CR (and as_item_display_ta table) getting the revision_id (as_item_display_id)
     db_transaction {
-        set item_item_display_ta_id [content::item::new -parent_id $folder_id -content_type {as_item_display_ta} -name [as::item::generate_unique_name]]
+        set item_item_display_ta_id [content::item::new -parent_id $folder_id -content_type {as_item_display_ta} -name [as::item::generate_unique_name -storage_type [as::assessment::storage_type]]]
         set as_item_display_ta_id [content::revision::new \
 				-item_id $item_item_display_ta_id \
 				-content_type {as_item_display_ta} \
Index: as-item-display-tb-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-item-display-tb-procs.tcl,v
retrieving revision 1.8.2.4
diff -u -r1.8.2.4 as-item-display-tb-procs.tcl
--- as-item-display-tb-procs.tcl	11 Mar 2006 20:18:30 -0000	1.8.2.4
+++ as-item-display-tb-procs.tcl	7 Jul 2006 07:34:23 -0000
@@ -24,7 +24,7 @@
 
     # Insert as_item_display_tb in the CR (and as_item_display_tb table) getting the revision_id (as_item_display_id)
     db_transaction {
-        set item_item_display_tb_id [content::item::new -parent_id $folder_id -content_type {as_item_display_tb} -name [as::item::generate_unique_name]]
+        set item_item_display_tb_id [content::item::new -parent_id $folder_id -content_type {as_item_display_tb} -name [as::item::generate_unique_name -storage_type [as::assessment::storage_type]]]
         set as_item_display_tb_id [content::revision::new \
 				-item_id $item_item_display_tb_id \
 				-content_type {as_item_display_tb} \
Index: as-item-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-item-procs.tcl,v
retrieving revision 1.14.2.8
diff -u -r1.14.2.8 as-item-procs.tcl
--- as-item-procs.tcl	23 May 2006 12:39:59 -0000	1.14.2.8
+++ as-item-procs.tcl	7 Jul 2006 07:34:23 -0000
@@ -41,7 +41,7 @@
 	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 [as::assessment::storage_type]]
 
         set as_item_id [content::revision::new -item_id $item_item_id \
 			    -content_type {as_items} \
@@ -176,7 +176,7 @@
 	    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]
+        set item_item_id [content::item::new -item_id $item_item_id -parent_id $folder_id -content_type {as_items} -name $name -storage_type [as::assessment::storage_type]]
         set new_item_id [content::revision::new \
 			     -item_id $item_item_id \
 			     -content_type {as_items} \
Index: as-item-type-fu-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-item-type-fu-procs.tcl,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 as-item-type-fu-procs.tcl
--- as-item-type-fu-procs.tcl	4 Jul 2005 15:02:23 -0000	1.1.2.1
+++ as-item-type-fu-procs.tcl	7 Jul 2006 07:34:23 -0000
@@ -17,7 +17,7 @@
     
     # Insert as_item_type_fu in the CR (and as_item_type_fu table) getting the revision_id (as_item_type_id)
     db_transaction {
-        set item_item_type_fu_id [content::item::new -parent_id $folder_id -content_type {as_item_type_fu} -name [as::item::generate_unique_name]]
+        set item_item_type_fu_id [content::item::new -parent_id $folder_id -content_type {as_item_type_fu} -name [as::item::generate_unique_name] -storage_type [as::assessment::storage_type]]
         set as_item_type_fu_id [content::revision::new    -item_id $item_item_type_fu_id  -content_type {as_item_type_fu} -title $title ]
 	
     }
@@ -102,7 +102,7 @@
     
     # Insert the file in the CR 
     db_transaction {
-        set file_item_id [content::item::new -parent_id $folder_id -name "[lindex $response 0]$session_id"]
+        set file_item_id [content::item::new -parent_id $folder_id -name "[lindex $response 0]$session_id" -storage_type [as::assessment::storage_type]]
         set file_revision_id [content::revision::new  -item_id $file_item_id  -title [lindex $response 0]]
 	set content_file [cr_create_content_file $file_item_id $file_revision_id [lindex $response 1]]
 	set mime_type [cr_filename_to_mime_type -create [lindex $response 0]]
Index: as-item-type-mc-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-item-type-mc-procs.tcl,v
retrieving revision 1.17.2.4
diff -u -r1.17.2.4 as-item-type-mc-procs.tcl
--- as-item-type-mc-procs.tcl	21 Feb 2006 18:09:33 -0000	1.17.2.4
+++ as-item-type-mc-procs.tcl	7 Jul 2006 07:34:23 -0000
@@ -25,7 +25,7 @@
 
     # Insert as_item_type_mc in the CR (and as_item_type_mc table) getting the revision_id (as_item_type_id)
     db_transaction {
-        set item_item_type_mc_id [content::item::new -parent_id $folder_id -content_type {as_item_type_mc} -name [as::item::generate_unique_name]]
+        set item_item_type_mc_id [content::item::new -parent_id $folder_id -content_type {as_item_type_mc} -name [as::item::generate_unique_name] -storage_type [as::assessment::storage_type]]
         set as_item_type_mc_id [content::revision::new \
 				-item_id $item_item_type_mc_id \
 				-content_type {as_item_type_mc} \
Index: as-item-type-oq-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-item-type-oq-procs.tcl,v
retrieving revision 1.16.2.1
diff -u -r1.16.2.1 as-item-type-oq-procs.tcl
--- as-item-type-oq-procs.tcl	31 May 2005 23:13:00 -0000	1.16.2.1
+++ as-item-type-oq-procs.tcl	7 Jul 2006 07:34:23 -0000
@@ -23,7 +23,7 @@
 
     # Insert as_item_type_oq in the CR (and as_item_type_oq table) getting the revision_id (as_item_type_id)
     db_transaction {
-        set item_item_type_oq_id [content::item::new -parent_id $folder_id -content_type {as_item_type_oq} -name [as::item::generate_unique_name]]
+        set item_item_type_oq_id [content::item::new -parent_id $folder_id -content_type {as_item_type_oq} -name [as::item::generate_unique_name] -storage_type [as::assessment::storage_type]]
         set as_item_type_oq_id [content::revision::new \
 				    -item_id $item_item_type_oq_id \
 				    -content_type {as_item_type_oq} \
Index: as-item-type-sa-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-item-type-sa-procs.tcl,v
retrieving revision 1.13.2.2
diff -u -r1.13.2.2 as-item-type-sa-procs.tcl
--- as-item-type-sa-procs.tcl	9 Aug 2005 00:31:14 -0000	1.13.2.2
+++ as-item-type-sa-procs.tcl	7 Jul 2006 07:34:23 -0000
@@ -24,7 +24,7 @@
 
     # Insert as_item_type_sa in the CR (and as_item_type_sa table) getting the revision_id (as_item_type_id)
     db_transaction {
-        set item_item_type_sa_id [content::item::new -parent_id $folder_id -content_type {as_item_type_sa} -name [as::item::generate_unique_name]]
+        set item_item_type_sa_id [content::item::new -parent_id $folder_id -content_type {as_item_type_sa} -name [as::item::generate_unique_name] -storage_type [as::assessment::storage_type]]
         set as_item_type_sa_id [content::revision::new \
 				-item_id $item_item_type_sa_id \
 				-content_type {as_item_type_sa} \
Index: as-item-type-swcat-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-item-type-swcat-procs.tcl,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 as-item-type-swcat-procs.tcl
--- as-item-type-swcat-procs.tcl	31 May 2005 23:13:01 -0000	1.1.2.1
+++ as-item-type-swcat-procs.tcl	7 Jul 2006 07:34:23 -0000
@@ -27,7 +27,7 @@
 
     # Insert as_item_type_swcat in the CR (and as_item_type_swcat table) getting the revision_id (as_item_type_id)
     db_transaction {
-        set item_item_type_swcat_id [content::item::new -parent_id $folder_id -content_type {as_item_type_swcat} -name [as::item::generate_unique_name]]
+        set item_item_type_swcat_id [content::item::new -parent_id $folder_id -content_type {as_item_type_swcat} -name [as::item::generate_unique_name] -storage_type [as::assessment::storage_type]]
         set as_item_type_swcat_id [content::revision::new \
 				-item_id $item_item_type_swcat_id \
 				-content_type {as_item_type_swcat} \
Index: as-section-data-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-section-data-procs.tcl,v
retrieving revision 1.4
diff -u -r1.4 as-section-data-procs.tcl
--- as-section-data-procs.tcl	21 Feb 2005 14:32:56 -0000	1.4
+++ as-section-data-procs.tcl	7 Jul 2006 07:34:23 -0000
@@ -27,7 +27,7 @@
 
     # Insert as_section_data in the CR (and as_section_data table) getting the revision_id (section_data_id)
     db_transaction {
-        set section_data_id [content::item::new -parent_id $folder_id -content_type {as_section_data} -name "$section_id-$session_id"]
+        set section_data_id [content::item::new -parent_id $folder_id -content_type {as_section_data} -name "$section_id-$session_id" -storage_type [as::assessment::storage_type]]
         set as_section_data_id [content::revision::new \
 				    -item_id $section_data_id \
 				    -content_type {as_section_data} \
Index: as-section-display-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-section-display-procs.tcl,v
retrieving revision 1.2.2.2
diff -u -r1.2.2.2 as-section-display-procs.tcl
--- as-section-display-procs.tcl	18 May 2006 11:35:19 -0000	1.2.2.2
+++ as-section-display-procs.tcl	7 Jul 2006 07:34:23 -0000
@@ -26,7 +26,7 @@
 
     # Insert as_section_display_type in the CR (and as_section_display_types table) getting the revision_id (display_type_id)
     db_transaction {
-	set display_item_id [content::item::new -parent_id $folder_id -content_type {as_section_display_types} -name [as::item::generate_unique_name]]
+	set display_item_id [content::item::new -parent_id $folder_id -content_type {as_section_display_types} -name [as::item::generate_unique_name] -storage_type [as::assessment::storage_type]]
 
 	set display_id [content::revision::new \
 			    -item_id $display_item_id \
Index: as-section-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-section-procs.tcl,v
retrieving revision 1.23.2.9
diff -u -r1.23.2.9 as-section-procs.tcl
--- as-section-procs.tcl	23 May 2006 12:29:04 -0000	1.23.2.9
+++ as-section-procs.tcl	7 Jul 2006 07:34:23 -0000
@@ -37,7 +37,7 @@
 	} elseif {[empty_string_p $name]} {
 	    set name "SEC_$section_item_id"
 	}
-	set section_item_id [content::item::new -item_id $section_item_id -parent_id $folder_id -content_type {as_sections} -name $name]
+	set section_item_id [content::item::new -item_id $section_item_id -parent_id $folder_id -content_type {as_sections} -name $name -storage_type [as::assessment::storage_type]]
 
 	set as_section_id [content::revision::new \
 			       -item_id $section_item_id \
@@ -167,7 +167,7 @@
 	if {[empty_string_p $name]} {
 	    set name "SEC_$section_item_id"
 	}
-	set section_item_id [content::item::new -item_id $section_item_id -parent_id $folder_id -content_type {as_sections} -name $name]
+	set section_item_id [content::item::new -item_id $section_item_id -parent_id $folder_id -content_type {as_sections} -name $name -storage_type [as::assessment::storage_type]]
 	set new_section_id [content::revision::new \
 				-item_id $section_item_id \
 				-content_type {as_sections} \
Index: as-session-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-session-procs.tcl,v
retrieving revision 1.3.2.2
diff -u -r1.3.2.2 as-session-procs.tcl
--- as-session-procs.tcl	31 Jan 2006 22:11:24 -0000	1.3.2.2
+++ as-session-procs.tcl	7 Jul 2006 07:34:23 -0000
@@ -36,7 +36,7 @@
 
     while { ! $transaction_successful_p } {
 	db_transaction {
-	    set session_id [content::item::new -parent_id $folder_id -content_type {as_sessions} -name "$subject_id-$assessment_id-[as::item::generate_unique_name]" -title "$subject_id-$assessment_id-[as::item::generate_unique_name]" ]
+	    set session_id [content::item::new -parent_id $folder_id -content_type {as_sessions} -name "$subject_id-$assessment_id-[as::item::generate_unique_name]" -title "$subject_id-$assessment_id-[as::item::generate_unique_name]" -storage_type [as::assessment::storage_type]]
 	    set as_session_id [content::revision::new \
 				   -item_id $session_id \
 				   -content_type {as_sessions} \
Index: as-session-results-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/assessment/tcl/as-session-results-procs.tcl,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 as-session-results-procs.tcl
--- as-session-results-procs.tcl	31 Jan 2006 22:11:24 -0000	1.1.2.2
+++ as-session-results-procs.tcl	7 Jul 2006 07:34:23 -0000
@@ -26,7 +26,7 @@
     while { ! $transaction_successful_p } {
 	db_transaction {
 	    if {![db_0or1row result_exists {}]} {
-		set result_item_id [content::item::new -parent_id $folder_id -content_type {as_session_results} -name [as::item::generate_unique_name]]
+		set result_item_id [content::item::new -parent_id $folder_id -content_type {as_session_results} -name [as::item::generate_unique_name] -storage_type [as::assessment::storage_type]]
 	}
 	    set result_id [content::revision::new \
 			       -item_id $result_item_id \
