Index: openacs-4/packages/lors/tcl/lors-assessment-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lors/tcl/Attic/lors-assessment-procs.tcl,v diff -u -r1.3.2.2 -r1.3.2.2.2.1 --- openacs-4/packages/lors/tcl/lors-assessment-procs.tcl 5 May 2006 17:23:13 -0000 1.3.2.2 +++ openacs-4/packages/lors/tcl/lors-assessment-procs.tcl 29 Aug 2006 11:36:09 -0000 1.3.2.2.2.1 @@ -35,7 +35,7 @@ # community # FIXME this is a hack until I figure out how to get the # package_id of the assessment of the current community - ad_conn -set package_id [db_string get_assessment_package_id {select dotlrn_community_applets.package_id from dotlrn_community_applets join apm_packages on (dotlrn_community_applets.package_id=apm_packages.package_id) where community_id = :community_id and package_key='assessment'}] + ad_conn -set package_id [db_string get_assessment_package_id {}] # Read the content of the temporary directory foreach file_i [ glob -directory $tmpdirectory *{.xml} ] { Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lors/tcl/lors-assessment-procs.xql'. 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-cr-procs-oracle.xql'. 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-cr-procs-postgresql.xql'. 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.2.2 -r1.4.2.2.2.1 --- openacs-4/packages/lors/tcl/lors-cr-procs.tcl 7 Jun 2006 13:50:59 -0000 1.4.2.2 +++ openacs-4/packages/lors/tcl/lors-cr-procs.tcl 29 Aug 2006 11:36:09 -0000 1.4.2.2.2.1 @@ -99,10 +99,10 @@ # create the folder - set folder_id [db_exec_plsql folder_create { - select lors__new_folder (:name, :folder_name, :parent_id, :user_id, :creation_ip); - }] + set folder_id [db_exec_plsql folder_create {}] + + content::folder::register_content_type -folder_id $folder_id -content_type "content_revision" \ -include_subtypes "t" content::folder::register_content_type -folder_id $folder_id -content_type "content_folder" \ @@ -169,7 +169,7 @@ set file_size [cr_file_size $cr_file] # 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" + db_dml update_revi {} # } @@ -189,5 +189,5 @@ set package_id [ad_conn package_id] set folder_id [fs_get_root_folder -package_id $package_id] } - return [db_exec_plsql get_item_id "select content_item__get_id ( :name, :folder_id, 'f' )"] + return [db_exec_plsql get_item_id {}] } \ No newline at end of file Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lors/tcl/lors-cr-procs.xql'. 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-imscp-procs-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/lors/tcl/lors-imscp-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lors/tcl/lors-imscp-procs-postgresql.xql,v diff -u -r1.1 -r1.1.4.1 --- openacs-4/packages/lors/tcl/lors-imscp-procs-postgresql.xql 26 Feb 2005 20:03:06 -0000 1.1 +++ openacs-4/packages/lors/tcl/lors-imscp-procs-postgresql.xql 29 Aug 2006 11:36:09 -0000 1.1.4.1 @@ -3,20 +3,158 @@ postgresql7.1 - + - select ims_manifest__new ( - :man_id, - :identifier, - :version, - :orgs_default, - :hasmetadata, - :parent_man_id, - current_timestamp, - :user_id, - :creation_ip, - :package_id - ) + select ims_manifest__new ( + :course_name, + :identifier, + :version, + :orgs_default, + :hasmetadata, + :parent_man_id, + :isscorm, + :content_folder_id, + :fs_package_id, + current_timestamp, + :user_id, + :creation_ip, + :package_id, + :community_id, + :class_key, + :revision_id, + :isshared, + :course_presentation_format + ) + + + + select ims_organization__new ( + :org_id, + :man_id, + :identifier, + :structure, + :title, + :hasmetadata, + current_timestamp, + :user_id, + :creation_ip, + :package_id, + :revision_id + ) + + + + + + select ims_organization__delete ( + :org_id + ) + + + + + + select ims_item__new ( + :item_id, + :org_id, + :identifier, + :identifierref, + :isvisible, + :parameters, + :title, + :parent_item, + :hasmetadata, + :prerequisites_t, + :prerequisites_s, + :type, + :maxtimeallowed, + :timelimitaction, + :datafromlms, + :masteryscore, + current_timestamp, + :user_id, + :creation_ip, + :package_id, + :revision_id + ) + + + + + + select ims_item__delete ( + :item_id + ) + + + + + + select ims_resource__new ( + :res_id, + :man_id, + :identifier, + :type, + :href, + :scorm_type, + :hasmetadata, + current_timestamp, + :user_id, + :creation_ip, + :package_id, + :revision_id + ) + + + + + + select ims_resource__delete ( + :res_id + ) + + + + + + select ims_cp_item_to_resource__new ( + :item_id, + :res_id + ) + + + + + + select ims_dependency__new ( + :dep_id, + :res_id, + :identifierref + ) + + + + + + select ims_dependency__delete ( + :dep_id + ) + + + + + + + select ims_file__new ( + :file_id, + :res_id, + :pathtofile, + :filename, + :hasmetadata + ) + + + 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 -r1.7.2.3.2.1 --- openacs-4/packages/lors/tcl/lors-imscp-procs.tcl 7 Jun 2006 13:50:59 -0000 1.7.2.3 +++ openacs-4/packages/lors/tcl/lors-imscp-procs.tcl 29 Aug 2006 11:36:09 -0000 1.7.2.3.2.1 @@ -264,9 +264,7 @@ } else { set item_id $version_id - set isshared [db_string get_isshared "select im.isshared from ims_cp_manifests im where im.man_id = ( - select live_revision from cr_items where item_id = :version_id - ) "] + set isshared [db_string get_isshared {}] } set revision_id [content::revision::new -title $name -content_type $content_type -creation_user $user_id \ @@ -276,31 +274,8 @@ # additional information as before # db_transaction { - set manifest_id [db_exec_plsql new_manifest { - select ims_manifest__new ( - :course_name, - :identifier, - :version, - :orgs_default, - :hasmetadata, - :parent_man_id, - :isscorm, - :content_folder_id, - :fs_package_id, - current_timestamp, - :user_id, - :creation_ip, - :package_id, - :community_id, - :class_key, - :revision_id, - :isshared, - :course_presentation_format - ); + set manifest_id [db_exec_plsql new_manifest {} ] - } - ] - # } return $manifest_id @@ -324,7 +299,7 @@ # 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"] { + foreach file_item_id [db_list get_files {} ] { # delete related file_storage files content::item::delete -item_id $file_item_id } @@ -333,16 +308,8 @@ # 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)" + foreach item_id [db_list get_items {} ] { + db_dml delete_map {} # ad_return_complaint 1 "item_id $item_id ims_item_id $ims_item_id" content::item::delete -item_id $item_id } @@ -351,25 +318,25 @@ # 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"] { + foreach res_item_id [db_list get_res {} ] { 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" + db_dml delete_cmi {} # remove rows in lorsm_student_track - db_dml delete_track "delete from lorsm_student_track where course_id = :man_id" + db_dml delete_track {} # 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)" + foreach org_item_id [db_list get_org {} ] { + db_dml delete_map_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" + db_dml delete_manifest_class {} } @@ -432,24 +399,8 @@ -creation_ip $creation_ip -item_id $item_id -is_live "t"] # db_transaction { - set organization_id [db_exec_plsql new_organization { - select ims_organization__new ( - :org_id, - :man_id, - :identifier, - :structure, - :title, - :hasmetadata, - current_timestamp, - :user_id, - :creation_ip, - :package_id, - :revision_id - ); + set organization_id [db_exec_plsql new_organization {} ] - } - ] - # } return $organization_id } @@ -463,14 +414,8 @@ @author Ernie Ghiglione (ErnieG@mm.st) } { # db_transaction { - set ret [db_exec_plsql delete_organization { - select ims_organization__delete ( - :org_id - ); + set ret [db_exec_plsql delete_organization {} ] - } - ] - # } return $ret } @@ -562,34 +507,8 @@ -creation_ip $creation_ip -item_id $cr_item_id -is_live "t"] # db_transaction { - set item_id [db_exec_plsql new_item { - select ims_item__new ( - :item_id, - :org_id, - :identifier, - :identifierref, - :isvisible, - :parameters, - :title, - :parent_item, - :hasmetadata, - :prerequisites_t, - :prerequisites_s, - :type, - :maxtimeallowed, - :timelimitaction, - :datafromlms, - :masteryscore, - current_timestamp, - :user_id, - :creation_ip, - :package_id, - :revision_id - ); + set item_id [db_exec_plsql new_item {} ] - } - ] - # } if {![empty_string_p $dotlrn_permission]} { @@ -641,14 +560,8 @@ @author Ernie Ghiglione (ErnieG@mm.st) } { # db_transaction { - set ret [db_exec_plsql delete_item { - select ims_item__delete ( - :item_id - ); + set ret [db_exec_plsql delete_item {} ] - } - ] - # } return $ret } @@ -788,25 +701,8 @@ -creation_ip $creation_ip -item_id $item_id -is_live "t"] # db_transaction { - set resource_id [db_exec_plsql new_resource { - select ims_resource__new ( - :res_id, - :man_id, - :identifier, - :type, - :href, - :scorm_type, - :hasmetadata, - current_timestamp, - :user_id, - :creation_ip, - :package_id, - :revision_id - ); + set resource_id [db_exec_plsql new_resource {} ] - } - ] - # } return $resource_id } @@ -820,13 +716,8 @@ @author Ernie Ghiglione (ErnieG@mm.st) } { # db_transaction { - set ret [db_exec_plsql delete_resource { - select ims_resource__delete ( - :res_id - ); + set ret [db_exec_plsql delete_resource {} ] - } - ] # } return $ret } @@ -842,13 +733,8 @@ @author Ernie Ghiglione (ErnieG@mm.st) } { # db_transaction { - set item_to_resource [db_exec_plsql item_to_resources_add { - select ims_cp_item_to_resource__new ( - :item_id, - :res_id - ); - } - ] + set item_to_resource [db_exec_plsql item_to_resources_add {} ] + # } return $item_to_resource } @@ -866,14 +752,7 @@ } { # db_transaction { set dep_id [db_nextval ims_cp_dependencies_seq] - set dependency [db_exec_plsql dependency_add { - select ims_dependency__new ( - :dep_id, - :res_id, - :identifierref - ); - } - ] + set dependency [db_exec_plsql dependency_add {} ] # } return $dep_id } @@ -887,13 +766,7 @@ @author Ernie Ghiglione (ErnieG@mm.st) } { # db_transaction { - set ret [db_exec_plsql delete_resource { - select ims_dependency__delete ( - :dep_id - ); - - } - ] + set ret [db_exec_plsql delete_resource {} ] # } return $ret } @@ -924,21 +797,12 @@ # catch that before we try to insert them again under the same # resource - set file_exists [db_0or1row file_ex "select file_id from ims_cp_files where file_id = :file_id and res_id = :res_id"] + set file_exists [db_0or1row file_ex {} ] ns_log notice "DAVEB99 file_add file_id='${file_id}'" if {$file_exists == 0} { # db_transaction { - set file [db_exec_plsql file_add { - select ims_file__new ( - :file_id, - :res_id, - :pathtofile, - :filename, - :hasmetadata - ); - } - ] + set file [db_exec_plsql file_add {} ] # } } return $file_id @@ -1171,7 +1035,7 @@ } # get the title from acs objects - db_1row get_object "select object_type, title from acs_objects where object_id=:object_id" -column_array object + db_1row get_object {} -column_array object if {$title eq ""} { set title $object(title) } @@ -1209,7 +1073,7 @@ @error } { - db_1row get_object "select object_type, title from acs_objects where object_id=:object_id" -column_array object + db_1row get_object {} -column_array object if {$object(object_type) eq "content_item"} { set object(object_type) [content::item::content_type -item_id $object_id] } Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lors/tcl/lors-imscp-procs.xql'. Fisheye: No comparison available. Pass `N' to diff? 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.3 -r1.6.2.3.2.1 --- openacs-4/packages/lors/tcl/lors-imsmd-procs.tcl 5 May 2006 17:23:14 -0000 1.6.2.3 +++ openacs-4/packages/lors/tcl/lors-imsmd-procs.tcl 29 Aug 2006 11:36:09 -0000 1.6.2.3.2.1 @@ -1322,11 +1322,11 @@ foreach entity $p_entities { - set p_ims_md_lf_cont_enti_id [db_nextval ims_md_life_cycle_contrib_entity_seq] + set p_ims_md_lf_cont_enti_id [db_nextval ims_md_lf_c_contrib_enty_seq] set p_entity $entity db_dml add_new_lifecycle_contrib_entity { - insert into ims_md_life_cycle_contrib_entity (ims_md_lf_cont_enti_id, ims_md_lf_cont_id, entity) + insert into ims_md_life_cycle_contrib_enty (ims_md_lf_cont_enti_id, ims_md_lf_cont_id, entity) values (:p_ims_md_lf_cont_enti_id, :p_ims_md_lf_cont_id, :p_entity) } @@ -1378,7 +1378,7 @@ set p_cont_date_l [lindex [lindex [lindex $contribute 2] 1] 0] set p_cont_date_s [lindex [lindex [lindex $contribute 2] 1] 1] - set p_ims_md_md_cont_enti_id [db_nextval ims_md_metadata_contrib_entity_seq] + set p_ims_md_md_cont_enti_id [db_nextval ims_md_meta_contrib_enty_seq] set p_entity [lindex [lindex $contribute 1] 0] db_dml add_new_metadata_contrib { @@ -1432,23 +1432,15 @@ set requirements [lors::imsmd::mdTechnical -element requirement -node $lom -prefix $prefix] # Adds Technical size, installation remarks, otherplatformrequirements, duration - db_dml add_new_technical { - insert into ims_md_technical (ims_md_id, t_size, instl_rmrks_l, instl_rmrks_s, otr_plt_l, otr_plt_s, duration, duration_l, duration_s) - values - (:p_ims_md_id, :p_size, :p_instl_rmks_l, :p_instl_rmks_s, :p_otr_plt_l, :p_otr_plt_s, :p_duration, :p_duration_l, :p_duration_s) - } + db_dml add_new_technical {} # Adds Technical Format foreach format $formats { set p_ims_md_te_fo_id [db_nextval ims_md_technical_format_seq] set p_format $format - db_dml add_new_technical_format { - insert into ims_md_technical_format (ims_md_te_fo_id, ims_md_id, format) - values - (:p_ims_md_te_fo_id, :p_ims_md_id, :p_format) - } + db_dml add_new_technical_format {} } # Adds Technical Location @@ -1458,29 +1450,21 @@ set p_type [lindex $location 1] set p_location [lindex $location 0] - db_dml add_new_technical_location { - insert into ims_md_technical_location (ims_md_te_lo_id, ims_md_id, type, location) - values - (:p_ims_md_te_lo_id, :p_ims_md_id, :p_type, :p_location) - } + db_dml add_new_technical_location {} } # Adds Technical Requirements foreach requirement $requirements { - set p_ims_md_te_rq_id [db_nextval ims_md_technical_requirement_seq] + set p_ims_md_te_rq_id [db_nextval ims_md_tech_requirement_seq] set p_type_s [lindex [lindex [lindex $requirement 0] 0] 1] set p_type_v [lindex [lindex [lindex $requirement 0] 1] 1] set p_name_s [lindex [lindex [lindex $requirement 1] 0] 1] set p_name_v [lindex [lindex [lindex $requirement 1] 1] 1] set p_min_version [lindex $requirement 2] set p_max_version [lindex $requirement 3] - db_dml add_new_technical_requirement { - insert into ims_md_technical_requirement (ims_md_te_rq_id, ims_md_id, type_s, type_v, name_s, name_v, min_version, max_version) - values - (:p_ims_md_te_rq_id, :p_ims_md_id, :p_type_s, :p_type_v, :p_name_s, :p_name_v, :p_min_version, :p_max_version) - } + db_dml add_new_technical_requirement {} } @@ -1523,23 +1507,15 @@ # Adds Educational interactivitytype, interactivitylevel, semanticdensity, difficulty, typical_learning_time - db_dml add_new_educational { - insert into ims_md_educational (ims_md_id, int_type_s, int_type_v, int_level_s, int_level_v, sem_density_s, sem_density_v, difficulty_s, difficulty_v, type_lrn_time, type_lrn_time_l, type_lrn_time_s) - values - (:p_ims_md_id, :p_int_type_s, :p_int_type_v, :p_int_level_s, :p_int_level_v, :p_sem_density_s, :p_sem_density_v, :p_difficulty_s, :p_difficulty_v, :p_type_lrn_time, :p_type_lrn_time_l, :p_type_lrn_time_s) - } + db_dml add_new_educational {} # Adds descriptions foreach descrip $descrips { set p_ims_md_ed_de_id [db_nextval ims_md_educational_descrip_seq] set p_descrip_l [lindex $descrip 0] set p_descrip_s [lindex $descrip 1] - db_dml add_new_descriptions { - insert into ims_md_educational_descrip (ims_md_ed_de_id, ims_md_id, descrip_l, descrip_s) - values - (:p_ims_md_ed_de_id, :p_ims_md_id, :p_descrip_l, :p_descrip_s) - } + db_dml add_new_descriptions {} } # Adds learningresourcetype @@ -1548,11 +1524,7 @@ set p_lrt_s [lindex [lindex $lrt 0] 1] set p_lrt_v [lindex [lindex $lrt 1] 1] - db_dml add_new_learningresourcetypes { - insert into ims_md_educational_lrt (ims_md_ed_lr_id, ims_md_id, lrt_s, lrt_v) - values - (:p_ims_md_ed_lr_id, :p_ims_md_id, :p_lrt_s, :p_lrt_v) - } + db_dml add_new_learningresourcetypes {} } # Adds intendedenduserrole @@ -1561,11 +1533,7 @@ set p_ieur_s [lindex [lindex $ieur 0] 1] set p_ieur_v [lindex [lindex $ieur 1] 1] - db_dml add_new_intendedenduserroles { - insert into ims_md_educational_ieur (ims_md_ed_ie_id, ims_md_id, ieur_s, ieur_v) - values - (:p_ims_md_ed_ie_id, :p_ims_md_id, :p_ieur_s, :p_ieur_v) - } + db_dml add_new_intendedenduserroles {} } # Adds context @@ -1574,11 +1542,7 @@ set p_context_s [lindex [lindex $context 0] 1] set p_context_v [lindex [lindex $context 1] 1] - db_dml add_new_context { - insert into ims_md_educational_context (ims_md_ed_co_id, ims_md_id, context_s, context_v) - values - (:p_ims_md_ed_co_id, :p_ims_md_id, :p_context_s, :p_context_v) - } + db_dml add_new_context {} } # Adds typicalagerange @@ -1587,23 +1551,15 @@ set p_tar_l [lindex $tar 0] set p_tar_s [lindex $tar 1] - db_dml add_new_typicalagerange { - insert into ims_md_educational_tar (ims_md_ed_ta_id, ims_md_id, tar_l, tar_s) - values - (:p_ims_md_ed_ta_id, :p_ims_md_id, :p_tar_l, :p_tar_s) - } + db_dml add_new_typicalagerange {} } # Adds Languages foreach lang $languages { set p_ims_md_ed_la_id [db_nextval ims_md_educational_lang_seq] set p_language $lang - db_dml add_new_language { - insert into ims_md_educational_lang (ims_md_ed_la_id, ims_md_id, language) - values - (:p_ims_md_ed_la_id, :p_ims_md_id, :p_language) - } + db_dml add_new_language {} } # Rights @@ -1621,11 +1577,7 @@ set p_descrip_l [lindex [lindex $p_descrip 0] 0] set p_descrip_s [lindex [lindex $p_descrip 0] 1] - db_dml add_new_rights { - insert into ims_md_rights (ims_md_id, cost_s, cost_v, caor_s, caor_v, descrip_l, descrip_s) - values - (:p_ims_md_id, :p_cost_s, :p_cost_v, :p_caor_s, :p_caor_v, :p_descrip_l, :p_descrip_s) - } + db_dml add_new_rights {} # Relation @@ -1639,40 +1591,27 @@ set p_kind_v [lindex [lindex [lindex [lindex $relation 0] 0] 1] 1] # Adds kind - db_dml add_new_relation { - insert into ims_md_relation (ims_md_re_id, ims_md_id, kind_s, kind_v) - values - (:p_ims_md_re_id, :p_ims_md_id, :p_kind_s, :p_kind_v) - } + db_dml add_new_relation {} set p_ims_md_re_re_id [db_nextval ims_md_relation_resource_seq] set p_descrip_l [lindex [lindex [lindex $relation 1] 0] 0] set p_descrip_s [lindex [lindex [lindex $relation 1] 0] 1] # adds description to resource - db_dml add_new_relation_descrip { - insert into ims_md_relation_resource (ims_md_re_re_id, ims_md_re_id, identifier, descrip_l, descrip_s) - values - (:p_ims_md_re_re_id, :p_ims_md_re_id, null, :p_descrip_l, :p_descrip_s) - } + db_dml add_new_relation_descrip {} # catalogentries set catalogentries [lindex $relation 2] # adds catalogentries foreach catalogentry $catalogentries { - set p_ims_md_re_re_ca_id [db_nextval ims_md_relation_resource_catalog_seq] + set p_ims_md_re_re_ca_id [db_nextval ims_md_rel_resource_cat_seq] set p_catalog [lindex $catalogentry 0] set p_entry_l [lindex [lindex $catalogentry 1] 0] set p_entry_s [lindex [lindex $catalogentry 1] 1] - db_dml add_new_catalogentry { - - insert into ims_md_relation_resource_catalog (ims_md_re_re_ca_id, ims_md_re_re_id, catalog, entry_l, entry_s) - values - (:p_ims_md_re_re_ca_id, :p_ims_md_re_re_id, :p_catalog, :p_entry_l, :p_entry_s) - } + db_dml add_new_catalogentry {} } } @@ -1690,23 +1629,15 @@ set p_descriptions [lindex $annotation 2] - db_dml add_new_annotation { - insert into ims_md_annotation (ims_md_an_id, ims_md_id, entity, date, date_l, date_s) - values - (:p_ims_md_an_id, :p_ims_md_id, :p_entity, :p_date, :p_date_l, :p_date_s) - } + db_dml add_new_annotation {} foreach description $p_descriptions { set p_ims_md_an_de_id [db_nextval ims_md_annotation_descrip_seq] set p_descrip_l [lindex $description 0] set p_descrip_s [lindex $description 1] - db_dml add_new_ann_descriptions { - insert into ims_md_annotation_descrip (ims_md_an_de_id, ims_md_an_id, descrip_l, descrip_s) - values - (:p_ims_md_an_de_id, :p_ims_md_an_id, :p_descrip_l, :p_descrip_s) - } + db_dml add_new_ann_descriptions {} } @@ -1724,11 +1655,7 @@ set p_purpose_s [lindex [lindex [lindex [lindex [lindex $class 0] 0] 0] 0] 1] set p_purpose_v [lindex [lindex [lindex [lindex [lindex $class 0] 0] 0] 1] 1] - db_dml add_new_classification { - insert into ims_md_classification (ims_md_cl_id, ims_md_id, purpose_s, purpose_v) - values - (:p_ims_md_cl_id, :p_ims_md_id, :p_purpose_s, :p_purpose_v) - } + db_dml add_new_classification {} # description set descriptions [lindex [lindex $class 0] 1] @@ -1738,11 +1665,7 @@ set p_descrip_l [lindex $desc 0] set p_descrip_s [lindex $desc 1] - db_dml add_new_description { - insert into ims_md_classification_descrip (ims_md_cl_de_id, ims_md_cl_id, descrip_l, descrip_s) - values - (:p_ims_md_cl_de_id, :p_ims_md_cl_id, :p_descrip_l, :p_descrip_s) - } + db_dml add_new_description {} } # taxonpath @@ -1754,29 +1677,21 @@ set p_source_l [lindex [lindex $p_source 0] 0] set p_source_s [lindex [lindex $p_source 0] 1] - set p_ims_md_cl_ta_id [db_nextval ims_md_classification_taxpath_seq] + set p_ims_md_cl_ta_id [db_nextval ims_md_classif_taxpath_seq] set taxons [lindex $taxonpath 1] - db_dml add_new_taxonpaths { - insert into ims_md_classification_taxpath (ims_md_cl_ta_id, ims_md_cl_id, source_l, source_v) - values - (:p_ims_md_cl_ta_id, :p_ims_md_cl_id, :p_source_l, :p_source_s) - } + db_dml add_new_taxonpaths {} foreach taxon $taxons { - set p_ims_md_cl_ta_ta_id [db_nextval ims_md_classification_taxpath_taxon_seq] + set p_ims_md_cl_ta_ta_id [db_nextval ims_md_classif_tpath_taxon_seq] set p_hierarchy [lindex $taxon 0] set p_identifier [lindex $taxon 1] set p_entry_l [lindex [lindex $taxon 2] 0] set p_entry_s [lindex [lindex $taxon 2] 1] - db_dml add_new_taxons { - insert into ims_md_classification_taxpath_taxon (ims_md_cl_ta_ta_id, ims_md_cl_ta_id, hierarchy, identifier, entry_l, entry_s) - values - (:p_ims_md_cl_ta_ta_id, :p_ims_md_cl_ta_id, :p_hierarchy, :p_identifier, :p_entry_l, :p_entry_s) - } + db_dml add_new_taxons {} } } @@ -1785,15 +1700,11 @@ set keywords [lindex [lindex $class 0] 3] foreach keyword $keywords { - set p_ims_md_cl_ke_id [db_nextval ims_md_classification_keyword_seq] + set p_ims_md_cl_ke_id [db_nextval ims_md_classif_keyword_seq] set p_keyword_l [lindex $keyword 0] set p_keyword_s [lindex $keyword 1] - db_dml add_new_keywords { - insert into ims_md_classification_keyword (ims_md_cl_ke_id, ims_md_cl_id, keyword_l, keyword_s) - values - (:p_ims_md_cl_ke_id, :p_ims_md_cl_id, :p_keyword_l, :p_keyword_s) - } + db_dml add_new_keywords {} } } # } on_error { @@ -1875,11 +1786,7 @@ lors::imsmd::delMD -acs_object $p_ims_md_id # db_transaction { - db_dml add_md { - insert into ims_md (ims_md_id, schema, schemaversion) - values - (:p_ims_md_id, :p_schema, :p_schemaversion) - } + db_dml add_md {} # } on_error { # ad_return_error "[_ lors.lt_Transaction_Error_in__1] " " [_ lors._The] $errmsg" # } @@ -1896,13 +1803,11 @@ set p_ims_md_id $acs_object # if record exists... - if {[db_0or1row check_md_record {select ims_md_id from ims_md where ims_md_id = :p_ims_md_id}]} { + if {[db_0or1row check_md_record {}]} { # ... then delete it # db_transaction { - db_dml add_md { - delete from ims_md where ims_md_id = :p_ims_md_id - } + db_dml delete_md {} # } on_error { # ad_return_error "[_ lors.lt_Transaction_deleting_]" "[_ lors.The_error_was] $errmsg" # } @@ -1922,7 +1827,7 @@ set p_ims_md_id $ims_md_id # if record exists... returns 1 - return [db_0or1row check_md_record {select ims_md_id from ims_md where ims_md_id = :p_ims_md_id}] + return [db_0or1row check_md_record {}] } Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lors/tcl/lors-imsmd-procs.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/lors/tcl/lors-imsmd-sc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lors/tcl/lors-imsmd-sc-procs.tcl,v diff -u -r1.2.2.1 -r1.2.2.1.2.1 --- openacs-4/packages/lors/tcl/lors-imsmd-sc-procs.tcl 5 May 2006 17:23:14 -0000 1.2.2.1 +++ openacs-4/packages/lors/tcl/lors-imsmd-sc-procs.tcl 29 Aug 2006 11:36:09 -0000 1.2.2.1.2.1 @@ -29,7 +29,7 @@ # languages. We get them all here. set titles "" - db_foreach title {select title_l, title_s from ims_md_general_title where ims_md_id = :ims_md_id} { + db_foreach title {} { if {![empty_string_p $title_l]} { append titles "$title_s ($title_l) " @@ -44,7 +44,7 @@ set descriptions "" - db_foreach description {select descrip_l, descrip_s from ims_md_general_desc where ims_md_id = :ims_md_id} { + db_foreach description {} { if {![empty_string_p $descrip_l]} { append descriptions "$descrip_s ($descrip_l) " @@ -62,7 +62,7 @@ # LOM General Keywords set keywords "" - db_foreach keyword {select keyword_l, keyword_s from ims_md_general_key where ims_md_id = :ims_md_id} { + db_foreach keyword {} { if {![empty_string_p $keyword_l]} { append keywords "$keyword_s ($keyword_l) " Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lors/tcl/lors-imsmd-sc-procs.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/lors/tcl/lors-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lors/tcl/lors-test-procs.tcl,v diff -u -r1.1.2.1 -r1.1.2.1.2.1 --- openacs-4/packages/lors/tcl/lors-test-procs.tcl 5 May 2006 17:23:14 -0000 1.1.2.1 +++ openacs-4/packages/lors/tcl/lors-test-procs.tcl 29 Aug 2006 11:36:09 -0000 1.1.2.1.2.1 @@ -26,7 +26,7 @@ # get fs_package_id (where?) set fs_package_id "" # get package_id - set __package_id [db_string get_package "select package_id from apm_packages where package_key='lorsm' limit 1"] + set __package_id [db_string get_package {}] # get community_id # create a new manifest