Index: openacs-4/packages/lors/tcl/lors-imscp-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors/tcl/Attic/lors-imscp-procs-oracle.xql,v
diff -u -r1.1.2.2 -r1.1.2.3
--- openacs-4/packages/lors/tcl/lors-imscp-procs-oracle.xql 21 Sep 2006 10:40:50 -0000 1.1.2.2
+++ openacs-4/packages/lors/tcl/lors-imscp-procs-oracle.xql 22 Nov 2006 11:55:52 -0000 1.1.2.3
@@ -7,24 +7,24 @@
begin
:1 := ims_manifest.new (
- course_name => :course_name,
- identifier => :identifier,
- version => :version,
- orgs_default => :orgs_default,
- hasmetadata => :hasmetadata,
- parent_man_id => :parent_man_id,
- isscorm => :isscorm,
- folder_id => :content_folder_id,
- fs_package_id => :fs_package_id,
- creation_date => sysdate,
- creation_user => :user_id,
- creation_ip => :creation_ip,
- package_id => :package_id,
- community_id => :community_id,
- class_key => :class_key,
- revision_id => :revision_id,
- isshared => :isshared,
- course_presentation_format => :course_presentation_format
+ p_course_name => :course_name,
+ p_identifier => :identifier,
+ p_version => :version,
+ p_orgs_default => :orgs_default,
+ p_hasmetadata => :hasmetadata,
+ p_parent_man_id => :parent_man_id,
+ p_isscorm => :isscorm,
+ p_folder_id => :content_folder_id,
+ p_fs_package_id => :fs_package_id,
+ p_creation_date => sysdate,
+ p_creation_user => :user_id,
+ p_creation_ip => :creation_ip,
+ p_package_id => :package_id,
+ p_community_id => :community_id,
+ p_class_key => :class_key,
+ p_revision_id => :revision_id,
+ p_isshared => :isshared,
+ p_course_presentation_fmt => :course_presentation_format
);
end;
@@ -34,17 +34,17 @@
begin
:1 := ims_organization.new (
- org_id => :org_id,
- man_id => :man_id,
- identifier => :identifier,
- structure => :structure,
- title => :title,
- hasmetadata => :hasmetadata,
- creation_date => sysdate,
- creation_user => :user_id,
- creation_ip => :creation_ip,
- package_id => :package_id,
- revision_id => :revision_id
+ p_org_id => :org_id,
+ p_man_id => :man_id,
+ p_identifier => :identifier,
+ p_structure => :structure,
+ p_title => :title,
+ p_hasmetadata => :hasmetadata,
+ p_creation_date => sysdate,
+ p_creation_user => :user_id,
+ p_creation_ip => :creation_ip,
+ p_package_id => :package_id,
+ p_revision_id => :revision_id
);
end;
@@ -54,7 +54,7 @@
begin
:1 := ims_organization.delete (
- org_id => :org_id
+ p_org_id => :org_id
);
end;
@@ -64,27 +64,27 @@
begin
:1 := ims_item.new (
- ims_item_id => :item_id,
- org_id => :org_id,
- identifier => :identifier,
- identifierref => :identifierref,
- isvisible => :isvisible,
- parameters => :parameters,
- item_title => :title,
- parent_item => :parent_item,
- hasmetadata => :hasmetadata,
- prerequisites_t => :prerequisites_t,
- prerequisites_s => :prerequisites_s,
- type => :type,
- maxtimeallowed => :maxtimeallowed,
- timelimitaction => :timelimitaction,
- datafromlms => :datafromlms,
- masteryscore => :masteryscore,
- creation_date => sysdate,
- creation_user => :user_id,
- creation_ip => :creation_ip,
- package_id => :package_id,
- revision_id => :revision_id
+ p_ims_item_id => :item_id,
+ p_org_id => :org_id,
+ p_identifier => :identifier,
+ p_identifierref => :identifierref,
+ p_isvisible => :isvisible,
+ p_parameters => :parameters,
+ p_item_title => :title,
+ p_parent_item => :parent_item,
+ p_hasmetadata => :hasmetadata,
+ p_prerequisites_t => :prerequisites_t,
+ p_prerequisites_s => :prerequisites_s,
+ p_type => :type,
+ p_maxtimeallowed => :maxtimeallowed,
+ p_timelimitaction => :timelimitaction,
+ p_datafromlms => :datafromlms,
+ p_masteryscore => :masteryscore,
+ p_creation_date => sysdate,
+ p_creation_user => :user_id,
+ p_creation_ip => :creation_ip,
+ p_package_id => :package_id,
+ p_revision_id => :revision_id
);
end;
@@ -94,7 +94,7 @@
begin
:1 := function delete (
- ims_item_id => :item_id
+ p_ims_item_id => :item_id
);
end;
@@ -104,18 +104,18 @@
begin
:1 := ims_resource.new (
- res_id => :res_id,
- man_id => :man_id,
- identifier => :identifier,
- type => :type,
- href => :href,
- scorm_type => :scorm_type,
- hasmetadata => :hasmetadata,
- creation_date => sysdate,
- creation_user =>:user_id,
- creation_ip => :creation_ip,
- package_id => :package_id,
- revision_id => :revision_id
+ p_res_id => :res_id,
+ p_man_id => :man_id,
+ p_identifier => :identifier,
+ p_type => :type,
+ p_href => :href,
+ p_scorm_type => :scorm_type,
+ p_hasmetadata => :hasmetadata,
+ p_creation_date => sysdate,
+ p_creation_user =>:user_id,
+ p_creation_ip => :creation_ip,
+ p_package_id => :package_id,
+ p_revision_id => :revision_id
);
end;
@@ -125,7 +125,7 @@
begin
:1 := ims_resource.delete (
- res_id => :res_id
+ p_res_id => :res_id
);
end;
@@ -135,8 +135,8 @@
begin
:1 := ims_cp_item_to_resource.new (
- ims_item_id => :item_id,
- res_id => :res_id
+ p_ims_item_id => :item_id,
+ p_res_id => :res_id
);
end;
@@ -146,9 +146,9 @@
begin
:1 := ims_dependency.new (
- dep_id => :dep_id,
- res_id => :res_id,
- identifierref => :identifierref
+ p_dep_id => :dep_id,
+ p_res_id => :res_id,
+ p_identifierref => :identifierref
);
end;
@@ -158,7 +158,7 @@
begin
:1 := ims_dependency.delete (
- dep_id => :dep_id
+ p_dep_id => :dep_id
);
end;
@@ -167,12 +167,12 @@
begin
- :1 := ims_file.add (
- file_id => :file_id,
- res_id => :res_id,
- pathtofile => :pathtofile,
- filename => :filename,
- hasmetadata => :hasmetadata
+ :1 := ims_file.new (
+ p_file_id => :file_id,
+ p_res_id => :res_id,
+ p_pathtofile => :pathtofile,
+ p_filename => :filename,
+ p_hasmetadata => :hasmetadata
);
end;
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
Index: openacs-4/packages/lors/tcl/lors-imsmd-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors/tcl/lors-imsmd-procs.xql,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/packages/lors/tcl/lors-imsmd-procs.xql 29 Aug 2006 11:36:09 -0000 1.1.2.1
+++ openacs-4/packages/lors/tcl/lors-imsmd-procs.xql 22 Nov 2006 11:55:52 -0000 1.1.2.2
@@ -179,6 +179,14 @@
+
+
+ insert into ims_md (ims_md_id, schema, schemaversion)
+ values
+ (:p_ims_md_id, :p_schema, :p_schemaversion)
+
+
+
select ims_md_id