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.2 --- 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 7 Jun 2006 13:45:19 -0000 1.2 @@ -1,5 +1,5 @@ - + The error was: dont know how to extract Index: openacs-4/packages/lors/catalog/lors.es_ES.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lors/catalog/lors.es_ES.ISO-8859-1.xml,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lors/catalog/lors.es_ES.ISO-8859-1.xml 24 Feb 2005 13:33:21 -0000 1.2 +++ openacs-4/packages/lors/catalog/lors.es_ES.ISO-8859-1.xml 7 Jun 2006 13:45:19 -0000 1.3 @@ -1,5 +1,5 @@ - + El error fue: No puede extraerse Index: openacs-4/packages/lors/catalog/lors.es_GT.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lors/catalog/lors.es_GT.ISO-8859-1.xml,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lors/catalog/lors.es_GT.ISO-8859-1.xml 24 Feb 2005 13:33:21 -0000 1.2 +++ openacs-4/packages/lors/catalog/lors.es_GT.ISO-8859-1.xml 7 Jun 2006 13:45:19 -0000 1.3 @@ -1,5 +1,5 @@ - + El error fue: No puede extraerse 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.7 -r1.8 --- openacs-4/packages/lors/sql/postgresql/lors-imscp-drop.sql 20 Jun 2005 13:04:06 -0000 1.7 +++ openacs-4/packages/lors/sql/postgresql/lors-imscp-drop.sql 7 Jun 2006 13:45:20 -0000 1.8 @@ -2,6 +2,7 @@ -- -- @author Nima Mazloumi (mazloumi@uni-mannheim.de) -- @creation-date 6 Jan 2004 +-- @cvs-id $Id$ -- -- Copyright (C) 2004 Nima Mazloumi @@ -56,24 +57,14 @@ DROP TABLE ims_cp_manifest_class; -- Manifests -DROP TABLE ims_cp_manifests CASCADE; +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; --- Organizations -DROP TABLE ims_cp_organizations CASCADE; - --- Items -DROP TABLE ims_cp_items CASCADE; - --- Resources -DROP TABLE ims_cp_resources CASCADE; - --- Item resources mapping -DROP TABLE ims_cp_items_to_resources; - --- Resource dependencies -DROP SEQUENCE ims_cp_dependencies_seq; -DROP TABLE ims_cp_dependencies; - --- Resource files -DROP TABLE ims_cp_files; - 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.5 --- 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 7 Jun 2006 13:45:20 -0000 1.5 @@ -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 -r1.2 Binary files differ 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 -r1.2 --- openacs-4/packages/lors/sql/postgresql/upgrade/upgrade-0.6d3-0.6d4.sql 20 May 2005 18:47:22 -0000 1.1 +++ openacs-4/packages/lors/sql/postgresql/upgrade/upgrade-0.6d3-0.6d4.sql 7 Jun 2006 13:45:20 -0000 1.2 @@ -1,4 +1,291 @@ -ALTER TABLE ims_cp_manifest_class DROP CONSTRAINT ims_cp_manifest_class_pkey; -ALTER TABLE ims_cp_items ADD sort_order integer; -ALTER TABLE ims_cp_files DROP CONSTRAINT ims_cp_files_file_if_fk; -ALTER TABLE ims_cp_files ADD CONSTRAINT ims_cp_files_file_if_fk FOREIGN KEY (file_id) REFERENCES cr_revisions(revision_id) ON DELETE CASCADE; +-- Create auxiliary tables + +create table ims_cp_manifests_copy ( + man_id integer, + course_name varchar(1000), + identifier varchar(1000), + version varchar(100), + orgs_default varchar(100), + hasmetadata boolean default 'f' not null, + parent_man_id integer, + isscorm boolean, + folder_id integer, + fs_package_id integer, + isshared boolean default 'f' not null +); + +create table ims_cp_organizations_copy ( + org_id integer, + man_id integer, + identifier varchar(100), + structure varchar(100), + title varchar(1000), + hasmetadata boolean default 'f' not null, + isshared boolean default 'f' not null +); + +create table ims_cp_items_copy ( + item_id integer, + org_id integer, + identifier varchar(1000), + identifierref varchar(2000), + isvisible boolean, + parameters varchar(1000), + title varchar(1000), + parent_item integer, + hasmetadata boolean default 'f' not null, + prerequisites_t varchar(100), + prerequisites_s varchar(200), + type varchar(1000), + maxtimeallowed varchar(1000), + timelimitaction varchar(1000), + datafromlms varchar(200), + masteryscore varchar(255), + isshared boolean default 'f' not null +); + +create table ims_cp_resources_copy ( + res_id integer, + man_id integer, + identifier varchar(1000), + type varchar(1000), + href varchar(2000), + hasmetadata boolean default 'f' not null, + scorm_type varchar(1000) +); + +create table ims_cp_files_copy ( + file_id integer, + res_id integer, + pathtofile varchar(2000), + filename varchar(2000), + hasmetadata boolean default 'f' not null +); + +create table ims_cp_items_to_resources_copy ( + item_id integer, + res_id integer, + new_ims_item_id integer, + new_res_id integer +); + +create table ims_cp_manifest_class_copy ( + man_id integer, + lorsm_instance_id integer, + community_id integer, + class_key varchar(100), + isenabled boolean default 't' not null, + istrackable boolean default 'f' not null +); + +-- Make all the inserts + +insert into ims_cp_manifests_copy ( + man_id, + course_name, + identifier, + version, + orgs_default, + hasmetadata, + parent_man_id, + isscorm, + folder_id, + fs_package_id, + isshared +) select * from ims_cp_manifests; + +alter table ims_cp_manifests_copy add package_id integer; + +create function inline_0 () +returns integer as ' +declare +one_manifest record; +begin + for one_manifest in select man_id from ims_cp_manifests_copy + + loop + update ims_cp_manifests_copy + set package_id = ( select context_id + from acs_objects + where object_id = one_manifest.man_id + ) + where man_id = one_manifest.man_id; + end loop; + return 1; +end; +' language 'plpgsql'; + + +select inline_0 (); + +drop function inline_0 (); + +insert into ims_cp_organizations_copy ( + org_id, + man_id, + identifier, + structure, + title, + hasmetadata, + isshared +) select * from ims_cp_organizations; + +insert into ims_cp_items_copy ( + item_id, + org_id, + identifier, + identifierref, + isvisible, + parameters, + title, + parent_item, + hasmetadata, + prerequisites_t, + prerequisites_s, + type, + maxtimeallowed, + timelimitaction, + datafromlms, + masteryscore, + isshared +) select * from ims_cp_items; + +insert into ims_cp_resources_copy ( + res_id, + man_id, + identifier, + type, + href, + hasmetadata, + scorm_type +) select * from ims_cp_resources; + +insert into ims_cp_files_copy ( + file_id, + res_id, + pathtofile, + filename, + hasmetadata +) select * from ims_cp_files; + +insert into ims_cp_items_to_resources_copy ( + item_id, + res_id +) select * from ims_cp_items_to_resources; + +insert into ims_cp_manifest_class_copy ( + man_id, + lorsm_instance_id, + community_id, + class_key, + isenabled, + istrackable +) select * from ims_cp_manifest_class; + + +-- Delete content from original tables + +delete from ims_cp_manifest_class; +delete from ims_cp_items_to_resources; +delete from ims_cp_files; +delete from ims_cp_items; +delete from ims_cp_resources; +delete from ims_cp_organizations; +delete from ims_cp_manifests; + +-- Make all the changes to the tables +alter table ims_cp_manifests drop constraint ims_cp_man_id_fk; +alter table ims_cp_manifests add constraint ims_cp_man_id_fk foreign key (man_id) references cr_revisions(revision_id) on delete cascade; +alter table ims_cp_organizations drop constraint ims_cp_org_id_fk; +alter table ims_cp_organizations add constraint ims_cp_org_id_fk foreign key (org_id) references cr_revisions(revision_id) on delete cascade; +alter table ims_cp_organizations rename title to org_title; +alter table ims_cp_items drop constraint ims_cp_items_item_id_fk; +alter table ims_cp_items rename item_id to ims_item_id; +alter table ims_cp_items rename title to ims_item_title; +alter table ims_cp_items_to_resources rename item_id to ims_item_id; +alter table ims_cp_items add sort_order integer; +alter table ims_cp_items add constraint ims_cp_ims_item_id_fk foreign key (ims_item_id) references cr_revisions(revision_id) on delete cascade; +alter table ims_cp_manifest_class drop constraint ims_cp_manifest_class_pkey; +alter table ims_cp_files drop constraint ims_cp_files_file_if_fk; +alter table ims_cp_files add constraint ims_cp_files_file_if_fk foreign key (file_id) references cr_revisions(revision_id) on delete cascade; + +-- Delete all permissions and acs_objects +delete from acs_permissions where object_id in ( select object_id from acs_objects where object_type like 'ims%' ); +delete from acs_objects where object_type like 'ims%'; + +-- Drop content_types +select content_type__drop_type ( + 'ims_resource', -- content_type + 'f', -- drop_children_p + 'f' -- drop_table_p +); + +select content_type__drop_type ( + 'ims_item', -- content_type + 'f', -- drop_children_p + 'f' -- drop_table_p +); + +select content_type__drop_type ( + 'ims_organization', -- content_type + 'f', -- drop_children_p + 'f' -- drop_table_p +); + +select content_type__drop_type ( + 'ims_manifest', -- content_type + 'f', -- drop_children_p + 'f' -- drop_table_p +); + +-- Create content_types +select content_type__create_type ( + 'ims_manifest_object', -- content_type + 'content_revision', -- supertype. We search revision content + -- first, before item metadata + 'IMS Manifest Object', -- pretty_name + 'IMS Manifest Objects', -- pretty_plural + 'ims_cp_manifests', -- table_name + 'man_id', -- id_column + 'ims_manifest__get_title' -- name_method +); + +select content_type__create_type ( + 'ims_organization_object', -- content_type + 'content_revision', -- supertype. We search revision content + -- first, before item metadata + 'IMS Organization Object', -- pretty_name + 'IMS Organization Objects', -- pretty_plural + 'ims_cp_organizations', -- table_name + 'org_id', -- id_column + 'ims_organization__get_title' -- name_method +); + +select content_type__create_type ( + 'ims_item_object', -- content_type + 'content_revision', -- supertype. We search revision content + -- first, before item metadata + 'IMS Item Object', -- pretty_name + 'IMS Item Objects', -- pretty_plural + 'ims_cp_items', -- table_name + 'ims_item_id', -- id_column + 'ims_item__get_title' -- name_method +); + +select content_type__create_type ( + 'ims_resource_object', -- content_type + 'content_revision', -- supertype. We search revision content + -- first, before item metadata + 'IMS Resource Object', -- pretty_name + 'IMS Resource Objects', -- pretty_plural + 'ims_cp_resources', -- table_name + 'res_id', -- id_column + '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.1 refers to a dead (removed) revision in file `openacs-4/packages/lors/tcl/apm-callbacks-procs.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/lors/tcl/lors-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lors/tcl/lors-callback-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/lors/tcl/lors-callback-procs.tcl 20 May 2005 11:25:39 -0000 1.1 +++ openacs-4/packages/lors/tcl/lors-callback-procs.tcl 7 Jun 2006 13:45:20 -0000 1.2 @@ -18,3 +18,52 @@ @author Eduardo P�rez Ureta (eduardo.perez@uc3m.es) } - + + +#Callbacks for application-track + +ad_proc -callback application-track::getApplicationName -impl lorsm {} { + callback implementation + } { + return "lorsm" + } + +ad_proc -callback application-track::getGeneralInfo -impl lorsm {} { + callback implementation + } { + db_1row my_query { + select count(1) as result + from ( + select distinct l.course_id + from lorsm_student_track l + where l.community_id=:comm_id + group by l.course_id) as t + } + + return "$result" + } +ad_proc -callback application-track::getSpecificInfo -impl lorsm {} { + callback implementation + } { + + upvar $query_name my_query + upvar $elements_name my_elements + + set my_query { + select d.id,i.course_name,l.start_time,l.end_time + from lorsm_student_track l, dotlrn_users d, ims_cp_manifests i + where l.course_id IN + ( + select distinct l.course_id + from lorsm_student_track l + where l.community_id=:class_instance_id + group by l.course_id) + and l.user_id = d.user_id + and l.course_id = i.man_id + } + + set my_elements "" + + return "OK" + } + \ No newline at end of file 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.5 --- 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 7 Jun 2006 13:45:20 -0000 1.5 @@ -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.8 -r1.9 --- openacs-4/packages/lors/tcl/lors-imscp-procs.tcl 26 May 2005 10:39:09 -0000 1.8 +++ openacs-4/packages/lors/tcl/lors-imscp-procs.tcl 7 Jun 2006 13:45:20 -0000 1.9 @@ -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,8 @@ set file_exists [db_0or1row file_ex "select file_id from ims_cp_files where file_id = :file_id and res_id = :res_id"] - if {$file_exists == 0} { - db_transaction { +# db_transaction { set file [db_exec_plsql file_add { select ims_file__new ( :file_id, @@ -887,7 +938,7 @@ ); } ] - } +# } } return $file_id } @@ -1075,7 +1126,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.8 -r1.9 --- openacs-4/packages/lors/tcl/lors-imsmd-procs.tcl 9 Jun 2005 17:11:54 -0000 1.8 +++ openacs-4/packages/lors/tcl/lors-imsmd-procs.tcl 7 Jun 2006 13:45:20 -0000 1.9 @@ -140,7 +140,7 @@ set prefix [[$tree child all imsmd:record] prefix] set lom [$tree child all $var_lom] } elseif { ![empty_string_p [$tree child all adlcp:location]] } { - set doc [dom parse [::tDOM::xmlReadFile $dir/[[$tree child all adlcp:location] text]]] + set doc [dom parse [::tDOM::xmlReadFile $dir/[ns_urldecode [[$tree child all adlcp:location] text]]]] set lom [$doc documentElement] set prefix [$lom prefix] } else { @@ -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.2 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.2 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.2 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.2 Binary files differ