Index: openacs-4/packages/lors/tcl/lors-imscp-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lors/tcl/lors-imscp-procs.tcl,v diff -u -r1.7.2.3.2.2 -r1.7.2.3.2.3 --- openacs-4/packages/lors/tcl/lors-imscp-procs.tcl 21 Sep 2006 10:45:30 -0000 1.7.2.3.2.2 +++ openacs-4/packages/lors/tcl/lors-imscp-procs.tcl 22 Nov 2006 11:55:52 -0000 1.7.2.3.2.3 @@ -230,7 +230,7 @@ set parent_man_id 0 } if {[empty_string_p $isscorm]} { - set isscorm 0 + set isscorm "f" } if {[empty_string_p $content_folder_id]} { set content_folder_id $folder_id @@ -260,7 +260,7 @@ permission::grant -party_id $user_id -object_id $item_id -privilege admin # The new course has for default its isshared value false - set isshared f + set isshared "f" } else { set item_id $version_id @@ -274,6 +274,25 @@ # additional information as before # db_transaction { + #Convert oracle boolean type. This is compatible with postgreSQL + if { $hasmetadata == 0 } { + set hasmetadata "f" + } elseif {$hasmetadata == 1 } { + set hasmetadata "t" + } + + if { $isscorm == 0 } { + set isscorm "f" + } elseif {$isscorm == 1 } { + set isscorm "t" + } + + if { $isshared == 0 } { + set isshared "f" + } elseif {$isshared == 1 } { + set isshared "t" + } + set manifest_id [db_exec_plsql new_manifest {} ] # } @@ -399,6 +418,11 @@ -creation_ip $creation_ip -item_id $item_id -is_live "t"] # db_transaction { + if { $hasmetadata == 0 } { + set hasmetadata "f" + } elseif {$hasmetadata == 1 } { + set hasmetadata "t" + } set organization_id [db_exec_plsql new_organization {} ] # } @@ -507,6 +531,12 @@ -creation_ip $creation_ip -item_id $cr_item_id -is_live "t"] # db_transaction { + #Convert oracle boolean type. This is compatible with postgreSQL + if { $hasmetadata == 0 } { + set hasmetadata "f" + } elseif {$hasmetadata == 1 } { + set hasmetadata "t" + } set item_id [db_exec_plsql new_item {} ] # } @@ -603,6 +633,7 @@ set p_masteryscore [lindex $item 11] set p_dotlrn_permission [lindex $item 12] + if {$p_hasmetadata != 0} { set md_node $p_hasmetadata set p_hasmetadata 1 @@ -701,6 +732,12 @@ -creation_ip $creation_ip -item_id $item_id -is_live "t"] # db_transaction { + #Convert oracle boolean type. This is compatible with postgreSQL + if { $hasmetadata == 0 } { + set hasmetadata "f" + } elseif {$hasmetadata == 1 } { + set hasmetadata "t" + } set resource_id [db_exec_plsql new_resource {} ] # } @@ -789,7 +826,7 @@ @author Ernie Ghiglione (ErnieG@mm.st) } { if {[empty_string_p $hasmetadata]} { - set hasmetadata 0 + set hasmetadata "f" } # At times, and for some strange reason, Blackboard and Reload @@ -802,7 +839,14 @@ ns_log notice "DAVEB99 file_add file_id='${file_id}'" if {$file_exists == 0} { # db_transaction { - set file [db_exec_plsql file_add {} ] + #Convert oracle boolean type. This is compatible with postgreSQL + if { $hasmetadata == 0 } { + set hasmetadata "f" + } elseif {$hasmetadata == 1 } { + set hasmetadata "t" + } + + set file [db_exec_plsql file_add {} ] # } } return $file_id