Index: openacs-4/packages/lors/catalog/lors.en_US.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors/catalog/lors.en_US.ISO-8859-1.xml,v
diff -u -r1.1 -r1.1.4.1
--- openacs-4/packages/lors/catalog/lors.en_US.ISO-8859-1.xml 17 Nov 2004 22:43:57 -0000 1.1
+++ openacs-4/packages/lors/catalog/lors.en_US.ISO-8859-1.xml 5 May 2006 17:23:12 -0000 1.1.4.1
@@ -10,5 +10,5 @@
Transaction Error in MD schema shemaversion
Transaction Error while Adding Metadata
The error was:
- The error was: $errmsg
+ The error was: %errmsg%
Index: openacs-4/packages/lors/sql/postgresql/lors-imscp-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors/sql/postgresql/lors-imscp-drop.sql,v
diff -u -r1.5.2.1 -r1.5.2.2
--- openacs-4/packages/lors/sql/postgresql/lors-imscp-drop.sql 13 Jun 2005 15:10:41 -0000 1.5.2.1
+++ openacs-4/packages/lors/sql/postgresql/lors-imscp-drop.sql 5 May 2006 17:23:13 -0000 1.5.2.2
@@ -15,9 +15,11 @@
drop table ims_cp_dependencies;
drop sequence ims_cp_dependencies_seq;
drop table ims_cp_files;
+drop table ims_cp_items_to_resources;
drop table ims_cp_resources;
drop table ims_cp_items;
drop table ims_cp_organizations;
+drop table ims_cp_manifest_class;
drop table ims_cp_manifests;
drop table lors_available_presentation_formats;
Index: openacs-4/packages/lors/sql/postgresql/lors-imscp-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors/sql/postgresql/lors-imscp-package-create.sql,v
diff -u -r1.4 -r1.4.2.1
--- openacs-4/packages/lors/sql/postgresql/lors-imscp-package-create.sql 17 May 2005 16:35:10 -0000 1.4
+++ openacs-4/packages/lors/sql/postgresql/lors-imscp-package-create.sql 5 May 2006 17:23:13 -0000 1.4.2.1
@@ -215,7 +215,7 @@
p_item_id alias for $1;
begin
perform acs_object__delete(p_item_id);
- delete from ims_cp_items where item_id = p_item_id;
+ delete from ims_cp_items where ims_item_id = p_item_id;
return 0;
end;
' language 'plpgsql';
Index: openacs-4/packages/lors/sql/postgresql/lors-imsmd-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors/sql/postgresql/lors-imsmd-drop.sql,v
diff -u -r1.1.2.1 -r1.1.2.2
Binary files differ
Index: openacs-4/packages/lors/sql/postgresql/upgrade/upgrade-0.6d-0.6d3.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors/sql/postgresql/upgrade/upgrade-0.6d-0.6d3.sql,v
diff -u -r1.1.2.2 -r1.1.2.3
--- openacs-4/packages/lors/sql/postgresql/upgrade/upgrade-0.6d-0.6d3.sql 25 Oct 2005 10:25:00 -0000 1.1.2.2
+++ openacs-4/packages/lors/sql/postgresql/upgrade/upgrade-0.6d-0.6d3.sql 5 May 2006 17:23:13 -0000 1.1.2.3
@@ -12,6 +12,25 @@
drop table lors_available_presentation_formats;
+-- Course presentation formats
+
+create table lorsm_course_presentation_formats (
+ format_id integer
+ constraint lorsm_cpformats_pk
+ primary key,
+ format_pretty_name varchar(200),
+ format_name varchar(100),
+ folder_name varchar(100)
+);
+
+create index lorsm_cpformats__format_id_idx on lorsm_course_presentation_formats (format_id);
+
+comment on table lorsm_course_presentation_formats is '
+This table stores the available presentation formats for the courses. Its contains the pretty name
+for the format, an id, and the folder in packages/lorsm/www/ where the presentation format is stored.
+Currently just tree presentation formats exists, delivery, delivery-wihout-index and delivery-bottom-bar,
+which we store on creation';
+
--Change presentation_id to format_id.
alter table ims_cp_manifests rename column presentation_id to course_presentation_format;
Index: openacs-4/packages/lors/sql/postgresql/upgrade/upgrade-0.6d3-0.6d4.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors/sql/postgresql/upgrade/upgrade-0.6d3-0.6d4.sql,v
diff -u -r1.1.2.2 -r1.1.2.3
--- openacs-4/packages/lors/sql/postgresql/upgrade/upgrade-0.6d3-0.6d4.sql 13 Jun 2005 15:10:41 -0000 1.1.2.2
+++ openacs-4/packages/lors/sql/postgresql/upgrade/upgrade-0.6d3-0.6d4.sql 5 May 2006 17:23:13 -0000 1.1.2.3
@@ -283,3 +283,9 @@
'ims_resource__get_title' -- name_method
);
+-- create cr_items for all the objects
+
+-- create cr_revisions for all the objects
+
+-- copy the data back to type-specific tables
+
Fisheye: Tag 1.3.2.1 refers to a dead (removed) revision in file `openacs-4/packages/lors/tcl/lors-assessment-procs.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/lors/tcl/lors-cr-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors/tcl/lors-cr-procs.tcl,v
diff -u -r1.4 -r1.4.2.1
--- openacs-4/packages/lors/tcl/lors-cr-procs.tcl 17 May 2005 16:35:11 -0000 1.4
+++ openacs-4/packages/lors/tcl/lors-cr-procs.tcl 5 May 2006 17:23:14 -0000 1.4.2.1
@@ -95,18 +95,19 @@
#return [list $name $folder_name $parent_id $user_id $creation_ip]
- db_transaction {
+# db_transaction {
# create the folder
set folder_id [db_exec_plsql folder_create {
select lors__new_folder (:name, :folder_name, :parent_id, :user_id, :creation_ip);
}]
- } on_error {
- ad_return_error "[_ lors.lt_Error_inserting_folde]" "[_ lors.The_error_was_errmsg]"
- ad_script_abort
- }
+# } on_error {
+# ad_return_error "[_ lors.lt_Error_inserting_folde]" "[_ lors.The_error_was_errmsg]"
+# error "[_ lors.The_error_was_errmsg]"
+# ad_script_abort
+# }
return $folder_id
}
@@ -140,7 +141,7 @@
set mime_type [cr_filename_to_mime_type -create $fle]
# insert file into the CR
- db_transaction {
+# db_transaction {
set description "uploaded using LORs"
# add file
@@ -160,7 +161,7 @@
# update the file path in the CR and the size on cr_revisions
db_dml update_revi "update cr_revisions set content = '$cr_file', content_length = $file_size where revision_id = :version_id"
- }
+# }
lappend retlist [list $fle $mime_type $parent_id $file_id $version_id $cr_file $file_size]
}
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.1 -r1.7.2.2
--- openacs-4/packages/lors/tcl/lors-imscp-procs.tcl 13 Jun 2005 15:10:41 -0000 1.7.2.1
+++ openacs-4/packages/lors/tcl/lors-imscp-procs.tcl 5 May 2006 17:23:14 -0000 1.7.2.2
@@ -275,7 +275,7 @@
# Now the new revision_id will be sent to the sql function with the
# additional information as before
- db_transaction {
+# db_transaction {
set manifest_id [db_exec_plsql new_manifest {
select ims_manifest__new (
:course_name,
@@ -301,27 +301,79 @@
}
]
- }
+# }
return $manifest_id
}
ad_proc -public lors::imscp::manifest_delete {
-man_id:required
+ {-delete_all "f"}
} {
Deletes a manifest.
- @option man_id manifest id to be inserted.
+ @param man_id manifest id to be inserted.
+ @param delete_all t/f remove all dependent objects if true
@author Ernie Ghiglione (ErnieG@mm.st)
} {
db_transaction {
- set ret [db_exec_plsql delete_manifest {
- select ims_manifest__delete (
- :man_id
- );
+ if {$delete_all} {
+
+ # FIXME remove ims metadata
+ # To delete a course we need to
+ # remove file storage items
+
+ foreach file_item_id [db_list get_files "select item_id from cr_revisions cr, ims_cp_files f, ims_cp_resources r where f.res_id=r.res_id and r.man_id=:man_id and cr.revision_id=f.file_id"] {
+ # delete related file_storage files
+ content::item::delete -item_id $file_item_id
+ }
+ # remove ims_cp_files
+ # rows in ims_cp_files should be removed when ims_cp_resources row
+ # is removed (on delete cascade on res_id)
+
+ # remove ims_cp_items
+ foreach item_id [db_list get_items "select cr.item_id from cr_revisions cr, ims_cp_items i, ims_cp_items_to_resources ir, ims_cp_resources r
+ where
+ r.man_id=:man_id
+ and
+ r.res_id=ir.res_id
+ and
+ i.ims_item_id=ir.ims_item_id
+ and
+ cr.revision_id=i.ims_item_id"] {
+ db_dml delete_map "delete from ims_cp_items_map where ims_item_id in (select revision_id from cr_revisions where item_id=:item_id)"
+# ad_return_complaint 1 "item_id $item_id ims_item_id $ims_item_id"
+ content::item::delete -item_id $item_id
+ }
+ # remove rows in ims_cp_items_to_resources
+ # rows in ims_cp_items_to_resources should be deleted when the
+ # ims_cp_items row is deleted (on delete cascade)
+
+ # remove ims_cp_resources
+ foreach res_item_id [db_list get_res "select item_id from cr_revisions, ims_cp_resources where revision_id=res_id and man_id=:man_id"] {
+ content::item::delete -item_id $res_item_id
+ }
+ # remove rows in lorsm_cmi_core
+ db_dml delete_cmi "delete from lorsm_cmi_core where man_id=:man_id"
+ # remove rows in lorsm_student_track
+ db_dml delete_track "delete from lorsm_student_track where course_id = :man_id"
+ # FIXME see if other lorms tables need to be cleaned out
+
+ # remove ims_cp_organization
+ foreach org_item_id [db_list get_org "select item_id from cr_revisions, ims_cp_organizations where revision_id=org_id and man_id=:man_id"] {
+ db_dml delete_map "delete from ims_cp_items_map where org_id in (select revision_id from cr_revisions where item_id=:org_item_id)"
+ content::item::delete -item_id $org_item_id
+ }
+
+ # remove ims_cp_manifest_class
+ # this deletes the association between the course and all dotlrn
+ # classes where it was used
+ db_dml delete_manifest_class "delete from ims_cp_manifest_class where man_id=:man_id"
+
}
- ]
+
+ set ret [content::item::delete -item_id [content::revision::item_id -revision_id $man_id]]
}
return $ret
}
@@ -379,7 +431,7 @@
set revision_id [content::revision::new -title $name -content_type $content_type -creation_user $user_id \
-creation_ip $creation_ip -item_id $item_id -is_live "t"]
- db_transaction {
+# db_transaction {
set organization_id [db_exec_plsql new_organization {
select ims_organization__new (
:org_id,
@@ -398,7 +450,7 @@
}
]
- }
+# }
return $organization_id
}
@@ -410,7 +462,7 @@
@option org_id organization id to be inserted.
@author Ernie Ghiglione (ErnieG@mm.st)
} {
- db_transaction {
+# db_transaction {
set ret [db_exec_plsql delete_organization {
select ims_organization__delete (
:org_id
@@ -419,7 +471,7 @@
}
]
- }
+# }
return $ret
}
@@ -509,7 +561,7 @@
set revision_id [content::revision::new -title $name -content_type $content_type -creation_user $user_id \
-creation_ip $creation_ip -item_id $cr_item_id -is_live "t"]
- db_transaction {
+# db_transaction {
set item_id [db_exec_plsql new_item {
select ims_item__new (
:item_id,
@@ -538,7 +590,7 @@
}
]
- }
+# }
if {![empty_string_p $dotlrn_permission]} {
@@ -588,7 +640,7 @@
@option item_id item id to be removed.
@author Ernie Ghiglione (ErnieG@mm.st)
} {
- db_transaction {
+# db_transaction {
set ret [db_exec_plsql delete_item {
select ims_item__delete (
:item_id
@@ -597,7 +649,7 @@
}
]
- }
+# }
return $ret
}
@@ -735,7 +787,7 @@
set revision_id [content::revision::new -title $name -content_type $content_type -creation_user $user_id \
-creation_ip $creation_ip -item_id $item_id -is_live "t"]
- db_transaction {
+# db_transaction {
set resource_id [db_exec_plsql new_resource {
select ims_resource__new (
:res_id,
@@ -755,7 +807,7 @@
}
]
- }
+# }
return $resource_id
}
@@ -767,15 +819,15 @@
@option res_id resource id to be removed.
@author Ernie Ghiglione (ErnieG@mm.st)
} {
- db_transaction {
+# db_transaction {
set ret [db_exec_plsql delete_resource {
select ims_resource__delete (
:res_id
);
}
]
- }
+# }
return $ret
}
@@ -789,15 +841,15 @@
@option res_id the resource id
@author Ernie Ghiglione (ErnieG@mm.st)
} {
- db_transaction {
+# db_transaction {
set item_to_resource [db_exec_plsql item_to_resources_add {
select ims_cp_item_to_resource__new (
:item_id,
:res_id
);
}
]
- }
+# }
return $item_to_resource
}
@@ -812,7 +864,7 @@
@option identifier dependency identifier.
@author Ernie Ghiglione (ErnieG@mm.st)
} {
- db_transaction {
+# db_transaction {
set dep_id [db_nextval ims_cp_dependencies_seq]
set dependency [db_exec_plsql dependency_add {
select ims_dependency__new (
@@ -822,7 +874,7 @@
);
}
]
- }
+# }
return $dep_id
}
@@ -834,15 +886,15 @@
@option dep_id dependency id to be removed.
@author Ernie Ghiglione (ErnieG@mm.st)
} {
- db_transaction {
+# db_transaction {
set ret [db_exec_plsql delete_resource {
select ims_dependency__delete (
:dep_id
);
}
]
- }
+# }
return $ret
}
@@ -874,9 +926,9 @@
set file_exists [db_0or1row file_ex "select file_id from ims_cp_files where file_id = :file_id and res_id = :res_id"]
-
+ ns_log notice "DAVEB99 file_add file_id='${file_id}'"
if {$file_exists == 0} {
- db_transaction {
+# db_transaction {
set file [db_exec_plsql file_add {
select ims_file__new (
:file_id,
@@ -887,7 +939,7 @@
);
}
]
- }
+# }
}
return $file_id
}
@@ -1075,7 +1127,7 @@
# Checks manifest metadata schema
set metadata [$node child all metadata]
-
+ set metadata [lindex [$node getElementsByTagName metadata] 0]
if {![empty_string_p $metadata]} {
set MetadataSchema [lindex [lindex [lors::imsmd::getMDSchema $metadata] 0] 0]
set man_scorm_metadataschema [regexp -nocase scorm $MetadataSchema]
Index: openacs-4/packages/lors/tcl/lors-imsmd-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors/tcl/lors-imsmd-procs.tcl,v
diff -u -r1.6.2.2 -r1.6.2.3
--- openacs-4/packages/lors/tcl/lors-imsmd-procs.tcl 20 Apr 2006 20:29:38 -0000 1.6.2.2
+++ openacs-4/packages/lors/tcl/lors-imsmd-procs.tcl 5 May 2006 17:23:14 -0000 1.6.2.3
@@ -1164,7 +1164,7 @@
set p_ims_md_id $acs_object
set path_to_file $dir
- db_transaction {
+# db_transaction {
# General
# Title
@@ -1796,11 +1796,11 @@
}
}
}
- } on_error {
- ad_return_error "[_ lors.lt_Transaction_Error_in_]" "[_ lors._The] $errmsg"
- }
-
- }
+# } on_error {
+# ad_return_error "[_ lors.lt_Transaction_Error_in_]" "[_ lors._The] $errmsg"
+# }
+#
+# }
ad_proc -public addMetadata {
@@ -1829,7 +1829,7 @@
# inserts into db
- db_transaction {
+# db_transaction {
# Checks if there's a LOM record
if {$lom != 0} {
@@ -1841,9 +1841,9 @@
lors::imsmd::addLOM -lom $lom -prefix $prefix -acs_object $p_ims_md_id -dir $path_to_file
}
- } on_error {
- ad_return_error "[_ lors.lt_Transaction_Error_whi]" "[_ lors.The_error_was] $errmsg"
- }
+# } on_error {
+# ad_return_error "[_ lors.lt_Transaction_Error_whi]" "[_ lors.The_error_was] $errmsg"
+# }
return 1
}
@@ -1874,15 +1874,15 @@
lors::imsmd::delMD -acs_object $p_ims_md_id
- db_transaction {
+# db_transaction {
db_dml add_md {
insert into ims_md (ims_md_id, schema, schemaversion)
values
(:p_ims_md_id, :p_schema, :p_schemaversion)
}
- } on_error {
- ad_return_error "[_ lors.lt_Transaction_Error_in__1] " " [_ lors._The] $errmsg"
- }
+# } on_error {
+# ad_return_error "[_ lors.lt_Transaction_Error_in__1] " " [_ lors._The] $errmsg"
+# }
}
ad_proc -public delMD {
@@ -1899,13 +1899,13 @@
if {[db_0or1row check_md_record {select ims_md_id from ims_md where ims_md_id = :p_ims_md_id}]} {
# ... then delete it
- db_transaction {
+# db_transaction {
db_dml add_md {
delete from ims_md where ims_md_id = :p_ims_md_id
}
- } on_error {
- ad_return_error "[_ lors.lt_Transaction_deleting_]" "[_ lors.The_error_was] $errmsg"
- }
+# } on_error {
+# ad_return_error "[_ lors.lt_Transaction_deleting_]" "[_ lors.The_error_was] $errmsg"
+# }
}
}
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lors/tcl/lors-procs.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lors/tcl/lors-test-procs.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lors/tcl/test/lors-test-procs.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lors/tcl/test/Courses/LMSTestCourse01.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/lors/tcl/test/Courses/LMSTestCourse01.zip
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors/tcl/test/Courses/LMSTestCourse01.zip,v
diff -u -r1.1 -r1.1.2.1
Binary files differ
Index: openacs-4/packages/lors/tcl/test/Courses/LMSTestCourse02-orig.zip
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors/tcl/test/Courses/LMSTestCourse02-orig.zip,v
diff -u -r1.1 -r1.1.2.1
Binary files differ
Index: openacs-4/packages/lors/tcl/test/Courses/LMSTestCourse02.zip
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors/tcl/test/Courses/LMSTestCourse02.zip,v
diff -u -r1.1 -r1.1.2.1
Binary files differ
Index: openacs-4/packages/lors/tcl/test/Courses/test.pdf
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors/tcl/test/Courses/test.pdf,v
diff -u -r1.1 -r1.1.2.1
Binary files differ