Index: openacs-4/packages/evaluation/www/admin/tasks/solution-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/solution-add-edit.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/packages/evaluation/www/admin/tasks/solution-add-edit.tcl 4 Apr 2005 18:22:36 -0000 1.13 +++ openacs-4/packages/evaluation/www/admin/tasks/solution-add-edit.tcl 7 Apr 2005 11:27:00 -0000 1.14 @@ -51,7 +51,7 @@ {upload_file:file,optional {label "[_ evaluation.File_]"} {html "size 30"} - {help_text "[_ evaluation.lt_Currently_title_is_at]"} + {help_text "[_ evaluation.lt_Currently_title_is_at_2]"} } {unattach_p:text(checkbox),optional {label "[_ evaluation.Unattach_file_]"} @@ -68,7 +68,7 @@ {upload_file:text,optional {label "[_ evaluation.File_]"} {html "size 30"} - {after_html "$content"} + {after_html "$title"} } {unattach_p:text(hidden) } @@ -186,7 +186,7 @@ set title [template::util::file::get_property filename $upload_file] set mime_type [cr_filename_to_mime_type -create $title] - if { [parameter::get -parameter "StoreFilesInDatabaseP" -package_id [ad_conn package_id]] } { + if { ![parameter::get -parameter "StoreFilesInDatabaseP" -package_id [ad_conn package_id]] } { set storage_type file } } elseif { ![string eq $url "http://"] } { @@ -220,18 +220,20 @@ set content_length [file size $tmp_file] if { [parameter::get -parameter "StoreFilesInDatabaseP" -package_id [ad_conn package_id]] } { - # create the new item - - set filename [cr_create_content_file $item_id $revision_id $tmp_file] - db_dml set_file_content { *SQL* } - - } else { # create the new item db_dml lob_content { *SQL* } -blob_files [list $tmp_file] # Unfortunately, we can only calculate the file size after the lob is uploaded db_dml lob_size { *SQL* } + + } else { + + # create the new item + + set file_name [cr_create_content_file $item_id $revision_id $tmp_file] + db_dml set_file_content { *SQL* } + } } elseif { ![string eq $url "http://"] } {