Index: openacs-4/packages/lorsm/lib/md-record.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/lib/md-record.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/lib/md-record.tcl 17 Nov 2008 13:36:43 -0000 1.2
+++ openacs-4/packages/lorsm/lib/md-record.tcl 12 Dec 2008 14:25:31 -0000 1.3
@@ -57,16 +57,8 @@
}
}
-db_multirow d_pres select_ge_titles {
- select object_type
- from acs_objects
- where object_id = :ims_md_id
-}
+db_multirow d_pres select_ge_titles {}
-db_multirow -extend { schema_and_version } d_pres select_schema_details {
- select ims_md_id, schema, schemaversion
- from ims_md
- where ims_md_id = :ims_md_id
-} {
+db_multirow -extend { schema_and_version } d_pres select_schema_details {} {
set schema_and_version [concat $schema " " $schemaversion]
}
Index: openacs-4/packages/lorsm/lib/md-record.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/lib/md-record.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/lib/md-record.xql 12 Dec 2008 14:25:32 -0000 1.1
@@ -0,0 +1,20 @@
+
+
+
+
+
+ select object_type
+ from acs_objects
+ where object_id = :ims_md_id
+
+
+
+
+
+ select ims_md_id, schema, schemaversion
+ from ims_md
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/lib/repository-shared-courses.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/lib/repository-shared-courses.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/lorsm/lib/repository-shared-courses.tcl 17 Nov 2008 13:36:43 -0000 1.6
+++ openacs-4/packages/lorsm/lib/repository-shared-courses.tcl 12 Dec 2008 14:25:32 -0000 1.7
@@ -70,29 +70,7 @@
}
}
-db_multirow -extend { ims_md_id community_url } d_courses select_d_courses {
- select
- cp.man_id,
- cp.course_name,
- cp.identifier,
- cp.version,
- case
- when hasmetadata = 't' then 'Yes'
- else 'No'
- end as hasmetadata,
- cp.fs_package_id,
- cp.folder_id,
- acs.creation_user,
- acs.creation_date,
- acs.context_id
- from ims_cp_manifests cp, acs_objects acs
- where cp.man_id = acs.object_id
- and cp.isshared = 't'
- and cp.man_id in ( select cr.live_revision
- from cr_items cr
- where content_type = 'ims_manifest_object' )
- order by acs.creation_date desc
-} {
+db_multirow -extend { ims_md_id community_url } d_courses select_d_courses { } {
set ims_md_id $man_id
set community_url $com_url
}
Index: openacs-4/packages/lorsm/lib/repository-shared-courses.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/lib/repository-shared-courses.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/lib/repository-shared-courses.xql 12 Dec 2008 14:25:32 -0000 1.1
@@ -0,0 +1,23 @@
+
+
+
+
+
+ select cp.man_id, cp.course_name, cp.identifier, cp.version,
+
+ case when hasmetadata = 't' then 'Yes'
+ else 'No'
+ end as hasmetadata,
+
+ cp.fs_package_id, cp.folder_id, acs.creation_user, acs.creation_date, acs.context_id
+ from ims_cp_manifests cp, acs_objects acs
+ where cp.man_id = acs.object_id
+ and cp.isshared = 't'
+ and cp.man_id in ( select cr.live_revision
+ from cr_items cr
+ where content_type = 'ims_manifest_object' )
+ order by acs.creation_date desc
+
+
+
+
Index: openacs-4/packages/lorsm/lib/user-lorsm.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/lib/user-lorsm.tcl,v
diff -u -r1.25 -r1.26
--- openacs-4/packages/lorsm/lib/user-lorsm.tcl 17 Nov 2008 13:36:43 -0000 1.25
+++ openacs-4/packages/lorsm/lib/user-lorsm.tcl 12 Dec 2008 14:25:32 -0000 1.26
@@ -119,16 +119,9 @@
if { [string eq $format_name "default"] } {
# micheles
- set context [site_node::get_url_from_object_id -object_id $lorsm_instance_id]
- if ([db_0or1row query "
- select
- cp.man_id,
- case
- when upper(scorm_type) = 'SCO' then 'delivery-scorm'
- else 'delivery'
- end as needscorte
- from ims_cp_manifests cp left join (select man_id, max(scorm_type) as scorm_type from ims_cp_resources group by man_id ) as cpr using (man_id)
- where cp.man_id = :man_id "]) {
+ set context [site_node::get_url_from_object_id \
+ -object_id $lorsm_instance_id]
+ if ([db_0or1row query {}]) {
ns_log Debug "lorsm - $needscorte"
set delivery_method delivery
set course_url_url [export_vars \
@@ -150,7 +143,7 @@
set course_url "NO RESOURCES ERROR"
}
} else {
- set course_url "$course_name"
}
@@ -159,24 +152,7 @@
#the code, differentely than above, check the delivery method as per above
# Get the course name
- if {[db_0or1row manifest "
- select
- cp.course_name,
- cp.fs_package_id,
- isscorm,
- pf.folder_name,
- pf.format_name,
- case
- when upper(scorm_type) = 'SCO' then 'delivery-scorm'
- else 'delivery'
- end as deliverymethod
- from ims_cp_manifests cp left join (select man_id, max(scorm_type)
- as scorm_type from ims_cp_resources group by man_id )
- as cpr using (man_id) ,
- lorsm_course_presentation_formats pf
- where cp.man_id = :man_id
- and cp.parent_man_id = 0
- and cp.course_presentation_format = pf.format_id "]} {
+ if {[db_0or1row manifest {}]} {
# Course Name
if {[empty_string_p $course_name]} {
set course_name "No Course Name"
@@ -189,17 +165,7 @@
if { [string equal $deliverymethod "delivery-scorm"] } {
set icon ""
- if { ! [ db_0or1row isanysuspendedsession "select lorsm.track_id as track_id,
- cmi.lesson_status as lesson_status from
- lorsm_student_track lorsm, lorsm_cmi_core cmi
- where lorsm.user_id = $user_id
- and lorsm.community_id = $community_id
- and lorsm.course_id = $man_id
- and lorsm.track_id = cmi.track_id
- and cmi.man_id = $man_id
- and cmi.item_id = $man_id
- order by lorsm.track_id desc
- limit 1" ] } {
+ if { ! [ db_0or1row isanysuspendedsession {} ] } {
#item has no track for the user
#the icon should be the same as per "not yet visited"
append icon "
-
-
- select
- cp.man_id,
- cp.course_name,
- cp.identifier,
- cp.version,
- cp.fs_package_id,
- case when cp.fs_package_id is null then 't'
- else 'f'
- end as lorsm_p,
- cp.folder_id,
- acs.creation_user,
- acs.creation_date,
- pf.folder_name,
- pf.format_name,
- acs.context_id,
- cpmc.community_id,
- cpmc.lorsm_instance_id
- from
- ims_cp_manifests cp,
- acs_objects acs,
- ims_cp_manifest_class cpmc,
- lorsm_course_presentation_formats pf
- where
- cp.man_id = acs.object_id
- and
- cp.man_id = cpmc.man_id
- and
- cpmc.lorsm_instance_id = :package
- $extra_query
- and
- cpmc.isenabled = 't'
- and
- pf.format_id = cp.course_presentation_format
- order by acs.creation_date desc
-
-
+
+
+ select
+ cp.man_id, cp.course_name, cp.identifier, cp.version, cp.fs_package_id,
-
-
+ case when cp.fs_package_id is null then 't'
+ else 'f'
+ end as lorsm_p,
+
+ cp.folder_id, acs.creation_user, acs.creation_date, pf.folder_name,
+ pf.format_name, acs.context_id, cpmc.community_id, cpmc.lorsm_instance_id
+ from ims_cp_manifests cp, acs_objects acs, ims_cp_manifest_class cpmc, lorsm_course_presentation_formats pf
+ where cp.man_id = acs.object_id
+ and cp.man_id = cpmc.man_id
+ and cpmc.lorsm_instance_id = :package
+ $extra_query
+ and cpmc.isenabled = 't'
+ and pf.format_id = cp.course_presentation_format
+ order by acs.creation_date desc
+
+
+
+
+
select v.last_viewed
- from views_views v,
- ims_cp_items i,
- ims_cp_organizations o
- where v.viewer_id = :user_id
- and v.object_id = i.ims_item_id
- and i.org_id = o.org_id
- and o.man_id = :man_id
+ from views_views v, ims_cp_items i, ims_cp_organizations o
+ where v.viewer_id = :user_id
+ and v.object_id = i.ims_item_id
+ and i.org_id = o.org_id
+ and o.man_id = :man_id
order by v.last_viewed desc
limit 1
-
-
+
+
-
-
+
+
select i.ims_item_id
- from ims_cp_items i,
- ims_cp_organizations o
- where o.man_id = :man_id
- and i.org_id = o.org_id
-
-
+ from ims_cp_items i, ims_cp_organizations o
+ where o.man_id = :man_id
+ and i.org_id = o.org_id
+
+
-
-
+
+
select v.object_id
- from views_views v
- where v.viewer_id = :user_id
- and v.object_id in ([join $all_items ,])
-
-
+ from views_views v
+ where v.viewer_id = :user_id
+ and v.object_id in ([join $all_items ,])
+
+
-
-
- select
- item_id
- from
- cr_revisions
- where
- revision_id = :man_id
-
-
+
+
+ select item_id
+ from cr_revisions
+ where revision_id = :man_id
+
+
-
\ No newline at end of file
+
+
+ select cp.man_id,
+ case when upper(scorm_type) = 'SCO' then 'delivery-scorm'
+ else 'delivery'
+ end as needscorte
+
+ from ims_cp_manifests cp left join ( select man_id, max(scorm_type) as scorm_type
+ from ims_cp_resources
+ group by man_id )
+ as cpr using (man_id)
+ where cp.man_id = :man_id
+
+
+
+
+
+ select
+ cp.course_name,
+ cp.fs_package_id,
+ isscorm,
+ pf.folder_name,
+ pf.format_name,
+ case when upper(scorm_type) = 'SCO' then 'delivery-scorm'
+ else 'delivery'
+ end as deliverymethod
+
+ from ims_cp_manifests cp left join ( select man_id, max(scorm_type) as scorm_type
+ from ims_cp_resources
+ group by man_id )
+ as cpr using (man_id), lorsm_course_presentation_formats pf
+ where cp.man_id = :man_id
+ and cp.parent_man_id = 0
+ and cp.course_presentation_format = pf.format_id
+
+
+
+
+
+ select lorsm.track_id as track_id, cmi.lesson_status as lesson_status
+ from lorsm_student_track lorsm, lorsm_cmi_core cmi
+ where lorsm.user_id = $user_id
+ and lorsm.community_id = $community_id
+ and lorsm.course_id = $man_id
+ and lorsm.track_id = cmi.track_id
+ and cmi.man_id = $man_id
+ and cmi.item_id = $man_id
+ order by lorsm.track_id desc
+ limit 1
+
+
+
+
Index: openacs-4/packages/lorsm/tcl/lorsm-callback-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-callback-procs.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/lorsm/tcl/lorsm-callback-procs.tcl 17 Nov 2008 13:36:43 -0000 1.4
+++ openacs-4/packages/lorsm/tcl/lorsm-callback-procs.tcl 12 Dec 2008 14:25:33 -0000 1.5
@@ -18,12 +18,7 @@
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}
+ db_1row my_query {}
return "$result"
}
Index: openacs-4/packages/lorsm/tcl/lorsm-callback-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-callback-procs.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/tcl/lorsm-callback-procs.xql 7 Jun 2006 14:05:44 -0000 1.2
+++ openacs-4/packages/lorsm/tcl/lorsm-callback-procs.xql 12 Dec 2008 14:25:33 -0000 1.3
@@ -1,36 +1,46 @@
-
-
- select track_id from
- lorsm_student_track
- where user_id = :user_id
-
-
+
+
+ select track_id from
+ lorsm_student_track
+ where user_id = :user_id
+
+
-
-
- select community_id
- from lorsm_student_bookmark
- where user_id = :user_id
-
-
-
-
-
- update lorsm_student_track
- set user_id = :to_user_id
- where user_id = :from_user_id
-
-
-
-
-
- update lorsm_student_bookmark
- set user_id = :to_user_id
- where user_id = :from_user_id
-
-
-
-
\ No newline at end of file
+
+
+ select community_id
+ from lorsm_student_bookmark
+ where user_id = :user_id
+
+
+
+
+
+ update lorsm_student_track
+ set user_id = :to_user_id
+ where user_id = :from_user_id
+
+
+
+
+
+ update lorsm_student_bookmark
+ set user_id = :to_user_id
+ where user_id = :from_user_id
+
+
+
+
+
+ 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
+
+
+
+
Index: openacs-4/packages/lorsm/tcl/lorsm-delivery-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-delivery-procs.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/lorsm/tcl/lorsm-delivery-procs.xql 17 May 2005 17:23:27 -0000 1.1
+++ openacs-4/packages/lorsm/tcl/lorsm-delivery-procs.xql 12 Dec 2008 14:25:33 -0000 1.2
@@ -1,139 +1,99 @@
-
-
- select
- folder_id
- from
- cr_folders
- where
- label = :folder_part
-
-
+
+
+ select folder_id
+ from cr_folders
+ where label = :folder_part
+
+
-
-
- select
- parent_id
- from
- cr_items
- where
- item_id = :folder
-
-
+
+
+ select parent_id
+ from cr_items
+ where item_id = :folder
+
+
-
-
- select
- item_id
- from
- cr_revisions
- where
- revision_id = :revision_id
-
-
+
+
+ select item_id
+ from cr_revisions
+ where revision_id = :revision_id
+
+
-
-
- select
- folder_id
- from
- ims_cp_manifests
- where
- man_id = :man_id
-
-
+
+
+ select folder_id
+ from ims_cp_manifests
+ where man_id = :man_id
+
+
-
-
- select
- name
- from
- cr_items
- where
- item_id = :folder_id
-
-
+
+
+ select name
+ from cr_items
+ where item_id = :folder_id
+
+
-
-
- select
- item_id
- from
- cr_items
- where
- name = :name
- and parent_id = :parent_id
-
-
+
+
+ select item_id
+ from cr_items
+ where name = :name
+ and parent_id = :parent_id
+
+
-
-
- select
- href
- from
- ims_cp_resources r, ims_cp_items_to_resources ir
- where
- ir.ims_item_id = :ims_item_id
- and ir.res_id = r.res_id
-
-
+
+
+ select href
+ from ims_cp_resources r, ims_cp_items_to_resources ir
+ where ir.ims_item_id = :ims_item_id
+ and ir.res_id = r.res_id
+
+
-
-
- select
- item_title
- from
- ims_cp_items
- where
- ims_item_id = :ims_item_id
-
-
+
+
+ select item_title
+ from ims_cp_items
+ where ims_item_id = :ims_item_id
+
+
-
-
- select
- res_id
- from
- ims_cp_items_to_resources
- where
- ims_item_id = :ims_item_id
-
-
+
+
+ select res_id
+ from ims_cp_items_to_resources
+ where ims_item_id = :ims_item_id
+
+
-
-
- select
- file_id
- from
- ims_cp_files
- where
- res_id = :res_id
-
-
+
+
+ select file_id
+ from ims_cp_files
+ where res_id = :res_id
+
+
-
-
- select
- revision_id
- from
- cr_revisions
- where
- item_id = :item_id and
- revision_id in (
- select
- f.file_id
- from
- ims_cp_files f,
- ims_cp_resources r,
- ims_cp_items_to_resources ir
- where
- f.res_id = r.res_id and
- r.res_id = ir.res_id and
- ir.ims_item_id = :ims_item_id
- )
-
-
+
+
+ select revision_id
+ from cr_revisions
+ where item_id = :item_id
+ and revision_id in ( select f.file_id
+ from ims_cp_files f, ims_cp_resources r, ims_cp_items_to_resources ir
+ where f.res_id = r.res_id
+ and r.res_id = ir.res_id
+ and ir.ims_item_id = :ims_item_id )
+
+
-
\ No newline at end of file
+
Index: openacs-4/packages/lorsm/tcl/lorsm-delivery-scorm-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-delivery-scorm-procs.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/tcl/lorsm-delivery-scorm-procs.tcl 17 Nov 2008 13:36:43 -0000 1.3
+++ openacs-4/packages/lorsm/tcl/lorsm-delivery-scorm-procs.tcl 12 Dec 2008 14:25:33 -0000 1.4
@@ -49,29 +49,11 @@
set father 0
- if { ! [ db_0or1row someinfo { select parent_item as father,
- o.object_type as father_type
- from ims_cp_items i, ims_cp_manifest_class im, acs_objects o
- WHERE ( o.object_type = 'ims_item_object' OR
- o.object_type= 'ims_organization_object' )
- AND o.object_id = i.parent_item
- AND i.ims_item_id=:ims_item_id
- AND im.man_id= :currentcourse
- AND im.isenabled='t'
- AND im.community_id=:community_id } ] } {
+ if { ! [ db_0or1row someinfo {} ] } {
ns_log warning "Parents: no parent "
#should look harder: the calling items should be ORG
#as a parent and set it so.
- if { [db_0or1row isanorg { select i.man_id as father,
- o.object_type as father_type
- from ims_cp_organizations i, ims_cp_manifest_class im,
- acs_objects o
- WHERE o.object_id = i.man_id
- AND i.org_id=:ims_item_id
- AND im.man_id= i.man_id
- AND im.man_id= :currentcourse
- AND im.isenabled='t'
- AND im.community_id=:community_id}] } {
+ if { [db_0or1row isanorg {}] } {
ns_log debug "SCORM parents: father is man: $father"
#we should now do something to set the thing ok
@@ -86,21 +68,7 @@
if { [ string equal $father_type "ims_manifest_object" ] } {
#since we have a manifest i will check all orgs below.
- if { [ db_0or1row hasmanincompletedchildren { select * from (
- select o.man_id, org_title as item_title, org_id as item_id
- from ims_cp_organizations o, ims_cp_manifest_class im
- where o.man_id=:currentcourse
- and im.man_id=o.man_id
- and im.community_id=:community_id) as allitems where item_id
- not in
- ( select cmi.item_id from lorsm_cmi_core cmi, lorsm_student_track track
- where cmi.man_id=:currentcourse
- and track.user_id=:user_id
- and cmi.track_id=track.track_id
- and track.community_id=:community_id
- and lesson_status in
- ( 'completed', 'passed' ))
- limit 1 } ] } {
+ if { [ db_0or1row hasmanincompletedchildren {} ] } {
ns_log debug "SCORM parents: at least one incomplete sub-org ($item_id)"
set target_status "incomplete"
@@ -113,22 +81,7 @@
}
} else {
- if { [ db_0or1row hasblockincompletedchildren {
- select * from (select o.man_id, item_title, ims_item_id as item_id
- from ims_cp_items i, ims_cp_organizations o, ims_cp_manifest_class im
- where i.org_id=o.org_id
- and im.man_id=o.man_id
- and o.man_id= :currentcourse
- and im.community_id= :community_id
- and i.parent_item= :father) as allitems where item_id
- not in ( select cmi.item_id
- from lorsm_cmi_core cmi, lorsm_student_track track
- where cmi.man_id=:currentcourse
- and track.user_id=:user_id
- and cmi.track_id=track.track_id
- and track.community_id=:community_id
- and lesson_status in ( 'completed', 'passed' ))
- limit 1 }] } {
+ if { [ db_0or1row hasblockincompletedchildren {} ] } {
ns_log debug "BLOCK: at least 1 incomplete children (see $item_id)"
set target_status "incomplete"
@@ -143,17 +96,7 @@
ns_log debug "SCORM Parents: We are going to (check) set:
$target_status on $father "
- if { [ db_0or1row isanysuspendedsession "select lorsm.track_id
- as block_track_id, lesson_status as lesson_status_old
- from lorsm_student_track lorsm, lorsm_cmi_core cmi
- where lorsm.user_id = $user_id
- and lorsm.community_id = $community_id
- and lorsm.course_id = $currentcourse
- and lorsm.track_id = cmi.track_id
- and cmi.man_id = $currentcourse
- and cmi.item_id = $father
- order by
- lorsm.track_id desc limit 1 "] } {
+ if { [ db_0or1row isanysuspendedsession {} ] } {
if { ! [ string equal lesson_status_old target_status ] } {
#UPDATE
@@ -183,12 +126,7 @@
-community_id $community_id \
-course_id $currentcourse]
#INSERT NEW TRACK FOR ITEM
- db_dml lmsinitialize {
- insert into lorsm_cmi_core(track_id,man_id,item_id,student_id,student_name,
- lesson_location, lesson_status, launch_data,
- comments,comments_from_lms, session_time, total_time, time_stamp)
- values(:block_track_id,:currentcourse,:father,:username,:name,
- :currentcourse, :target_status,'','',:target_comment,0,0,CURRENT_TIMESTAMP) }
+ db_dml lmsinitialize {}
if { [db_resultrows] == 1 } {
ns_log debug "SCORM: lesson_status processing INSERT: $block_track_id to $target_status successfull"
Index: openacs-4/packages/lorsm/tcl/lorsm-delivery-scorm-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-delivery-scorm-procs.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/tcl/lorsm-delivery-scorm-procs.xql 12 Dec 2008 14:25:33 -0000 1.1
@@ -0,0 +1,97 @@
+
+
+
+
+
+ select parent_item as father, o.object_type as father_type
+ from ims_cp_items i, ims_cp_manifest_class im, acs_objects o
+ where ( o.object_type = 'ims_item_object' or
+ o.object_type= 'ims_organization_object' )
+ and o.object_id = i.parent_item
+ and i.ims_item_id=:ims_item_id
+ and im.man_id= :currentcourse
+ and im.isenabled='t'
+ and im.community_id=:community_id
+
+
+
+
+
+ select i.man_id as father, o.object_type as father_type
+ from ims_cp_organizations i, ims_cp_manifest_class im, acs_objects o
+ where o.object_id = i.man_id
+ and i.org_id=:ims_item_id
+ and im.man_id= i.man_id
+ and im.man_id= :currentcourse
+ and im.isenabled='t'
+ and im.community_id=:community_id
+
+
+
+
+
+ select *
+ from ( select o.man_id, org_title as item_title, org_id as item_id
+ from ims_cp_organizations o, ims_cp_manifest_class im
+ where o.man_id=:currentcourse
+ and im.man_id=o.man_id
+ and im.community_id=:community_id) as allitems
+ where item_id not in ( select cmi.item_id
+ from lorsm_cmi_core cmi, lorsm_student_track track
+ where cmi.man_id=:currentcourse
+ and track.user_id=:user_id
+ and cmi.track_id=track.track_id
+ and track.community_id=:community_id
+ and lesson_status in ( 'completed', 'passed' ))
+ limit 1
+
+
+
+
+
+ select *
+ from ( select o.man_id, item_title, ims_item_id as item_id
+ from ims_cp_items i, ims_cp_organizations o, ims_cp_manifest_class im
+ where i.org_id=o.org_id
+ and im.man_id=o.man_id
+ and o.man_id= :currentcourse
+ and im.community_id= :community_id
+ and i.parent_item= :father) as allitems
+ where item_id not in ( select cmi.item_id
+ from lorsm_cmi_core cmi, lorsm_student_track track
+ where cmi.man_id=:currentcourse
+ and track.user_id=:user_id
+ and cmi.track_id=track.track_id
+ and track.community_id=:community_id
+ and lesson_status in ( 'completed', 'passed' ))
+ limit 1
+
+
+
+
+
+ select lorsm.track_id as block_track_id, lesson_status as lesson_status_old
+ from lorsm_student_track lorsm, lorsm_cmi_core cmi
+ where lorsm.user_id = $user_id
+ and lorsm.community_id = $community_id
+ and lorsm.course_id = $currentcourse
+ and lorsm.track_id = cmi.track_id
+ and cmi.man_id = $currentcourse
+ and cmi.item_id = $father
+ order by lorsm.track_id desc
+ limit 1
+
+
+
+
+
+ insert into lorsm_cmi_core
+ (track_id,man_id,item_id,student_id,student_name,lesson_location, lesson_status, launch_data,
+ comments,comments_from_lms, session_time, total_time, time_stamp)
+ values
+ (:block_track_id,:currentcourse,:father,:username,:name,:currentcourse, :target_status,'',
+ '',:target_comment,0,0,CURRENT_TIMESTAMP)
+
+
+
+
Index: openacs-4/packages/lorsm/tcl/lorsm-import-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-import-procs.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/lorsm/tcl/lorsm-import-procs.tcl 17 Nov 2008 13:36:43 -0000 1.4
+++ openacs-4/packages/lorsm/tcl/lorsm-import-procs.tcl 12 Dec 2008 14:25:33 -0000 1.5
@@ -342,10 +342,7 @@
set community_id [dotlrn_community::get_community_id]
- set party_id_member [db_string party_id {select segment_id
- from rel_segments
- where group_id = :community_id
- and rel_type = 'dotlrn_member_rel'}]
+ set party_id_member [db_string party_id_member {}]
permission::grant \
-party_id $party_id_member \
@@ -359,10 +356,7 @@
# Set read permissions for community/class dotlrn_admin_rel
- set party_id_admin [db_string party_id {select segment_id
- from rel_segments
- where group_id = :community_id
- and rel_type = 'dotlrn_admin_rel'}]
+ set party_id_admin [db_string party_id_admin {}]
permission::grant \
-party_id $party_id_admin \
@@ -377,9 +371,7 @@
# Set read permissions for *all* other professors within .LRN
# (so they can see the content)
- set party_id_professor [db_string party_id {select segment_id
- from rel_segments
- where rel_type = 'dotlrn_professor_profile_rel'}]
+ set party_id_professor [db_string party_id_professor {}]
permission::grant \
-party_id $party_id_professor \
@@ -394,9 +386,7 @@
# Set read permissions for *all* other admins within .LRN
# (so they can see the content)
- set party_id_admins [db_string party_id {select segment_id
- from rel_segments
- where rel_type = 'dotlrn_admin_profile_rel'}]
+ set party_id_admins [db_string party_id_admin_profile {}]
permission::grant \
-party_id $party_id_admins \
@@ -617,11 +607,7 @@
set community_id [dotlrn_community::get_community_id]
- set party_id_member [db_string party_id {
- select segment_id
- from rel_segments \
- where group_id = :community_id \
- and rel_type = 'dotlrn_member_rel'}]
+ set party_id_member [db_string party_id_member {}]
permission::grant \
-party_id $party_id_member \
@@ -630,10 +616,7 @@
# Set read permissions for community/class dotlrn_admin_rel
- set party_id_admin [db_string party_id {select segment_id
- from rel_segments \
- where group_id = :community_id \
- and rel_type = 'dotlrn_admin_rel'}]
+ set party_id_admin [db_string party_id_admin {}]
permission::grant \
-party_id $party_id_admin \
@@ -643,9 +626,7 @@
# Set read permissions for *all* other professors within .LRN
# (so they can see the content)
- set party_id_professor [db_string party_id {select segment_id
- from rel_segments \
- where rel_type = 'dotlrn_professor_profile_rel'}]
+ set party_id_professor [db_string party_id_professor {}]
permission::grant \
-party_id $party_id_professor \
@@ -655,9 +636,7 @@
# Set read permissions for *all* other admins within .LRN
# (so they can see the content)
- set party_id_admins [db_string party_id {select segment_id
- from rel_segments \
- where rel_type = 'dotlrn_admin_profile_rel'}]
+ set party_id_admins [db_string party_id_admin_profile {}]
permission::grant \
-party_id $party_id_admins \
Index: openacs-4/packages/lorsm/tcl/lorsm-import-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-import-procs.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/tcl/lorsm-import-procs.xql 12 Dec 2008 14:25:33 -0000 1.1
@@ -0,0 +1,38 @@
+
+
+
+
+
+ select segment_id
+ from rel_segments
+ where group_id = :community_id
+ and rel_type = 'dotlrn_member_rel'
+
+
+
+
+
+ select segment_id
+ from rel_segments
+ where group_id = :community_id
+ and rel_type = 'dotlrn_admin_rel'
+
+
+
+
+
+ select segment_id
+ from rel_segments
+ where rel_type = 'dotlrn_professor_profile_rel'
+
+
+
+
+
+ select segment_id
+ from rel_segments
+ where rel_type = 'dotlrn_admin_profile_rel
+
+
+
+
Index: openacs-4/packages/lorsm/tcl/lorsm-install-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-install-procs.tcl,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/lorsm/tcl/lorsm-install-procs.tcl 17 Nov 2008 13:36:43 -0000 1.13
+++ openacs-4/packages/lorsm/tcl/lorsm-install-procs.tcl 12 Dec 2008 14:25:33 -0000 1.14
@@ -39,24 +39,16 @@
set pretty_name "[_ lorsm.Classic_Style]"
# Insert default values for the course presentation formats
- db_dml create_default_format {
- insert into lorsm_course_presentation_formats
- values (-1,:pretty_name,'default','delivery')}
+ db_dml create_default_format {}
set pretty_name "[_ lorsm.lt_Without_LORSM_Index_S]"
- db_dml create_no_index_format {
- insert into lorsm_course_presentation_formats
- values (-2,:pretty_name,'without_index','delivery-no-index')}
+ db_dml create_no_index_format {}
set pretty_name "[_ lorsm.lt_With_Bottom_Navigatio]"
- db_dml create_no_index_format {
- insert into lorsm_course_presentation_formats
- values (-3,:pretty_name,'bottom_navigation_bar','delivery-bottom-bar')}
+ db_dml create_no_index_format2 {}
set pretty_name "[_ lorsm.lt_With_Progress_Bar]"
- db_dml create_no_index_format {
- insert into lorsm_course_presentation_formats
- values (-4,:pretty_name,'progress-bar','delivery-progress-bar')}
+ db_dml create_no_index_format3 {}
# Service contract implementations - fts
lorsm::sc::register_implementations
@@ -76,9 +68,7 @@
-spec {
0.7d 0.8d {
set pretty_name "[_ lorsm.lt_With_Progress_Bar]"
- db_dml create_no_index_format {
- insert into lorsm_course_presentation_formats
- values (-4,:pretty_name,'progress-bar','delivery-progress-bar')}
+ db_dml create_no_index_format {}
} 0.8d1 0.8d2 {
lorsm::install::templates
Index: openacs-4/packages/lorsm/tcl/lorsm-install-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-install-procs.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/tcl/lorsm-install-procs.xql 12 Dec 2008 14:25:33 -0000 1.1
@@ -0,0 +1,44 @@
+
+
+
+
+
+ insert into lorsm_course_presentation_formats
+ values
+ (-1,:pretty_name,'default','delivery')
+
+
+
+
+
+ insert into lorsm_course_presentation_formats
+ values
+ (-2,:pretty_name,'without_index','delivery-no-index')
+
+
+
+
+
+ insert into lorsm_course_presentation_formats
+ values
+ (-3,:pretty_name,'bottom_navigation_bar','delivery-bottom-bar')
+
+
+
+
+
+ insert into lorsm_course_presentation_formats
+ values
+ (-4,:pretty_name,'progress-bar','delivery-progress-bar')
+
+
+
+
+
+ insert into lorsm_course_presentation_formats
+ values
+ (-4,:pretty_name,'progress-bar','delivery-progress-bar')
+
+
+
+
Index: openacs-4/packages/lorsm/tcl/lorsm-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-procs-postgresql.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/lorsm/tcl/lorsm-procs-postgresql.xql 4 Sep 2004 14:51:20 -0000 1.1
+++ openacs-4/packages/lorsm/tcl/lorsm-procs-postgresql.xql 12 Dec 2008 14:25:33 -0000 1.2
@@ -2,93 +2,75 @@
postgresql7.1
-
-
+
+
+ select 0 as tree_level, '' as name , 'Home' as title
+ union
+ select t.tree_level, i.name, content_item.get_title(t.context_id) as title
+ from (select o2.context_id, tree_level(o2.tree_sortkey) as tree_level
+ from ( select *
+ from acs_objects
+ where object_id = :item_id )
+ o1, acs_objects o2
+ where context_id <> content_item__get_root_folder()
+ and o1.tree_sortkey between o2.tree_sortkey
+ and tree_right(o2.tree_sortkey)) t, cr_items i
+ where i.item_id = t.context_id
+ order by tree_level
+
+
- select 0 as tree_level, '' as name , 'Home' as title
- UNION
- select t.tree_level, i.name, content_item.get_title(t.context_id) as title
- from (select o2.context_id, tree_level(o2.tree_sortkey) as tree_level
- from (select * from acs_objects where object_id = :item_id) o1, acs_objects o2
- where context_id <> content_item__get_root_folder()
- and o1.tree_sortkey between o2.tree_sortkey and tree_right(o2.tree_sortkey)) t,
- cr_items i
- where i.item_id = t.context_id
- order by tree_level
+
+
+ select 1
+
+
-
-
+
+
+ select content
+ from cr_revisions
+ where revision_id = :revision_id
+
+
-
-
- select 1
+
+
+ select content_item__get_id(:url, :content_root, 'f') as item_id
+
+
-
-
+
+
+ select content_type
+ from cr_items
+ where item_id=:item_id
+
+
-
-
-
- select
- content
- from
- cr_revisions
- where
- revision_id = :revision_id
-
-
-
+
+
+ select item_id, content_type
+ from cr_items
+ where item_id = :item_id
+
+
+
+
+ select
+ content_item__get_live_revision(content_item__get_template(:item_id, :context)) as template_id,
+ content_template__get_path(content_item__get_template(:item_id, :context),:template_root) as template_url
+ from dual
+
+
-
-
- select content_item__get_id(:url, :content_root, 'f') as item_id
-
-
+
+
+ select content_template__get_path(content_item__get_template(:item_id, :context),:template_root) as template_url
+ from dual
+
+
-
-
- select content_type from cr_items where item_id=:item_id
-
-
-
-
-
-
- select
- item_id, content_type
- from
- cr_items
- where
- item_id = :item_id
-
-
-
-
-
-
-
- select
- content_item__get_live_revision(content_item__get_template(:item_id, :context)) as template_id,
- content_template__get_path(content_item__get_template(:item_id, :context),:template_root) as template_url
- from
- dual
-
-
-
-
-
-
-
-
- select
- content_template__get_path(
- content_item__get_template(:item_id, :context),:template_root) as template_url
- from
- dual
-
-
-
-
Index: openacs-4/packages/lorsm/tcl/lorsm-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-procs.tcl,v
diff -u -r1.21 -r1.22
--- openacs-4/packages/lorsm/tcl/lorsm-procs.tcl 17 Nov 2008 13:36:43 -0000 1.21
+++ openacs-4/packages/lorsm/tcl/lorsm-procs.tcl 12 Dec 2008 14:25:33 -0000 1.22
@@ -100,9 +100,7 @@
} default {
set url1 "[apm_package_url_from_id $fs_local_package_id]view/"
- set url2 "[db_string select_folder_key {select key
- from fs_folders
- where folder_id = :folder_id}]"
+ set url2 "[db_string select_folder_key {}]"
set url3 [lorsm::fix_url -url $identifierref]
set content_root [fs::get_root_folder \
-package_id $fs_package_id]
@@ -126,7 +124,7 @@
@param manifest_id the Id for the course
@author Ernie Ghiglione (ErnieG@mm.st)
} {
- return [db_string course_name {select course_name from ims_cp_manifests where man_id = :manifest_id}]
+ return [db_string course_name {}]
}
@@ -214,7 +212,7 @@
default {
set url1 "[apm_package_url_from_id $fs_local_package_id]view/"
set folder_id $folder_id
- set url2 "[db_string select_folder_key {select key from fs_folders where folder_id = :folder_id}]/"
+ set url2 "[db_string select_folder_key {}]/"
set url3 [lorsm::fix_url -url $identifierref]
set content_root [fs::get_root_folder -package_id $fs_package_id]
set item_id $item_id
@@ -324,39 +322,8 @@
ad_proc -public get_item_list { man_id user_id } {
set item_list [list]
- db_foreach organizations {
- select
- org.org_id,
- org.org_title as org_title,
- org.hasmetadata,
- tree_level(o.tree_sortkey) as indent
- from
- ims_cp_organizations org, acs_objects o
- where
- org.org_id = o.object_id
- and
- man_id = :man_id
- order by
- org_id
- } {
- db_foreach sql {
- SELECT i.parent_item, i.ims_item_id, i.item_title as item_title
- FROM acs_objects o, ims_cp_items i, cr_items cr
- WHERE o.object_type = 'ims_item_object'
- AND i.org_id = :org_id
- AND o.object_id = i.ims_item_id
- AND cr.live_revision=i.ims_item_id
- AND EXISTS (select 1
- from acs_object_party_privilege_map p
- where p.object_id = i.ims_item_id
- and p.party_id = :user_id
- and p.privilege = 'read')
- and not exists (select 1
- from lorsm_custom_pages
- where page_id=cr.item_id
- and man_id=:man_id)
- ORDER BY i.sort_order, o.object_id, cr.tree_sortkey
- } {
+ db_foreach organizations {} {
+ db_foreach sql {} {
lappend item_list $ims_item_id
}
}
@@ -372,23 +339,13 @@
set views [views::record_view -object_id $item_id -viewer_id $viewer_id]
set revision_id [item::get_best_revision $item_id]
- db_1row manifest_info "select fs_package_id, folder_id
- from ims_cp_manifests
- where man_id = :man_id"
+ db_1row manifest_info {}
set content_root [fs::get_root_folder -package_id $fs_package_id]
- set url2 "[db_string select_folder_key {select key from fs_folders
- where folder_id = :folder_id}]/"
- set href [db_string href \
- "select href
- from ims_cp_resources r, ims_cp_items_to_resources ir
- where ir.ims_item_id = :item_id
- and ir.res_id = r.res_id" -default ""]
+ set url2 "[db_string select_folder_key {}]/"
+ set href [db_string href {} -default ""]
- db_1row item_info \
- "select item_title
- from ims_cp_items
- where ims_item_id = :item_id"
+ db_1row item_info {}
set fs_item_id [fs::get_item_id -folder_id $folder_id -name $href]
# If no fs_item_id, this item is probably a folder
@@ -562,18 +519,14 @@
}
ad_proc -public lorsm::get_root_folder_id { } { } {
- return [db_string get_root_folder { select folder_id
- from cr_folders
- where label = 'LORSM Root Folder' } -default ""]
+ return [db_string get_root_folder {} -default ""]
}
ad_proc -public lorsm::get_folder_id {
-name:required
} {
- return [db_string get_root_folder { select folder_id
- from cr_folders
- where label = :name } -default ""]
+ return [db_string get_root_folder {} -default ""]
}
@@ -592,21 +545,13 @@
}
# We need all the count of all items (just live revisions)
- set items_count [db_string get_items_count \
- "select count(ims_item_id)
- from ims_cp_items, cr_items cr
- where ims_item_id = live_revision
- and org_id = :org_id $exclude_where"]
+ set items_count [db_string get_items_count {}]
# Get the root items
set count 0
set items_list [list]
- foreach ims_item_id [db_list get_root_item \
- "select ims_item_id
- from ims_cp_items
- where parent_item = :org_id
- and org_id = :org_id $exclude_where"] {
+ foreach ims_item_id [db_list get_root_item {}] {
lappend items_list [list $ims_item_id 1]
set items_array($ims_item_id) 1
incr count
@@ -629,11 +574,7 @@
set visited_items($item_id) $item_id
set indent [expr [lindex $item 1] + 1]
- foreach ims_item_id [db_list get_items \
- "select ims_item_id
- from ims_cp_items
- where parent_item = :item_id
- and org_id = :org_id $exclude_where"] {
+ foreach ims_item_id [db_list get_items {}] {
if { ![info exist items_array($ims_item_id)] } {
lappend items_list [list $ims_item_id $indent]
set items_array($ims_item_id) $indent
@@ -698,10 +639,7 @@
# Get the package_id associated with the current community
# FIXME this is a hack until I figure out how to get the
# package_id of the current community
- ad_conn -set package_id [db_string get_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='lorsm'}]
+ ad_conn -set package_id [db_string get_package_id {}]
set object_id [lorsm::import_imscp -upload_file $xml_file -tmp_dir $tmp_dir]
@@ -764,22 +702,11 @@
@item_id cr_items.item_id of the ims_cp_item page to use
@type start or end for start or end page
} {
- if {![db_0or1row get_page \
- "select 1
- from lorsm_custom_pages
- where man_id=:man_id
- and type=:type"]} {
+ if {![db_0or1row get_page {}]} {
+ db_dml add_page {}
- db_dml add_page \
- "insert into lorsm_custom_pages (man_id,page_id,type)
- values (:man_id,:item_id,:type)"
-
} else {
- db_dml update_page \
- "update lorsm_custom_pages
- set man_id=:man_id,
- page_id=:item_id,
- type=:type"
+ db_dml update_page {}
}
}
@@ -791,10 +718,5 @@
Get the ims_item_id for a custom page if it exists
or empty string if it does not
} {
- return [db_string get_custom_page \
- "select live_revision
- from cr_items, lorsm_custom_pages
- where page_id=item_id
- and man_id=:man_id
- and type=:type" -default ""]
+ return [db_string get_custom_page {} -default ""]
}
Index: openacs-4/packages/lorsm/tcl/lorsm-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-procs.xql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/lorsm/tcl/lorsm-procs.xql 7 Jun 2006 14:05:44 -0000 1.4
+++ openacs-4/packages/lorsm/tcl/lorsm-procs.xql 12 Dec 2008 14:25:34 -0000 1.5
@@ -1,110 +1,279 @@
-
-
+
+
+ select live_revision from cr_items where item_id = :ims_item_id
+
+
- select live_revision from cr_items where item_id = :ims_item_id
+
+
+ select mime_type from cr_revisions
+ where revision_id = :revision_id
+
+
-
-
+
+
+ select content_type from cr_items
+ where item_id = :item_id
+
+
-
-
+
+
+ select table_name from acs_object_types
+ where object_type = :content_type
+
+
- select mime_type from cr_revisions
- where revision_id = :revision_id
+
+
+ , content as text
+
+
-
-
+
+
+ select x.*, :content_type as content_type
+ $text_sql
+ from cr_revisions r,
+ ${table_name}x x
+ where r.revision_id = :revision_id
+ and x.revision_id = r.revision_id
+
+
-
-
+
+
+ select live_revision
+ from cr_items
+ where item_id = :ims_item_id
+
+
- select content_type from cr_items
- where item_id = :item_id
+
+
+ select folder_id
+ from cr_folders
+ where label = 'LORSM Root Folder'
+
+
-
-
+
+
+ select track_id
+ from lorsm_student_track
+ where user_id = :user_id
+
+
-
-
+
+
+ select community_id
+ from lorsm_student_bookmark
+ where user_id = :user_id
+
+
- select table_name from acs_object_types
- where object_type = :content_type
+
+
+ update lorsm_student_track
+ set user_id = :to_user_id
+ where user_id = :from_user_id
+
+
-
-
+
+
+ update lorsm_student_bookmark
+ set user_id = :to_user_id
+ where user_id = :from_user_id
+
+
-
-
+
+
+ select key
+ from fs_folders
+ where folder_id = :folder_id
+
+
- , content as text
+
+
+ select course_name
+ from ims_cp_manifests
+ where man_id = :manifest_id
+
+
-
-
+
+
+ select key
+ from fs_folders
+ where folder_id = :folder_id
+
+
-
-
+
+
+ select org.org_id,
+ org.org_title as org_title,
+ org.hasmetadata,
+ tree_level(o.tree_sortkey) as indent
+ from ims_cp_organizations org, acs_objects o
+ where org.org_id = o.object_id
+ and man_id = :man_id
+ order by org_id
+
+
- select
- x.*,
- :content_type as content_type
- $text_sql
- from
- cr_revisions r, ${table_name}x x
- where
- r.revision_id = :revision_id
- and
- x.revision_id = r.revision_id
+
+
+ select i.parent_item, i.ims_item_id, i.item_title as item_title
+ from acs_objects o, ims_cp_items i, cr_items cr
+ where o.object_type = 'ims_item_object'
+ and i.org_id = :org_id
+ and o.object_id = i.ims_item_id
+ and cr.live_revision=i.ims_item_id
+ and exists (select 1
+ from acs_object_party_privilege_map p
+ where p.object_id = i.ims_item_id
+ and p.party_id = :user_id
+ and p.privilege = 'read')
+ and not exists (select 1
+ from lorsm_custom_pages
+ where page_id=cr.item_id
+ and man_id=:man_id)
+ order by i.sort_order, o.object_id, cr.tree_sortkey
+
+
-
-
+
+
+ select fs_package_id, folder_id
+ from ims_cp_manifests
+ where man_id = :man_id
+
+
-
-
+
+
+ select key
+ from fs_folders
+ where folder_id = :folder_id
+
+
- select live_revision from cr_items where item_id = :ims_item_id
+
+
+ select href
+ from ims_cp_resources r, ims_cp_items_to_resources ir
+ where ir.ims_item_id = :item_id
+ and ir.res_id = r.res_id
+
+
-
-
+
+
+ select item_title
+ from ims_cp_items
+ where ims_item_id = :item_id
+
+
-
-
- select folder_id from cr_folders where label = 'LORSM Root Folder'
-
-
+
+
+ select folder_id
+ from cr_folders
+ where label = 'LORSM Root Folder'
+
+
-
-
- select track_id from
- lorsm_student_track
- where user_id = :user_id
-
-
+
+
+ select folder_id
+ from cr_folders
+ where label = :name
+
+
-
-
- select community_id
- from lorsm_student_bookmark
- where user_id = :user_id
-
-
-
-
-
- update lorsm_student_track
- set user_id = :to_user_id
- where user_id = :from_user_id
-
-
-
-
-
- update lorsm_student_bookmark
- set user_id = :to_user_id
- where user_id = :from_user_id
-
-
-
-
\ No newline at end of file
+
+
+ select count(ims_item_id)
+ from ims_cp_items, cr_items cr
+ where ims_item_id = live_revision
+ and org_id = :org_id $exclude_where
+
+
+
+
+
+ select ims_item_id
+ from ims_cp_items
+ where parent_item = :org_id
+ and org_id = :org_id
+ $exclude_where
+
+
+
+
+
+ select ims_item_id
+ from ims_cp_items
+ where parent_item = :item_id
+ and org_id = :org_id
+ $exclude_where
+
+
+
+
+
+ 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='lorsm'
+
+
+
+
+
+ select 1
+ from lorsm_custom_pages
+ where man_id=:man_id
+ and type=:type
+
+
+
+
+
+ insert into lorsm_custom_pages
+ (man_id,page_id,type)
+ values
+ (:man_id,:item_id,:type)
+
+
+
+
+
+ update lorsm_custom_pages
+ set man_id=:man_id,
+ page_id=:item_id,
+ type=:type
+
+
+
+
+
+ select live_revision
+ from cr_items, lorsm_custom_pages
+ where page_id=item_id
+ and man_id=:man_id
+ and type=:type
+
+
+
+
Index: openacs-4/packages/lorsm/tcl/lorsm-sc-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-sc-procs.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/tcl/lorsm-sc-procs.tcl 17 Nov 2008 13:36:43 -0000 1.3
+++ openacs-4/packages/lorsm/tcl/lorsm-sc-procs.tcl 12 Dec 2008 14:25:34 -0000 1.4
@@ -23,13 +23,7 @@
} {
# TODO find a better way to lookup the package_id to get the URL
- set package_id [db_string package_id {
- select context_id
- from acs_objects
- where object_id=
- (select context_id
- from acs_objects
- where object_id=:man_id)}]
+ set package_id [db_string package_id {}]
set url [apm_package_url_from_id $package_id]
return "${url}delivery-no-index/?man_id=$man_id"
Index: openacs-4/packages/lorsm/tcl/lorsm-sc-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-sc-procs.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/tcl/lorsm-sc-procs.xql 12 Dec 2008 14:25:34 -0000 1.1
@@ -0,0 +1,14 @@
+
+
+
+
+
+ select context_id
+ from acs_objects
+ where object_id = (select context_id
+ from acs_objects
+ where object_id=:man_id)
+
+
+
+
Index: openacs-4/packages/lorsm/tcl/lorsm-tracking-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-tracking-procs.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/lorsm/tcl/lorsm-tracking-procs.tcl 17 Nov 2008 13:36:43 -0000 1.7
+++ openacs-4/packages/lorsm/tcl/lorsm-tracking-procs.tcl 12 Dec 2008 14:25:34 -0000 1.8
@@ -43,14 +43,7 @@
} {
db_transaction {
- set track_id [db_exec_plsql track_st_new {
-
- select lorsm_student_track__new (
- :user_id,
- :community_id,
- :course_id
- );
- }]}
+ set track_id [db_exec_plsql track_st_new {}]}
return $track_id
}
@@ -66,16 +59,14 @@
} {
db_transaction {
- set track_id [db_exec_plsql track_st_exit {
+ set track_id [db_exec_plsql track_st_exit {}]
- select lorsm_student_track__exit (
- :track_id
- );
-
- }]
-
if {$track_id ne ""} {
- db_0or1row get_track "select * from lorsm_student_track where track_id=:track_id"
+ # Initialized to prevent errors
+ set credit_earned ""
+ set elapsed_seconds ""
+
+ db_0or1row get_track {}
if {[ad_conn -connected_p]} {
set package_id [ad_conn package_id]
} else {
@@ -110,10 +101,7 @@
} {
- set istrackable [db_string trackable {select istrackable
- from ims_cp_manifest_class
- where man_id = :course_id
- and lorsm_instance_id = :package_id}]
+ set istrackable [db_string trackable {}]
if {$istrackable == "f"} {
return 0
@@ -126,19 +114,7 @@
-track_id
} {
- set last_item_viewed [db_string select_last_item_viewed {
- select to_char(v.last_viewed,'YYYY-MM-DD HH24:MI:SS') as last_viewed
- from views_views v,
- ims_cp_items i,
- ims_cp_organizations o,
- lorsm_student_track t
- where t.track_id = :track_id
- and v.viewer_id = t.user_id
- and v.object_id = i.ims_item_id
- and i.org_id = o.org_id
- and o.man_id = t.course_id
- order by v.last_viewed desc
- limit 1 } -default ""]
+ set last_item_viewed [db_string select_last_item_viewed {} -default ""]
if {$last_item_viewed ne ""} {
set current_seconds [clock seconds]
@@ -147,9 +123,7 @@
if {$elapsed_seconds > 600} {
set elapsed_seconds 600
}
- db_dml update_elapsed_seconds "update lorsm_student_track
- set elapsed_seconds = coalesce(elapsed_seconds,0) + :elapsed_seconds
- where track_id = :track_id"
+ db_dml update_elapsed_seconds {}
}
}
Index: openacs-4/packages/lorsm/tcl/lorsm-tracking-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-tracking-procs.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/tcl/lorsm-tracking-procs.xql 12 Dec 2008 14:25:34 -0000 1.1
@@ -0,0 +1,64 @@
+
+
+
+
+
+ select lorsm_student_track__new (:user_id, :community_id, :course_id);
+
+
+
+
+
+ select lorsm_student_track__exit (:track_id);
+
+
+
+
+
+ select *
+ from lorsm_student_track
+ where track_id=:track_id
+
+
+
+
+
+ select track_id
+ from lorsm_student_track
+ where community_id=:community_id
+ and user_id=:user_id
+
+
+
+
+
+ select istrackable
+ from ims_cp_manifest_class
+ where man_id = :course_id
+ and lorsm_instance_id = :package_id
+
+
+
+
+
+ select to_char(v.last_viewed,'YYYY-MM-DD HH24:MI:SS') as last_viewed
+ from views_views v, ims_cp_items i, ims_cp_organizations o, lorsm_student_track t
+ where t.track_id = :track_id
+ and v.viewer_id = t.user_id
+ and v.object_id = i.ims_item_id
+ and i.org_id = o.org_id
+ and o.man_id = t.course_id
+ order by v.last_viewed desc
+ limit 1
+
+
+
+
+
+ update lorsm_student_track
+ set elapsed_seconds = coalesce(elapsed_seconds,0) + :elapsed_seconds
+ where track_id = :track_id
+
+
+
+
Index: openacs-4/packages/lorsm/templates/lorsm-default.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/templates/lorsm-default.tcl,v
diff -u -r1.11 -r1.12
--- openacs-4/packages/lorsm/templates/lorsm-default.tcl 17 Nov 2008 13:36:44 -0000 1.11
+++ openacs-4/packages/lorsm/templates/lorsm-default.tcl 12 Dec 2008 14:25:34 -0000 1.12
@@ -42,28 +42,15 @@
set package_id [ad_conn package_id]
set package_url [apm_package_url_from_id $package_id]
- set man_id [db_string get_man_id "select man_id
- from ims_cp_items i, ims_cp_organizations o
- where i.ims_item_id = :imsitem_id and i.org_id = o.org_id"]
+ set man_id [ db_string get_man_id {} ]
- set folder_id [db_string get_folder__id "select folder_id
- from ims_cp_manifests
- where man_id = :man_id"]
+ set folder_id [ db_string get_folder__id {} ]
# We display children
- db_1row item_info "select item_title, parent_item
- from ims_cp_items
- where ims_item_id = :imsitem_id"
+ db_1row item_info {}
# Selected fields are renamed to avoid conflict with existing variables
- db_multirow -extend {href} children children {
- select ims_cp_items.ims_item_id as child_item_id,
- ims_cp_items.item_title as child_title
- from acs_objects, ims_cp_items
- where acs_objects.object_id = ims_cp_items.ims_item_id
- and parent_item = :imsitem_id
- order by acs_objects.object_id, acs_objects.tree_sortkey
- } {
+ db_multirow -extend {href} children children {} {
# Let record-view display the page
set href ${package_url}delivery/record-view
set href "[export_vars \
@@ -72,10 +59,8 @@
}
# See if this item only has one child, if so, load that instead
- if { [template::multirow size children] == 1 && [db_string grandchildren "
- select count(*)
- from ims_cp_items
- where parent_item = [template::multirow get children 1 child_item_id]"] == 0 } {
+ set extracted_sql_children [template::multirow get children 1 child_item_id]
+ if { [template::multirow size children] == 1 && [db_string grandchildren {}] == 0 } {
set href ${package_url}delivery/record-view
set href "[export_vars \
@@ -98,25 +83,15 @@
# See if I'm a leaf node first
if { [template::multirow size children] == 0 } {
# Now see if I'm a lone leaf node
- if { [db_string siblings {
- select count(*)
- from ims_cp_items
- where parent_item = :parent_item}] == 1 } {
+ if { [db_string siblings {}] == 1 } {
# I'm a lone leaf, go to grandparent if it exists
# Join to resources just to make sure it exists and
# get href while we're at it, might be useful
- db_0or1row grandparent {
- select ims_cp_items.parent_item as grandparent_item,
- ims_cp_resources.href as grandparent_href
- from ims_cp_items, ims_cp_resources, ims_cp_items_to_resources
- where ims_cp_items.ims_item_id = :parent_item
- and ims_cp_items.parent_item = ims_cp_items_to_resources.ims_item_id
- and ims_cp_items_to_resources.res_id = ims_cp_resources.res_id
- }
- }
+ db_0or1row grandparent {}
+ }
}
- if { [db_0or1row href "select href as parent_href from ims_cp_resources r, ims_cp_items_to_resources ir where ir.ims_item_id = :parent_item and ir.res_id = r.res_id"] || [info exists grandparent_item] } {
+ if { [db_0or1row href {}] || [info exists grandparent_item] } {
# Let record-view render this page so the child items are
# shown
set parent_href ${package_url}delivery/record-view
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/templates/lorsm-default.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/lorsm/templates/lorsm-no-index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/templates/lorsm-no-index.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/lorsm/templates/lorsm-no-index.tcl 17 Nov 2008 13:36:44 -0000 1.7
+++ openacs-4/packages/lorsm/templates/lorsm-no-index.tcl 12 Dec 2008 14:25:34 -0000 1.8
@@ -32,28 +32,14 @@
if { [string eq $content(mime_type) "text/html"] && \
[regexp -nocase {} $text match] } {
- if { [db_0or1row get_imsitem_id {
- select map.item_id as viewed_item_id, o.man_id
- from ims_cp_items_to_resources map, ims_cp_files f, ims_cp_organizations o, ims_cp_items i
- where f.file_id = :item_id
- and f.res_id = map.res_id
- and map.item_id = i.item_id
- and i.org_id = o.org_id}] } {
+ if { [db_0or1row get_imsitem_id {}] } {
# record view
set item_list [lorsm::get_item_list $man_id $user_id]
set litem_list [llength $item_list]
if { ![expr $litem_list - [lsearch -exact $item_list $viewed_item_id] -1] } {
# last item, it's a special case
- set last_item_viewed [db_string select_last_item_viewed {
- select item_id
- from views_views v, ims_cp_items i, ims_cp_organizations o
- where v.viewer_id = :user_id
- and v.object_id = i.item_id
- and i.org_id = o.org_id
- and o.man_id = :man_id
- order by v.last_viewed desc
- limit 1 } -default "no item"]
+ set last_item_viewed [db_string select_last_item_viewed {} -default "no item"]
if { !([lsearch -exact [lrange $item_list [expr $litem_list - 2] $litem_list] $last_item_viewed] != -1) && ![string eq $last_item_viewed "no item"] } {
set viewed_item_id [lindex $item_list [expr [lsearch -exact $item_list $viewed_item_id] - 1]]
}
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/templates/lorsm-no-index.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/lorsm/www/edit-content.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/edit-content.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/lorsm/www/edit-content.tcl 17 Nov 2008 13:36:44 -0000 1.4
+++ openacs-4/packages/lorsm/www/edit-content.tcl 12 Dec 2008 14:25:34 -0000 1.5
@@ -23,12 +23,9 @@
set user_id [ad_conn user_id]
-set folder [db_string select_folder_key {select key
- from fs_folders
- where folder_id = :folder_id}]
+set folder [db_string select_folder_key {}]
-set fs_root_folder [db_string sql {select
- file_storage__get_root_folder(:fs_package_id)}]
+set fs_root_folder [db_string sql {}]
set identifierref [lorsm::fix_url -url $identifierref]
set pather $folder/$identifierref
@@ -44,13 +41,13 @@
# check for permissions
# By default, only the creator has admin access to content
-
permission::require_write_permission \
-object_id $file_id \
-creation_user $user_id
#ns_write "[_ lorsm.lt_folder_foldern_pather]"
#ad_script_abort
-ad_returnredirect [export_vars -base [apm_package_url_from_id $fs_package_id]file-content-edit {file_id return_url}]
+ad_returnredirect [export_vars \
+ -base [apm_package_url_from_id $fs_package_id]file-content-edit {file_id return_url}]
Index: openacs-4/packages/lorsm/www/edit-content.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/edit-content.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/edit-content.xql 12 Dec 2008 14:25:34 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+
+
+ select key
+ from fs_folders
+ where folder_id = :folder_id
+
+
+
+
+
+ select file_storage__get_root_folder(:fs_package_id)
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/course-add-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/course-add-2.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/course-add-2.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/course-add-2.tcl 12 Dec 2008 14:25:35 -0000 1.4
@@ -380,16 +380,9 @@
-label "[_ lorsm.lt_Course_Presentation_S]" \
-datatype text \
-widget select \
- -options [db_list_of_lists select_formats_for_select_widget {
- select format_pretty_name,
- format_id
- from lorsm_course_presentation_formats
- order by format_pretty_name}] \
+ -options [db_list_of_lists select_formats_for_select_widget {}] \
-help_text "[_ lorsm.lt_Use_the_Classic_Style]" \
- -value [db_string default_format {
- select format_id
- from lorsm_course_presentation_formats
- where format_name = 'default'}]
+ -value [db_string default_format {}]
template::element create course_upload course_id \
-label "[_ lorsm.course_id]" \
@@ -424,16 +417,9 @@
-widget hidden
template::element set_properties course_upload course_name -value $manifest_title
-
template::element set_properties course_upload course_id -value $course_id
-
template::element set_properties course_upload indb_p -value $indb_p
-
template::element set_properties course_upload tmp_dir -value $tmp_dir
-
template::element set_properties course_upload folder_id -value $folder_id
-
template::element set_properties course_upload isSCORM -value $isSCORM
-
-template::element set_properties course_upload fs_package_id \
- -value $fs_package_id
+template::element set_properties course_upload fs_package_id -value $fs_package_id
Index: openacs-4/packages/lorsm/www/admin/course-add-2.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/course-add-2.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/course-add-2.xql 12 Dec 2008 14:25:35 -0000 1.1
@@ -0,0 +1,20 @@
+
+
+
+
+
+ select format_pretty_name, format_id
+ from lorsm_course_presentation_formats
+ order by format_pretty_name
+
+
+
+
+
+ select format_id
+ from lorsm_course_presentation_formats
+ where format_name = 'default'
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/course-add-3.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/course-add-3.tcl,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/lorsm/www/admin/course-add-3.tcl 17 Nov 2008 13:36:44 -0000 1.10
+++ openacs-4/packages/lorsm/www/admin/course-add-3.tcl 12 Dec 2008 14:25:35 -0000 1.11
@@ -117,10 +117,7 @@
# Set read permissions for community/class dotlrn_member_rel
set community_id [dotlrn_community::get_community_id]
- set party_id_member [db_string party_id {select segment_id \
- from rel_segments \
- where group_id = :community_id \
- and rel_type = 'dotlrn_member_rel'}]
+ set party_id_member [db_string party_id_member {}]
permission::grant \
-party_id $party_id_member \
@@ -134,11 +131,7 @@
# Set read permissions for community/class dotlrn_admin_rel
- set party_id_admin [db_string party_id {
- select segment_id
- from rel_segments
- where group_id = :community_id
- and rel_type = 'dotlrn_admin_rel'}]
+ set party_id_admin [db_string party_id_admin {}]
permission::grant \
-party_id $party_id_admin \
@@ -153,10 +146,7 @@
# Set read permissions for *all* other professors within .LRN
# (so they can see the content)
- set party_id_professor [db_string party_id {
- select segment_id
- from rel_segments
- where rel_type = 'dotlrn_professor_profile_rel'}]
+ set party_id_professor [db_string party_id_professor {}]
permission::grant \
-party_id $party_id_professor \
@@ -171,10 +161,7 @@
# Set read permissions for *all* other admins within .LRN
# (so they can see the content)
- set party_id_admins [db_string party_id {
- select segment_id
- from rel_segments
- where rel_type = 'dotlrn_admin_profile_rel'}]
+ set party_id_admins [db_string party_id_admins {}]
permission::grant \
-party_id $party_id_admins \
@@ -379,11 +366,7 @@
set community_id [dotlrn_community::get_community_id]
- set party_id_member [db_string party_id {
- select segment_id
- from rel_segments
- where group_id = :community_id
- and rel_type = 'dotlrn_member_rel'}]
+ set party_id_member [db_string party_id_member {}]
permission::grant \
-party_id $party_id_member \
@@ -392,11 +375,7 @@
# Set read permissions for community/class dotlrn_admin_rel
- set party_id_admin [db_string party_id {
- select segment_id
- from rel_segments
- where group_id = :community_id
- and rel_type = 'dotlrn_admin_rel'}]
+ set party_id_admin [db_string party_id_admin {}]
permission::grant \
-party_id $party_id_admin \
@@ -406,10 +385,7 @@
# Set read permissions for *all* other professors within .LRN
# (so they can see the content)
- set party_id_professor [db_string party_id {
- select segment_id
- from rel_segments
- where rel_type = 'dotlrn_professor_profile_rel'}]
+ set party_id_professor [db_string party_id_professor {}]
permission::grant \
-party_id $party_id_professor \
@@ -419,20 +395,15 @@
# Set read permissions for *all* other admins within .LRN
# (so they can see the content)
- set party_id_admins [db_string party_id {
- select segment_id
- from rel_segments
- where rel_type = 'dotlrn_admin_profile_rel'}]
+ set party_id_admins [db_string party_id_admins {}]
permission::grant \
-party_id $party_id_admins \
-object_id $man_id \
-privilege read
-
# Done with Manifest and learning object Permissions
-
ns_write "[_ lorsm.lt_Adding_course_name_Ma]
"
if {$man_hasmetadata == 1} {
@@ -444,7 +415,6 @@
ns_write "[_ lorsm.lt_Adding_Manifest_Metad]
"
}
-
if { ![empty_string_p $organizations] } {
# for multiple organizations
set add [list]
@@ -599,11 +569,9 @@
#ns_write "[_ lorsm.no_page]"
}
-
# Here's where we link items and resources. Take into
# account that a resources can have 1 to many items
-
# So first, let's create a list of only item_identifierrefs
# [lindex $add 1]. Therefore we can do a lsearch -exact instead of
# a -regexp
@@ -672,7 +640,6 @@
}
}
-
# Delete temporary directory
ns_write "[_ lorsm.lt_Deleting_temporary_fo]
"
ns_log Debug "Delete temporary folder $tmp_dir"
Index: openacs-4/packages/lorsm/www/admin/course-add-3.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/Attic/course-add-3.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/course-add-3.xql 12 Dec 2008 14:25:35 -0000 1.1
@@ -0,0 +1,38 @@
+
+
+
+
+
+ select segment_id
+ from rel_segments
+ where group_id = :community_id
+ and rel_type = 'dotlrn_member_rel'
+
+
+
+
+
+ select segment_id
+ from rel_segments
+ where group_id = :community_id
+ and rel_type = 'dotlrn_admin_rel'
+
+
+
+
+
+ select segment_id
+ from rel_segments
+ where rel_type = 'dotlrn_professor_profile_rel'
+
+
+
+
+
+ select segment_id
+ from rel_segments
+ where rel_type = 'dotlrn_admin_profile_rel'
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/course-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/course-add.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/course-add.tcl 17 Nov 2008 13:36:44 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/course-add.tcl 12 Dec 2008 14:25:35 -0000 1.3
@@ -91,8 +91,7 @@
template::element set_properties course_upload course_id -value $course_id
template::element set_properties course_upload folder_id -value $folder_id
template::element set_properties course_upload indb_p -value $indb_p
-template::element set_properties course_upload fs_package_id \
- -value $fs_package_id
+template::element set_properties course_upload fs_package_id -value $fs_package_id
template::element set_properties course_upload man_id -value $man_id
ad_return_template
Index: openacs-4/packages/lorsm/www/admin/course-structure.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/course-structure.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/course-structure.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/course-structure.tcl 12 Dec 2008 14:25:35 -0000 1.4
@@ -27,15 +27,7 @@
set lorsm_custom_page_ids [list]
set existing_custom_page_types [list]
-db_multirow -extend {order pretty_name} custom_pages get_custom_pages \
- "select i.ims_item_id, i.item_title, lcp.type, ci.item_id
- from lorsm_custom_pages lcp, ims_cp_manifests m, ims_cp_organizations o, ims_cp_items i, cr_items ci
- where ci.item_id=lcp.page_id
- and m.man_id=:man_id
- and m.man_id=o.man_id
- and o.org_id=i.org_id
- and i.ims_item_id=ci.live_revision" {
-
+db_multirow -extend {order pretty_name} custom_pages get_custom_pages {} {
lappend lorsm_custom_page_ids $ims_item_id
lappend existing_custom_page_types $type
set order $custom_page_order($type)
Index: openacs-4/packages/lorsm/www/admin/course-structure.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/course-structure.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/lorsm/www/admin/course-structure.xql 31 Dec 2006 00:36:04 -0000 1.1
+++ openacs-4/packages/lorsm/www/admin/course-structure.xql 12 Dec 2008 14:25:35 -0000 1.2
@@ -1,184 +1,127 @@
-
-
- select
- cp.man_id,
- cp.course_name,
- cp.identifier,
- text 'Yes' as hello,
- case
- when hasmetadata = 't' then 'Yes'
- else 'No'
- end as man_metadata,
- case
- when isscorm = 't' then 'Yes'
- else 'No'
- end as isscorm,
- cp.fs_package_id,
- case
- when fs_package_id is null then 'f'
- else 't'
- end as lorsm_p,
- cp.folder_id,
- cp.isshared,
- acs.creation_user,
- acs.creation_date,
- acs.context_id,
- cpmc.isenabled,
- pf.format_pretty_name,
- cpmc.istrackable
- from
- ims_cp_manifests cp, acs_objects acs, ims_cp_manifest_class cpmc, lorsm_course_presentation_formats pf
- where
- cp.man_id = acs.object_id
- and cp.man_id = :man_id
- and cp.man_id = cpmc.man_id
- and cpmc.lorsm_instance_id = :package_id
- and cp.parent_man_id = 0
- and cp.course_presentation_format = pf.format_id
-
-
+
+
+ select cp.man_id, cp.course_name, cp.identifier, text 'Yes' as hello,
+ case when hasmetadata = 't' then 'Yes'
+ else 'No'
+ end as man_metadata,
-
-
- select
- count(revision_id)
- from
- cr_revisions
- where
- item_id = (
- select
- item_id
- from
- cr_revisions
- where
- revision_id = :man_id
- )
-
-
+ case when isscorm = 't' then 'Yes'
+ else 'No'
+ end as isscorm, cp.fs_package_id,
-
-
- select
- item_id
- from
- cr_items
- where
- name = :instance and
- parent_id = :root_folder
-
-
+ case
+ when fs_package_id is null then 'f'
+ else 't'
+ end as lorsm_p, cp.folder_id,
-
-
- select
- count(*) as submanifests
- from
- ims_cp_manifests
- where
- man_id = :man_id
- and
- parent_man_id = :man_id
-
-
+ cp.isshared, acs.creation_user, acs.creation_date, acs.context_id,
+ cpmc.isenabled, pf.format_pretty_name, cpmc.istrackable
+ from ims_cp_manifests cp, acs_objects acs, ims_cp_manifest_class cpmc,
+ lorsm_course_presentation_formats pf
+ where cp.man_id = acs.object_id
+ and cp.man_id = :man_id
+ and cp.man_id = cpmc.man_id
+ and cpmc.lorsm_instance_id = :package_id
+ and cp.parent_man_id = 0
+ and cp.course_presentation_format = pf.format_id
+
+
+
+
+ select count(revision_id)
+ from cr_revisions
+ where item_id = ( select item_id
+ from cr_revisions
+ where revision_id = :man_id )
+
+
-
-
- select
- org.org_id,
- org.org_title as org_title,
- org.hasmetadata,
- tree_level(o.tree_sortkey) as indent
- from
- ims_cp_organizations org, acs_objects o
- where
- org.org_id = o.object_id
- and
- man_id = :man_id
- order by
- org_id
-
-
+
+
+ select item_id
+ from cr_items
+ where name = :instance
+ and parent_id = :root_folder
+
+
-
-
- SELECT
- o.object_id,
- repeat(' ', (tree_level(tree_sortkey) - :indent)* 3) as indent,
- i.ims_item_id as item_id,
- i.item_title as item_title,
- i.hasmetadata,
- i.org_id,
- case
- when i.isshared = 'f' then (
- 'false'
- )
- else 'true'
+
+
+ select count(*) as submanifests
+ from ims_cp_manifests
+ where man_id = :man_id
+ and parent_man_id = :man_id
+
+
+
+
+
+ select org.org_id, org.org_title as org_title, org.hasmetadata,
+ tree_level(o.tree_sortkey) as indent
+ from ims_cp_organizations org, acs_objects o
+ where org.org_id = o.object_id
+ and man_id = :man_id
+ order by org_id
+
+
+
+
+
+ select o.object_id,
+ repeat(' ', (tree_level(tree_sortkey) - :indent)* 3) as indent,
+ i.ims_item_id as item_id, i.item_title as item_title, i.hasmetadata, i.org_id,
+
+ case when i.isshared = 'f' then ('false' )
+ else 'true'
end as isshared,
- case
- when i.identifierref <> '' then (
- SELECT
- res.href
- FROM
- ims_cp_items_to_resources i2r,
- ims_cp_resources res
- WHERE
- i2r.res_id = res.res_id
- AND
- i2r.ims_item_id = i.ims_item_id
-)
- else ''
+
+ case when i.identifierref <> '' then
+ ( select res.href
+ from ims_cp_items_to_resources i2r, ims_cp_resources res
+ where i2r.res_id = res.res_id
+ and i2r.ims_item_id = i.ims_item_id )
+ else ''
end as identifierref,
- case
- when i.identifierref <> '' then (
- SELECT
- res.type
- FROM
- ims_cp_items_to_resources i2r,
- ims_cp_resources res
- WHERE
- i2r.res_id = res.res_id
- AND
- i2r.ims_item_id = i.ims_item_id
-)
- else ''
+
+ case when i.identifierref <> '' then
+ ( select res.type
+ from ims_cp_items_to_resources i2r, ims_cp_resources res
+ where i2r.res_id = res.res_id
+ and i2r.ims_item_id = i.ims_item_id )
+ else ''
end as type,
- m.fs_package_id,
- m.folder_id,
- m.course_name
- FROM
- acs_objects o, ims_cp_items i, ims_cp_manifests m
- WHERE
- o.object_type = 'ims_item_object'
- AND
- i.org_id = :org_id
- AND
- o.object_id = i.ims_item_id
- AND
- i.ims_item_id = (
- select
- live_revision
- from
- cr_items
- where
- item_id = (
- select
- item_id
- from
- cr_revisions
- where
- revision_id = i.ims_item_id
- )
- )
- AND
- m.man_id = :man_id
- ORDER BY
- tree_sortkey, object_id
-
-
+ m.fs_package_id, m.folder_id, m.course_name
+ from acs_objects o, ims_cp_items i, ims_cp_manifests m
+ where o.object_type = 'ims_item_object'
+ and i.org_id = :org_id
+ and o.object_id = i.ims_item_id
+ and i.ims_item_id =
+ ( select live_revision
+ from cr_items
+ where item_id =
+ ( select item_id
+ from cr_revisions
+ where revision_id = i.ims_item_id ) )
+ and m.man_id = :man_id
+ order by tree_sortkey, object_id
+
+
-
\ No newline at end of file
+
+
+ select i.ims_item_id, i.item_title, lcp.type, ci.item_id
+ from lorsm_custom_pages lcp, ims_cp_manifests m, ims_cp_organizations o, ims_cp_items i, cr_items ci
+ where ci.item_id=lcp.page_id
+ and m.man_id=:man_id
+ and m.man_id=o.man_id
+ and o.org_id=i.org_id
+ and i.ims_item_id=ci.live_revision
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/enabler.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/enabler.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/enabler.tcl 17 Nov 2008 13:36:44 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/enabler.tcl 12 Dec 2008 14:25:35 -0000 1.3
@@ -41,23 +41,13 @@
{options {{"[_ lorsm.Enable]" t} {"[_ lorsm.Disable]" f}}}
}
- } -select_query {
- select
- case when isenabled = 't' then 'Enabled'
- else 'Disabled'
- end as isenabled
- from ims_cp_manifest_class
- where man_id = :man_id
- and lorsm_instance_id = :package_id
+ } -select_query_name enabler_form {
} -edit_data {
- db_dml do_update "
- update ims_cp_manifest_class
- set isenabled = :enable
- where man_id = :man_id
- and lorsm_instance_id = :package_id"
+ db_dml do_update {}
} -after_submit {
- ad_returnredirect [site_node::get_url_from_object_id -object_id package_id]
+ ad_returnredirect [site_node::get_url_from_object_id \
+ -object_id package_id]
ad_script_abort
}
Index: openacs-4/packages/lorsm/www/admin/enabler.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/enabler.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/enabler.xql 12 Dec 2008 14:25:35 -0000 1.1
@@ -0,0 +1,25 @@
+
+
+
+
+
+ update ims_cp_manifest_class
+ set isenabled = :enable
+ where man_id = :man_id
+ and lorsm_instance_id = :package_id
+
+
+
+
+
+ select
+ case when isenabled = 't' then 'Enabled'
+ else 'Disabled'
+ end as isenabled
+ from ims_cp_manifest_class
+ where man_id = :man_id
+ and lorsm_instance_id = :package_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/formater.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/formater.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/formater.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/formater.tcl 12 Dec 2008 14:25:35 -0000 1.4
@@ -41,26 +41,16 @@
{format:text(select)
{label "[_ lorsm.Format_1]"}
{options {[lang::util::localize_list_of_lists \
- -list [db_list_of_lists select_formats_for_select_widget {\
- select format_pretty_name, format_id
- from lorsm_course_presentation_formats
- order by format_pretty_name}]]}}
+ -list [db_list_of_lists select_formats_for_select_widget {}]]}}
}
} -edit_request {
- db_1row get_data \
- "select cp.course_presentation_format as format, pf.format_pretty_name
- from ims_cp_manifests cp, lorsm_course_presentation_formats pf
- where cp.man_id = :man_id
- and cp.course_presentation_format = pf.format_id"
+ db_1row get_data {}
set format_pretty_name [lang::util::localize $format_pretty_name]
} -edit_data {
db_transaction {
- db_dml do_update {
- update ims_cp_manifests
- set course_presentation_format = :format
- where man_id = :man_id }
+ db_dml do_update {}
}
} -after_submit {
Index: openacs-4/packages/lorsm/www/admin/formater.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/formater.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/formater.xql 12 Dec 2008 14:25:35 -0000 1.1
@@ -0,0 +1,29 @@
+
+
+
+
+
+ select format_pretty_name, format_id
+ from lorsm_course_presentation_formats
+ order by format_pretty_name
+
+
+
+
+
+ select cp.course_presentation_format as format, pf.format_pretty_name
+ from ims_cp_manifests cp, lorsm_course_presentation_formats pf
+ where cp.man_id = :man_id
+ and cp.course_presentation_format = pf.format_id
+
+
+
+
+
+ update ims_cp_manifests
+ set course_presentation_format = :format
+ where man_id = :man_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/index.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/lorsm/www/admin/index.tcl 17 Nov 2008 13:36:44 -0000 1.4
+++ openacs-4/packages/lorsm/www/admin/index.tcl 12 Dec 2008 14:25:35 -0000 1.5
@@ -122,77 +122,7 @@
}
-db_multirow -extend { ims_md_id course_url } d_courses select_d_courses {
- select
- cp.man_id,
- cp.course_name,
- cp.identifier,
- cp.version,
- case
- when cp.hasmetadata = 't' then 'Yes'
- else 'No'
- end as hasmetadata,
-
- case
- when isscorm = 't' then 'Yes'
- else 'No'
- end as isscorm,
-
- cp.fs_package_id,
- case
- when fs_package_id is null then 'f'
- else 't'
- end as lorsm_p,
-
- cp.folder_id,
- acs.creation_user,
- acs.creation_date,
- pf.folder_name,
- pf.format_name,
- acs.context_id,
- case
- when cpmc.isenabled = 't' then 'Enabled'
- else 'Disabled'
- end as isenabled,
-
- case
- when cpmc.istrackable = 't' then 'Yes'
- else 'No'
- end as istrackable,
-
- -- micheles
- -- addition for rte stuff
- -- 'Click here' as hasrtedata,
- case
- when upper(scorm_type) = 'SCO' then 'Click here'
- else ''
- end as hasrtedata,
-
- case
- when upper(scorm_type) = 'SCO' then 'delivery-scorm'
- else 'delivery'
- end as deliverymethod
-
- from
- acs_objects acs,
- ims_cp_manifest_class cpmc,
- lorsm_course_presentation_formats pf,
- -- micheles
- ims_cp_manifests cp left join (select man_id, max(scorm_type) as scorm_type
- from ims_cp_resources
- group by man_id ) as cpr using (man_id)
-
- where cp.man_id = acs.object_id
- and cp.man_id = cpmc.man_id
- and cpmc.community_id = :community_id
- and cp.course_presentation_format = pf.format_id
- and cp.man_id in (select cr.live_revision
- from cr_items cr
- where content_type = 'ims_manifest_object')
-
- order by acs.creation_date desc, cp.man_id asc
-
-} {
+db_multirow -extend { ims_md_id course_url } d_courses select_d_courses {} {
set ims_md_id $man_id
# if { [string eq $format_name "default"] } {
set course_url "$course_name"
Index: openacs-4/packages/lorsm/www/admin/index.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/index.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/index.xql 12 Dec 2008 14:25:35 -0000 1.1
@@ -0,0 +1,59 @@
+
+
+
+
+
+ select cp.man_id, cp.course_name, cp.identifier, cp.version,
+ case when cp.hasmetadata = 't' then 'Yes'
+ else 'No'
+ end as hasmetadata,
+
+ case when isscorm = 't' then 'Yes'
+ else 'No'
+ end as isscorm, cp.fs_package_id,
+
+ case when fs_package_id is null then 'f'
+ else 't'
+ end as lorsm_p,
+
+ cp.folder_id, acs.creation_user, acs.creation_date, pf.folder_name,
+ pf.format_name, acs.context_id,
+
+ case when cpmc.isenabled = 't' then 'Enabled'
+ else 'Disabled'
+ end as isenabled,
+
+ case when cpmc.istrackable = 't' then 'Yes'
+ else 'No'
+ end as istrackable,
+
+ -- micheles
+ -- addition for rte stuff
+ -- 'Click here' as hasrtedata,
+ case when upper(scorm_type) = 'SCO' then 'Click here'
+ else ''
+ end as hasrtedata,
+
+ case when upper(scorm_type) = 'SCO' then 'delivery-scorm'
+ else 'delivery'
+ end as deliverymethod
+
+ from acs_objects acs, ims_cp_manifest_class cpmc, lorsm_course_presentation_formats pf,
+ -- micheles
+ ims_cp_manifests cp left join ( select man_id, max(scorm_type) as scorm_type
+ from ims_cp_resources
+ group by man_id ) as cpr using (man_id)
+
+ where cp.man_id = acs.object_id
+ and cp.man_id = cpmc.man_id
+ and cpmc.community_id = :community_id
+ and cp.course_presentation_format = pf.format_id
+ and cp.man_id in ( select cr.live_revision
+ from cr_items cr
+ where content_type = 'ims_manifest_object')
+
+ order by acs.creation_date desc, cp.man_id asc
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/item-add-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/item-add-edit.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/lorsm/www/admin/item-add-edit.tcl 17 Nov 2008 13:36:44 -0000 1.5
+++ openacs-4/packages/lorsm/www/admin/item-add-edit.tcl 12 Dec 2008 14:25:35 -0000 1.6
@@ -24,12 +24,12 @@
} -edit_request {
set content [template::util::richtext::create \
[cr_write_content -string -item_id $item_id] text/html]
- set title [db_string get_title ""]
+ set title [db_string get_title {}]
} -new_data {
set content [template::util::richtext::get_property text $content]
- set org_id [db_string get_org_id ""]
- set item_folder_id [db_string get_folder_id ""]
+ set org_id [db_string get_org_id {}]
+ set item_folder_id [db_string get_folder_id {}]
# ad_return_complaint 1 "folder_id '${item_folder_id}'"
# TODO i bet we can make a generic webcontent
# a subset of lors::itemcp::item_add_from_object
@@ -43,15 +43,15 @@
-identifier $item_id \
-title $title \
-parent_item $org_id]
- db_dml set_sort_order ""
+ db_dml set_sort_order {}
set revision_id [content::item::get_live_revision -item_id $item_id]
content::revision::update_content \
-revision_id $revision_id \
-item_id $item_id \
-content $content \
-mime_type text/html \
- -storage_type [db_string get_storage_type ""]
+ -storage_type [db_string get_storage_type {}]
set res_id [lors::imscp::resource_add \
-identifier $revision_id \
@@ -71,8 +71,8 @@
-item_id $item_id \
-content $content \
-mime_type text/html \
- -storage_type [db_string get_storage_type ""]
- db_dml set_title ""
+ -storage_type [db_string get_storage_type {}]
+ db_dml set_title {}
} -after_submit {
if {[info exists type]} {
Index: openacs-4/packages/lorsm/www/admin/item-add-edit.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/item-add-edit.xql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/lorsm/www/admin/item-add-edit.xql 8 Oct 2008 13:01:06 -0000 1.4
+++ openacs-4/packages/lorsm/www/admin/item-add-edit.xql 12 Dec 2008 14:25:35 -0000 1.5
@@ -1,46 +1,55 @@
-
-
- select item_title
- from ims_cp_items
- where ims_item_id=(select live_revision from cr_items
- where item_id=:item_id)
-
-
+
+
+ select item_title
+ from ims_cp_items
+ where ims_item_id=(select live_revision
+ from cr_items
+ where item_id=:item_id)
+
+
-
-
- select org_id from ims_cp_organizations where man_id=:man_id
-
-
+
+
+ select org_id
+ from ims_cp_organizations
+ where man_id=:man_id
+
+
-
-
- select parent_id from cr_items where latest_revision=:org_id
-
-
+
+
+ select parent_id
+ from cr_items
+ where latest_revision=:org_id
+
+
-
-
- update ims_cp_items
- set sort_order = (select coalesce(max(sort_order),0) +1
- from ims_cp_items where org_id=:org_id)
- where ims_item_id = :ims_item_id
-
-
+
+
+ update ims_cp_items
+ set sort_order = (select coalesce(max(sort_order),0) +1
+ from ims_cp_items where org_id=:org_id)
+ where ims_item_id = :ims_item_id
+
+
-
-
- select storage_type from cr_items where item_id=:item_id
-
-
+
+
+ select storage_type
+ from cr_items
+ where item_id=:item_id
+
+
-
-
- update ims_cp_items set item_title=:title where ims_item_id=:ims_item_id
-
-
+
+
+ update ims_cp_items
+ set item_title=:title
+ where ims_item_id=:ims_item_id
+
+
Index: openacs-4/packages/lorsm/www/admin/remove-custom-page.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/remove-custom-page.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/remove-custom-page.tcl 17 Nov 2008 13:36:44 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/remove-custom-page.tcl 12 Dec 2008 14:25:35 -0000 1.3
@@ -6,10 +6,7 @@
{return_url ""}
}
-db_dml remove_page \
- "delete from lorsm_custom_pages
- where man_id=:man_id
- and type=:type"
+db_dml remove_page {}
if {$return_url eq ""} {
set return_url [export_vars -base course-structure {man_id}]
Index: openacs-4/packages/lorsm/www/admin/remove-custom-page.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/remove-custom-page.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/remove-custom-page.xql 12 Dec 2008 14:25:36 -0000 1.1
@@ -0,0 +1,13 @@
+
+
+
+
+
+ delete
+ from lorsm_custom_pages
+ where man_id=:man_id
+ and type=:type
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/reorder-items-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/reorder-items-oracle.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/reorder-items-oracle.xql 9 Apr 2007 21:16:04 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/reorder-items-oracle.xql 12 Dec 2008 14:25:36 -0000 1.3
@@ -1,13 +1,25 @@
- oracle8.1.7
+ oracle8.1.7
-
-select sort_order from (select sort_order from ims_cp_items where parent_item=:parent_item and sort_order > : sort_order order by sort_order) s where s.rownum = 1
-
+
+ select sort_order
+ from (select sort_order
+ from ims_cp_items
+ where parent_item=:parent_item
+ and sort_order > : sort_order
+ order by sort_order) s
+ where s.rownum = 1
+
-
-select sort_order from (select sort_order from ims_cp_items where parent_item=:parent_item and sort_order < : sort_order order by sort_order desc) s where s.rownum = 1
-
+
+ select sort_order
+ from (select sort_order
+ from ims_cp_items
+ where parent_item=:parent_item
+ and sort_order < : sort_order
+ order by sort_order desc) s
+ where s.rownum = 1
+
-
\ No newline at end of file
+
Index: openacs-4/packages/lorsm/www/admin/reorder-items-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/reorder-items-postgresql.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/reorder-items-postgresql.xql 9 Apr 2007 21:16:04 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/reorder-items-postgresql.xql 12 Dec 2008 14:25:36 -0000 1.3
@@ -2,16 +2,26 @@
postgresql7.1
-
-
-select sort_order from ims_cp_items where parent_item=:parent_item and sort_order > :sort_order order by sort_order limit 1
-
-
+
+
+ select sort_order
+ from ims_cp_items
+ where parent_item=:parent_item
+ and sort_order > :sort_order
+ order by sort_order
+ limit 1
+
+
-
-
-select sort_order from ims_cp_items where parent_item=:parent_item and sort_order < :sort_order order by sort_order desc limit 1
-
-
+
+
+ select sort_order
+ from ims_cp_items
+ where parent_item=:parent_item
+ and sort_order < :sort_order
+ order by sort_order desc
+ limit 1
+
+
-
\ No newline at end of file
+
Index: openacs-4/packages/lorsm/www/admin/reorder-items.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/reorder-items.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/lorsm/www/admin/reorder-items.tcl 17 Nov 2008 13:36:44 -0000 1.4
+++ openacs-4/packages/lorsm/www/admin/reorder-items.tcl 12 Dec 2008 14:25:36 -0000 1.5
@@ -6,27 +6,19 @@
}
set ims_item_id $item_id
-set man_id [db_string get_man_id ""]
-db_1row get_item_sort_and_parent { }
+set man_id [ db_string get_man_id {} ]
+db_1row get_item_sort_and_parent {}
db_transaction {
- db_list lock_rows "select ims_item_id
- from ims_cp_items
- where parent_item=:parent_item for update"
+ db_list lock_rows {}
if { $dir eq "up" } {
set next_sort_order [db_string get_prev_sort_order "" -default 1]
} else {
set next_sort_order [db_string get_next_sort_order "" -default 1]
}
- db_dml swap_sort_orders "update ims_cp_items
- set sort_order =
- (case when sort_order = :sort_order :: integer then
- :next_sort_order :: integer when sort_order = :next_sort_order ::integer then
- :sort_order end)
- where parent_item=:parent_item
- and sort_order in (:sort_order, :next_sort_order)"
+ db_dml swap_sort_orders {}
} on_error {
ad_return_error "Database error" "A database error occured while trying
Index: openacs-4/packages/lorsm/www/admin/reorder-items.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/reorder-items.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/reorder-items.xql 15 May 2007 20:14:43 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/reorder-items.xql 12 Dec 2008 14:25:36 -0000 1.3
@@ -1,40 +1,63 @@
-
-
- select
- man_id
- from
- ims_cp_organizations o, ims_cp_items i
- where
- ims_item_id=:item_id
- and o.org_id=i.org_id
-
-
+
+
+ select man_id
+ from ims_cp_organizations o, ims_cp_items i
+ where ims_item_id=:item_id
+ and o.org_id=i.org_id
+
+
-
-
- select
- sort_order, parent_item
- from
- ims_cp_items
- where
- ims_item_id = :ims_item_id
-
-
+
+
+ select sort_order, parent_item
+ from ims_cp_items
+ where ims_item_id = :ims_item_id
+
+
-
-
- select sort_order from ims_cp_items where parent_item=:parent_item and sort_order > :sort_order order by sort_order limit 1
-
-
+
+
+ select sort_order
+ from ims_cp_items
+ where parent_item=:parent_item
+ and sort_order > :sort_order
+ order by sort_order
+ limit 1
+
+
-
-
- select sort_order from ims_cp_items where parent_item=:parent_item and sort_order < :sort_order order by sort_order desc limit 1
-
-
+
+
+ select sort_order
+ from ims_cp_items
+ where parent_item=:parent_item
+ and sort_order < :sort_order
+ order by sort_order desc
+ limit 1
+
+
+
+
+ select ims_item_id
+ from ims_cp_items
+ where parent_item=:parent_item for update
+
+
+
+
+
+ update ims_cp_items
+ set sort_order =
+ ( case when sort_order = :sort_order :: integer then :next_sort_order :: integer
+ when sort_order = :next_sort_order ::integer then :sort_order end )
+ where parent_item=:parent_item
+ and sort_order in (:sort_order, :next_sort_order)
+
+
+
Index: openacs-4/packages/lorsm/www/admin/sharer.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/sharer.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/sharer.tcl 17 Nov 2008 13:36:44 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/sharer.tcl 12 Dec 2008 14:25:36 -0000 1.3
@@ -29,7 +29,8 @@
set title "[_ lorsm.lt_Share_CourseLearning_]"
set context [list "[_ lorsm.lt_Share_CourseLearning_]"]
-ad_form -name sharer \
+ad_form \
+ -name sharer \
-export {return_url folder_id} \
-form {
{man_id:key}
@@ -48,27 +49,15 @@
{options {{"[_ lorsm.Shared]" t} {"[_ lorsm.Not_Shared]" f}}}
}
- } -select_query {
- select
- case when isshared = 't' then 'Shared'
- else 'Not Shared'
- end as isshared
- from ims_cp_manifests
- where man_id = :man_id
+ } -select_query_name sharer_ad_form {
} -edit_data {
db_transaction {
- db_dml do_update {
- update ims_cp_manifests
- set isshared = :share
- where man_id = :man_id }
+ db_dml do_update {}
if {$share == "t"} {
- set party_id_students [db_string party_id {\
- select segment_id \
- from rel_segments \
- where rel_type = 'dotlrn_student_profile_rel'}]
+ set party_id_students [db_string party_id {}]
permission::grant \
-party_id $party_id_students \
@@ -82,10 +71,7 @@
} else {
- set party_id_students [db_string party_id {\
- select segment_id \
- from rel_segments \
- where rel_type = 'dotlrn_student_profile_rel'}]
+ set party_id_students [db_string party_id {}]
permission::revoke \
-party_id $party_id_students \
Index: openacs-4/packages/lorsm/www/admin/sharer.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/sharer.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/sharer.xql 12 Dec 2008 14:25:36 -0000 1.1
@@ -0,0 +1,32 @@
+
+
+
+
+
+ update ims_cp_manifests
+ set isshared = :share
+ where man_id = :man_id
+
+
+
+
+
+ select segment_id
+ from rel_segments
+ where rel_type = 'dotlrn_student_profile_rel'
+
+
+
+
+
+ select
+ case when isshared = 't' then 'Shared'
+ else 'Not Shared'
+ end as isshared
+
+ from ims_cp_manifests
+ where man_id = :man_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/tracker.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/tracker.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/tracker.tcl 17 Nov 2008 13:36:44 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/tracker.tcl 12 Dec 2008 14:25:36 -0000 1.3
@@ -21,7 +21,8 @@
set title "[_ lorsm.lt_Set_Course_Track_Opti]"
set context [list "[_ lorsm.Set_Course_Options]"]
-ad_form -name tracker \
+ad_form \
+ -name tracker \
-export {package_id} \
-form {
{man_id:key}
@@ -40,21 +41,10 @@
{options {{"[_ lorsm.Trackable_1]" t} {"[_ lorsm.No_Thanks]" f}}}
}
- } -select_query {
- select
- case when istrackable = 't' then 'Yes'
- else 'No'
- end as istrackable
- from ims_cp_manifest_class
- where man_id = :man_id
- and lorsm_instance_id = :package_id
+ } -select_query_name tracker_ad_form {
} -edit_data {
- db_dml do_update "
- update ims_cp_manifest_class
- set istrackable = :enable
- where man_id = :man_id
- and lorsm_instance_id = :package_id"
+ db_dml do_update {}
} -after_submit {
ad_returnredirect [site_node::get_url_from_object_id -object_id package_id]
Index: openacs-4/packages/lorsm/www/admin/tracker.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/tracker.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/tracker.xql 12 Dec 2008 14:25:36 -0000 1.1
@@ -0,0 +1,26 @@
+
+
+
+
+
+ update ims_cp_manifest_class
+ set istrackable = :enable
+ where man_id = :man_id
+ and lorsm_instance_id = :package_id
+
+
+
+
+
+ select
+ case when istrackable = 't' then 'Yes'
+ else 'No'
+ end as istrackable
+
+ from ims_cp_manifest_class
+ where man_id = :man_id
+ and lorsm_instance_id = :package_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/addmd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/addmd.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/md/addmd.tcl 17 Nov 2008 13:36:44 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/md/addmd.tcl 12 Dec 2008 14:25:36 -0000 1.3
@@ -50,45 +50,29 @@
} -on_submit {
db_transaction {
if {![lors::imsmd::mdExist -ims_md_id $ims_md_id]} {
- db_dml do_insert \
- "insert into ims_md(ims_md_id, schema, schemaversion)
- values (:ims_md_id, :schema, :schemaversion)"
+ db_dml do_insert {}
} else {
- db_dml do_update {
- update ims_md
- set schema = :schema, schemaversion = :schemaversion
- where ims_md_id = :ims_md_id
- }
+ db_dml do_update {}
}
# If the object_type is on any of the IMS CP object types,
# then we update also the ims cp tables accordingly.
switch $object_type {
"ims_manifest_object" {
- db_dml upd_manifest "
- update ims_cp_manifests set hasmetadata = 't'
- where man_id = :ims_md_id"
+ db_dml upd_manifest {}
} "ims_item_object" {
- db_dml upd_item "
- update ims_cp_items set hasmetadata = 't'
- where ims_item_id = :ims_md_id"
+ db_dml upd_item {}
} "ims_organization_object" {
- db_dml upd_organization "
- update ims_cp_organizations set hasmetadata = 't'
- where org_id = :ims_md_id"
+ db_dml upd_organization {}
} "ims_resource_object" {
- db_dml upd_resource "
- update ims_cp_resources set hasmetadata = 't'
- where res_id = :ims_md_id"
+ db_dml upd_resource {}
} "content_item" {
- db_dml upd_file "
- update ims_cp_files set hasmetadata = 't'
- where file_id = :ims_md_id"
+ db_dml upd_file {}
}
}
}
@@ -115,8 +99,4 @@
}
}
-db_multirow md_schema_info select_md_schema {
- select schema, schemaversion
- from ims_md
- where ims_md_id = :ims_md_id
-}
+db_multirow md_schema_info select_md_schema {}
Index: openacs-4/packages/lorsm/www/admin/md/addmd.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/addmd.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/addmd.xql 12 Dec 2008 14:25:36 -0000 1.1
@@ -0,0 +1,70 @@
+
+
+
+
+
+ insert into ims_md
+ (ims_md_id, schema, schemaversion)
+ values
+ (:ims_md_id, :schema, :schemaversion)
+
+
+
+
+
+ update ims_md
+ set schema = :schema,
+ schemaversion = :schemaversion
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_cp_manifests
+ set hasmetadata = 't'
+ where man_id = :ims_md_id
+
+
+
+
+
+ update ims_cp_items
+ set hasmetadata = 't'
+ where ims_item_id = :ims_md_id
+
+
+
+
+
+ update ims_cp_organizations
+ set hasmetadata = 't'
+ where org_id = :ims_md_id
+
+
+
+
+
+ update ims_cp_resources
+ set hasmetadata = 't'
+ where res_id = :ims_md_id
+
+
+
+
+
+ update ims_cp_files
+ set hasmetadata = 't'
+ where file_id = :ims_md_id
+
+
+
+
+
+ select schema, schemaversion
+ from ims_md
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/annotationmd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/annotationmd.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/annotationmd.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/annotationmd.tcl 12 Dec 2008 14:25:36 -0000 1.4
@@ -38,8 +38,4 @@
}
}
-db_multirow d_an_annot select_an_annot {
- select entity, ims_md_an_id, ims_md_id
- from ims_md_annotation
- where ims_md_id = :ims_md_id
-}
+db_multirow d_an_annot select_an_annot {}
Index: openacs-4/packages/lorsm/www/admin/md/annotationmd.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/annotationmd.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/annotationmd.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,12 @@
+
+
+
+
+
+ select entity, ims_md_an_id, ims_md_id
+ from ims_md_annotation
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/classificationmd.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -40,8 +40,4 @@
}
}
-db_multirow d_cl_class select_cl_class {
- select purpose_s, purpose_v, ims_md_cl_id, ims_md_id
- from ims_md_classification
- where ims_md_id = :ims_md_id
-}
+db_multirow d_cl_class select_cl_class {}
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,12 @@
+
+
+
+
+
+ select purpose_s, purpose_v, ims_md_cl_id, ims_md_id
+ from ims_md_classification
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/educationalmd.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -28,13 +28,8 @@
-elements {
intt { label "" }
}
+db_multirow d_ed_intt select_ed_intt {}
-db_multirow d_ed_intt select_ed_intt {
- select '[' || int_type_s || '] ' || int_type_v as intt
- from ims_md_educational
- where ims_md_id = :ims_md_id
-}
-
# Educational Learning Resource Type
template::list::create \
-name d_ed_lrt \
@@ -47,13 +42,8 @@
-elements {
lrt { label "" }
}
+db_multirow d_ed_lrt select_ed_lrt {}
-db_multirow d_ed_lrt select_ed_lrt {
- select '[' || lrt_s || '] ' || lrt_v as lrt
- from ims_md_educational_lrt
- where ims_md_id = :ims_md_id
-}
-
# Educational Interactivity Level
template::list::create \
-name d_ed_intl \
@@ -66,13 +56,8 @@
-elements {
intl { label "" }
}
+db_multirow d_ed_intl select_ed_intl {}
-db_multirow d_ed_intl select_ed_intl {
- select '[' || int_level_s || '] ' || int_level_v as intl
- from ims_md_educational
- where ims_md_id = :ims_md_id
-}
-
# Educational Semantic Density
template::list::create \
-name d_ed_semd \
@@ -85,13 +70,8 @@
-elements {
semd { label "" }
}
+db_multirow d_ed_semd select_ed_semd {}
-db_multirow d_ed_semd select_ed_semd {
- select '[' || sem_density_s || '] ' || sem_density_v as semd
- from ims_md_educational
- where ims_md_id = :ims_md_id
-}
-
# Educational Intended End User Role
template::list::create \
-name d_ed_ieur \
@@ -104,13 +84,8 @@
-elements {
ieur { label "" }
}
+db_multirow d_ed_ieur select_ed_ieur {}
-db_multirow d_ed_ieur select_ed_ieur {
- select '[' || ieur_s || '] ' || ieur_v as ieur
- from ims_md_educational_ieur
- where ims_md_id = :ims_md_id
-}
-
# Educational Context
template::list::create \
-name d_ed_cont \
@@ -123,13 +98,8 @@
-elements {
context { label "" }
}
+db_multirow d_ed_cont select_ed_cont {}
-db_multirow d_ed_cont select_ed_cont {
- select '[' || context_s || '] ' || context_v as context
- from ims_md_educational_context
- where ims_md_id = :ims_md_id
-}
-
# Educational Typical Age Range
template::list::create \
-name d_ed_tar \
@@ -142,13 +112,8 @@
-elements {
tar { label "" }
}
+db_multirow d_ed_tar select_ed_tar {}
-db_multirow d_ed_tar select_ed_tar {
- select '[' || tar_l || '] ' || tar_s as tar
- from ims_md_educational_tar
- where ims_md_id = :ims_md_id
-}
-
# Educational Difficulty
template::list::create \
-name d_ed_dif \
@@ -161,13 +126,8 @@
-elements {
diff { label "" }
}
+db_multirow d_ed_dif select_ed_dif {}
-db_multirow d_ed_dif select_ed_dif {
- select '[' || difficulty_s || '] ' || difficulty_v as diff
- from ims_md_educational
- where ims_md_id = :ims_md_id
-}
-
# Educational Typical Learning Time
template::list::create \
-name d_ed_tlt \
@@ -181,14 +141,8 @@
tlt { label "" }
tlt_ls { label "" }
}
+db_multirow d_ed_tlt select_ed_tlt {}
-db_multirow d_ed_tlt select_ed_tlt {
- select type_lrn_time as tlt,
- '[' || type_lrn_time_l || '] ' || type_lrn_time_s as tlt_ls
- from ims_md_educational
- where ims_md_id = :ims_md_id
-}
-
# Educational Description
template::list::create \
-name d_ed_desc \
@@ -201,13 +155,8 @@
-elements {
desc { label "" }
}
+db_multirow d_ed_desc select_ed_desc {}
-db_multirow d_ed_desc select_ed_desc {
- select '[' || descrip_l || '] ' || descrip_s as desc
- from ims_md_educational_descrip
- where ims_md_id = :ims_md_id
-}
-
# Educational Language
template::list::create \
-name d_ed_lang \
@@ -220,9 +169,4 @@
-elements {
language { label "" }
}
-
-db_multirow d_ed_lang select_ed_lang {
- select language
- from ims_md_educational_lang
- where ims_md_id = :ims_md_id
-}
+db_multirow d_ed_lang select_ed_lang {}
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,143 @@
+
+
+
+
+
+ select '[' || int_type_s || '] ' || int_type_v as intt
+ from ims_md_educational
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select '[' || lrt_s || '] ' || lrt_v as lrt
+ from ims_md_educational_lrt
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select '[' || int_level_s || '] ' || int_level_v as intl
+ from ims_md_educational
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select '[' || sem_density_s || '] ' || sem_density_v as semd
+ from ims_md_educational
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select '[' || ieur_s || '] ' || ieur_v as ieur
+ from ims_md_educational_ieur
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select '[' || context_s || '] ' || context_v as context
+ from ims_md_educational_context
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select '[' || tar_l || '] ' || tar_s as tar
+ from ims_md_educational_tar
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select '[' || difficulty_s || '] ' || difficulty_v as diff
+ from ims_md_educational
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select type_lrn_time as tlt,
+ '[' || type_lrn_time_l || '] ' || type_lrn_time_s as tlt_ls
+ from ims_md_educational
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select '[' || descrip_l || '] ' || descrip_s as desc
+ from ims_md_educational_descrip
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select language
+ from ims_md_educational_lang
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/generalmd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/generalmd.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/generalmd.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/generalmd.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -32,12 +32,7 @@
title_l { label "" }
title_s { label "" }
}
-
-db_multirow d_gen_titles select_ge_titles {
- select title_l, title_s
- from ims_md_general_title
- where ims_md_id = :ims_md_id
-} {
+db_multirow d_gen_titles select_ge_titles {} {
set item_url [export_vars -base "item" { ims_md_id }]
}
@@ -54,13 +49,8 @@
descrip_l { label "" }
descrip_s { label "" }
}
+db_multirow d_gen_desc select_ge_desc {}
-db_multirow d_gen_desc select_ge_desc {
- select descrip_l, descrip_s
- from ims_md_general_desc
- where ims_md_id = :ims_md_id
-}
-
# General Catalog-entry
template::list::create \
-name d_gen_cata \
@@ -75,15 +65,10 @@
entry_l { label "" }
entry_s { label "" }
}
+db_multirow d_gen_cata select_ge_cata {}
-db_multirow d_gen_cata select_ge_cata {
- select catalog, entry_l, entry_s
- from ims_md_general_cata
- where ims_md_id = :ims_md_id
-}
-
# General Language
template::list::create \
-name d_gen_lang \
@@ -96,13 +81,8 @@
-elements {
language { label "" }
}
+db_multirow d_gen_lang select_ge_lang {}
-db_multirow d_gen_lang select_ge_lang {
- select language
- from ims_md_general_lang
- where ims_md_id = :ims_md_id
-}
-
# General Keywords
template::list::create \
-name d_gen_key \
@@ -116,13 +96,8 @@
keyword_l { label "" }
keyword_s { label "" }
}
+db_multirow d_gen_key select_ge_key {}
-db_multirow d_gen_key select_ge_key {
- select keyword_l, keyword_s
- from ims_md_general_key
- where ims_md_id = :ims_md_id
-}
-
# General Coverage
template::list::create \
-name d_gen_cover \
@@ -136,13 +111,8 @@
cover_l { label "" }
cover_s { label "" }
}
+db_multirow d_gen_cover select_ge_cover {}
-db_multirow d_gen_cover select_ge_cover {
- select cover_l, cover_s
- from ims_md_general_cover
- where ims_md_id = :ims_md_id
-}
-
# General Structure
template::list::create \
-name d_gen_struc \
@@ -156,14 +126,9 @@
structure_s { label "" }
structure_v { label "" }
}
+db_multirow d_gen_struc select_ge_struc {}
-db_multirow d_gen_struc select_ge_struc {
- select structure_s, structure_v
- from ims_md_general
- where ims_md_id = :ims_md_id
-}
-
# General Aggregation level
template::list::create \
-name d_gen_aggl \
@@ -177,9 +142,4 @@
agg_level_s { label "" }
agg_level_v { label "" }
}
-
-db_multirow d_gen_aggl select_ge_aggl {
- select agg_level_s, agg_level_v
- from ims_md_general
- where ims_md_id = :ims_md_id
-}
+db_multirow d_gen_aggl select_ge_aggl {}
Index: openacs-4/packages/lorsm/www/admin/md/generalmd.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/generalmd.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/generalmd.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,68 @@
+
+
+
+
+
+ select title_l, title_s
+ from ims_md_general_title
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select descrip_l, descrip_s
+ from ims_md_general_desc
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select catalog, entry_l, entry_s
+ from ims_md_general_cata
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select language
+ from ims_md_general_lang
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select keyword_l, keyword_s
+ from ims_md_general_key
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select cover_l, cover_s
+ from ims_md_general_cover
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select structure_s, structure_v
+ from ims_md_general
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select agg_level_s, agg_level_v
+ from ims_md_general
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/lifecyclemd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/lifecyclemd.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/lifecyclemd.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/lifecyclemd.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -32,11 +32,7 @@
version_s { label "" }
}
-db_multirow d_lf_ver select_lf_ver {
- select version_l, version_s
- from ims_md_life_cycle
- where ims_md_id = :ims_md_id
-}
+db_multirow d_lf_ver select_lf_ver {}
# Lifecycle status
template::list::create \
@@ -52,11 +48,7 @@
status_v { label "" }
}
-db_multirow d_lf_stat select_lf_stat {
- select status_s, status_v
- from ims_md_life_cycle
- where ims_md_id = :ims_md_id
-}
+db_multirow d_lf_stat select_lf_stat {}
# Lifecycle Contrib
@@ -75,11 +67,4 @@
cont_date_ls { label "[_ lorsm.Description_1]" }
}
-db_multirow d_lf_cont select_lf_cont {
- select lfc.role_v || ' ' || '[' || lfc.role_s || ']' as role,
- lfce.entity, lfc.cont_date,
- '[' || lfc.cont_date_l || ']' || ' ' || lfc.cont_date_s as cont_date_ls
- from ims_md_life_cycle_contrib lfc, ims_md_life_cycle_contrib_entity lfce
- where lfc.ims_md_lf_cont_id = lfce.ims_md_lf_cont_id
- and lfc.ims_md_id = :ims_md_id
-}
+db_multirow d_lf_cont select_lf_cont {}
Index: openacs-4/packages/lorsm/www/admin/md/lifecyclemd.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/lifecyclemd.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/lifecyclemd.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,31 @@
+
+
+
+
+
+ select version_l, version_s
+ from ims_md_life_cycle
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select status_s, status_v
+ from ims_md_life_cycle
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select lfc.role_v || ' ' || '[' || lfc.role_s || ']' as role,
+ lfce.entity, lfc.cont_date,
+ '[' || lfc.cont_date_l || ']' || ' ' || lfc.cont_date_s as cont_date_ls
+ from ims_md_life_cycle_contrib lfc, ims_md_life_cycle_contrib_entity lfce
+ where lfc.ims_md_lf_cont_id = lfce.ims_md_lf_cont_id
+ and lfc.ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/metamd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/metamd.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/metamd.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/metamd.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -30,14 +30,9 @@
catalog { label "[_ lorsm.Catalog_1]" }
entry_ls { label "[_ lorsm.Language_Entry]" }
}
+db_multirow d_md_cata select_md_cata {}
-db_multirow d_md_cata select_md_cata {
- select catalog, '[' || entry_l || ']' || ' ' || entry_s as entry_ls
- from ims_md_metadata_cata
- where ims_md_id = :ims_md_id
-}
-
# Metametadata Contrib
template::list::create \
-name d_md_cont \
@@ -54,16 +49,8 @@
cont_date { label "[_ lorsm.Contribution_Date]" }
cont_date_ls { label "[_ lorsm.Description_1]" }
}
+db_multirow d_md_cont select_md_cont {}
-db_multirow d_md_cont select_md_cont {
- select mdc.role_v || ' ' || '[' || mdc.role_s || ']' as role,
- mdce.entity, mdc.cont_date,
- '[' || mdc.cont_date_l || ']' || ' ' || mdc.cont_date_s as cont_date_ls
- from ims_md_metadata_contrib mdc, ims_md_metadata_contrib_entity mdce
- where mdc.ims_md_md_cont_id = mdce.ims_md_md_cont_id
- and mdc.ims_md_id = :ims_md_id
-}
-
# Metametadata metadatascheme
template::list::create \
-name d_md_scheme \
@@ -76,13 +63,8 @@
-elements {
scheme { label "" }
}
+db_multirow d_md_scheme select_md_scheme {}
-db_multirow d_md_scheme select_md_scheme {
- select scheme
- from ims_md_metadata_scheme
- where ims_md_id = :ims_md_id
-}
-
# Metametadata language
template::list::create \
-name d_md_lang \
@@ -95,9 +77,4 @@
-elements {
language { label "" }
}
-
-db_multirow d_md_lang select_md_lang {
- select language
- from ims_md_metadata
- where ims_md_id = :ims_md_id
-}
+db_multirow d_md_lang select_md_lang {}
Index: openacs-4/packages/lorsm/www/admin/md/metamd.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/metamd.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/metamd.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,39 @@
+
+
+
+
+
+ select catalog, '[' || entry_l || ']' || ' ' || entry_s as entry_ls
+ from ims_md_metadata_cata
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select mdc.role_v || ' ' || '[' || mdc.role_s || ']' as role,
+ mdce.entity, mdc.cont_date,
+ '[' || mdc.cont_date_l || ']' || ' ' || mdc.cont_date_s as cont_date_ls
+ from ims_md_metadata_contrib mdc, ims_md_metadata_contrib_entity mdce
+ where mdc.ims_md_md_cont_id = mdce.ims_md_md_cont_id
+ and mdc.ims_md_id = :ims_md_id
+
+
+
+
+
+ select scheme
+ from ims_md_metadata_scheme
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select language
+ from ims_md_metadata
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/relationmd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/relationmd.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/relationmd.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/relationmd.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -38,10 +38,4 @@
html { align center }
}
}
-
-db_multirow d_re_relat select_re_relat {
- select re.kind_s, re.kind_v, re.ims_md_id, re.ims_md_re_id, rere.ims_md_re_re_id
- from ims_md_relation re, ims_md_relation_resource rere
- where re.ims_md_id = :ims_md_id
- and rere.ims_md_re_id = re.ims_md_re_id
-}
+db_multirow d_re_relat select_re_relat {}
Index: openacs-4/packages/lorsm/www/admin/md/relationmd.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/relationmd.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/relationmd.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,14 @@
+
+
+
+
+
+ select re.kind_s, re.kind_v, re.ims_md_id,
+ re.ims_md_re_id, rere.ims_md_re_re_id
+ from ims_md_relation re, ims_md_relation_resource rere
+ where re.ims_md_id = :ims_md_id
+ and rere.ims_md_re_id = re.ims_md_re_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/rightsmd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/rightsmd.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/rightsmd.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/rightsmd.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -26,11 +26,7 @@
cost { label "" }
}
-db_multirow d_ri_cost select_ri_cost {
- select '[' || cost_s || '] ' || cost_v as cost
- from ims_md_rights
- where ims_md_id = :ims_md_id
-}
+db_multirow d_ri_cost select_ri_cost {}
# Rights Copyright or other Restrictions
template::list::create \
@@ -45,11 +41,7 @@
caor { label "" }
}
-db_multirow d_ri_caor select_ri_caor {
- select '[' || caor_s || '] ' || caor_v as caor
- from ims_md_rights
- where ims_md_id = :ims_md_id
-}
+db_multirow d_ri_caor select_ri_caor {}
# Rights Description
template::list::create \
@@ -63,9 +55,4 @@
-elements {
desc { label "" }
}
-
-db_multirow d_ri_desc select_ri_desc {
- select '[' || descrip_l || '] ' || descrip_s as desc
- from ims_md_rights
- where ims_md_id = :ims_md_id
-}
+db_multirow d_ri_desc select_ri_desc {}
Index: openacs-4/packages/lorsm/www/admin/md/rightsmd.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/rightsmd.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/rightsmd.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,28 @@
+
+
+
+
+
+ select '[' || cost_s || '] ' || cost_v as cost
+ from ims_md_rights
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select '[' || caor_s || '] ' || caor_v as caor
+ from ims_md_rights
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select '[' || descrip_l || '] ' || descrip_s as desc
+ from ims_md_rights
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/technicalmd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/technicalmd.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/technicalmd.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/technicalmd.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -29,13 +29,8 @@
-elements {
format { label "" }
}
+db_multirow d_te_form select_te_form {}
-db_multirow d_te_form select_te_form {
- select format
- from ims_md_technical_format
- where ims_md_id = :ims_md_id
-}
-
# Technical Size
template::list::create \
-name d_te_size \
@@ -48,13 +43,8 @@
-elements {
t_size_bytes { label "" }
}
+db_multirow d_te_size {}
-db_multirow d_te_size select_te_size {
- select t_size || ' bytes' as t_size_bytes
- from ims_md_technical
- where ims_md_id = :ims_md_id
-}
-
# Technical Location
template::list::create \
-name d_te_loca \
@@ -68,13 +58,8 @@
type { label "" }
location { label "" }
}
+db_multirow d_te_loca select_te_loca {}
-db_multirow d_te_loca select_te_loca {
- select type, location
- from ims_md_technical_location
- where ims_md_id = :ims_md_id
-}
-
# Technical Requirements
template::list::create \
-name d_te_req \
@@ -90,15 +75,8 @@
min_version { label "[_ lorsm.Min_Version]" }
max_version { label "[_ lorsm.Max_Version]" }
}
+db_multirow d_te_req select_te_req {}
-db_multirow d_te_req select_te_req {
- select '[' || type_s || ']' || ' ' || type_v as type,
- '[' || name_s || ']' || ' ' || name_v as name,
- min_version, max_version
- from ims_md_technical_requirement
- where ims_md_id = :ims_md_id
-}
-
# Technical Installation Remarks
template::list::create \
-name d_te_inst \
@@ -111,13 +89,8 @@
-elements {
instl_rmrks { label "" }
}
+db_multirow d_te_inst select_te_inst {}
-db_multirow d_te_inst select_te_inst {
- select '[' || instl_rmrks_l || ']' || ' ' || instl_rmrks_s as instl_rmrks
- from ims_md_technical
- where ims_md_id = :ims_md_id
-}
-
# Technical Other Platform Requirements
template::list::create \
-name d_te_otr \
@@ -130,13 +103,8 @@
-elements {
otr_plt { label "" }
}
+db_multirow d_te_otr select_te_otr {}
-db_multirow d_te_otr select_te_otr {
- select '[' || otr_plt_l || ']' || ' ' || otr_plt_s as otr_plt
- from ims_md_technical
- where ims_md_id = :ims_md_id
-}
-
# Technical Duration
template::list::create \
-name d_te_dur \
@@ -151,9 +119,4 @@
duration_l { label "" }
duration_s { label "" }
}
-
-db_multirow d_te_dur select_te_dur {
- select duration_l, duration_s, duration || 's' as duration_sec
- from ims_md_technical
- where ims_md_id = :ims_md_id
-}
+db_multirow d_te_dur select_te_dur {}
Index: openacs-4/packages/lorsm/www/admin/md/technicalmd.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/technicalmd.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/technicalmd.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,61 @@
+
+
+
+
+
+ select format
+ from ims_md_technical_format
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select t_size || ' bytes' as t_size_bytes
+ from ims_md_technical
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select type, location
+ from ims_md_technical_location
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select '[' || type_s || ']' || ' ' || type_v as type,
+ '[' || name_s || ']' || ' ' || name_v as name, min_version, max_version
+ from ims_md_technical_requirement
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select '[' || instl_rmrks_l || ']' || ' ' || instl_rmrks_s as instl_rmrks
+ from ims_md_technical
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select '[' || otr_plt_l || ']' || ' ' || otr_plt_s as otr_plt
+ from ims_md_technical
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select duration_l, duration_s, duration || 's' as duration_sec
+ from ims_md_technical
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation.tcl 17 Nov 2008 13:36:44 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation.tcl 12 Dec 2008 14:25:37 -0000 1.3
@@ -34,11 +34,7 @@
entity { label "" }
}
-db_multirow d_an_ent select_an_ent {
- select entity
- from ims_md_annotation
- where ims_md_an_id = :ims_md_an_id
-}
+db_multirow d_an_ent select_an_ent {}
# Annotation Date
template::list::create \
@@ -54,11 +50,7 @@
datels { label "[_ lorsm.Description_1]" }
}
-db_multirow d_an_date select_an_date {
- select date, '[' || date_l || '] ' || date_s as datels
- from ims_md_annotation
- where ims_md_an_id = :ims_md_an_id
-}
+db_multirow d_an_date select_an_date {}
# Annotation Description
template::list::create \
@@ -73,8 +65,4 @@
desc { label "" }
}
-db_multirow d_an_desc select_an_desc {
- select '[' || descrip_l || '] ' || descrip_s as desc
- from ims_md_annotation_descrip
- where ims_md_an_id = :ims_md_an_id
-}
+db_multirow d_an_desc select_an_desc {}
Index: openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,28 @@
+
+
+
+
+
+ select entity
+ from ims_md_annotation
+ where ims_md_an_id = :ims_md_an_id
+
+
+
+
+
+ select date, '[' || date_l || '] ' || date_s as datels
+ from ims_md_annotation
+ where ims_md_an_id = :ims_md_an_id
+
+
+
+
+
+ select '[' || descrip_l || '] ' || descrip_s as desc
+ from ims_md_annotation_descrip
+ where ims_md_an_id = :ims_md_an_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_add.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_add.tcl 17 Nov 2008 13:36:44 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_add.tcl 12 Dec 2008 14:25:37 -0000 1.3
@@ -37,9 +37,7 @@
}
} -new_data {
- db_dml do_insert \
- "insert into ims_md_annotation (ims_md_an_id, ims_md_id)
- values (:ims_md_an_id, :ims_md_id)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "../annotationmd" {ims_md_id}]
Index: openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_add.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_add.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_add.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,13 @@
+
+
+
+
+
+ insert into ims_md_annotation
+ (ims_md_an_id, ims_md_id)
+ values
+ (:ims_md_an_id, :ims_md_id)
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_date.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_date.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_date.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_date.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -55,15 +55,10 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_annotation
- where ims_md_an_id = :ims_md_an_id
+ } -select_query_name annotationmd_date_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_annotation set date = :date, date_l = :date_l, date_s = :date_s
- where ims_md_an_id = :ims_md_an_id "
+ db_dml do_update {}
} -after_submit {
ad_returnredirect [export_vars \
@@ -82,8 +77,4 @@
datels { label "[_ lorsm.Description_1]" }
}
-db_multirow d_an_date select_an_date {
- select date, '[' || date_l || '] ' || date_s as datels, ims_md_an_id, ims_md_id
- from ims_md_annotation
- where ims_md_an_id = :ims_md_an_id
-}
+db_multirow d_an_date select_an_date {}
Index: openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_date.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_date.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_date.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,30 @@
+
+
+
+
+
+ update ims_md_annotation
+ set date = :date,
+ date_l = :date_l,
+ date_s = :date_s
+ where ims_md_an_id = :ims_md_an_id
+
+
+
+
+
+ select date, '[' || date_l || '] ' || date_s as datels, ims_md_an_id, ims_md_id
+ from ims_md_annotation
+ where ims_md_an_id = :ims_md_an_id
+
+
+
+
+
+ select *
+ from ims_md_annotation
+ where ims_md_an_id = :ims_md_an_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_desc.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_desc.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_desc.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_desc.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -65,22 +65,13 @@
{ims_md_an_id:text(hidden) {value $ims_md_an_id}}
- } -select_query {
- select *
- from ims_md_annotation_descrip
- where ims_md_an_de_id = :ims_md_an_de_id
- and ims_md_an_id = :ims_md_an_id
+ } -select_query_name annotationmd_desc_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_annotation_descrip
- set descrip_l = :descrip_l, descrip_s = :descrip_s
- where ims_md_an_de_id = :ims_md_an_de_id"
+ db_dml do_update {}
} -new_data {
- db_dml do_insert \
- "insert into ims_md_annotation_descrip (ims_md_an_de_id, ims_md_an_id, descrip_l, descrip_s)
- values (:ims_md_an_de_id, :ims_md_an_id, :descrip_l, :descrip_s)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "annotation" {ims_md_an_id ims_md_id}]
@@ -106,10 +97,4 @@
}
}
-db_multirow d_an_desc select_an_desc {
- select '[' || ande.descrip_l || '] ' || ande.descrip_s as desc,
- ande.ims_md_an_de_id, an.ims_md_an_id, an.ims_md_id
- from ims_md_annotation_descrip ande, ims_md_annotation an
- where ande.ims_md_an_id = an.ims_md_an_id
- and ande.ims_md_an_id = :ims_md_an_id
-}
+db_multirow d_an_desc select_an_desc {}
Index: openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_desc.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_desc.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_desc.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,41 @@
+
+
+
+
+
+ update ims_md_annotation_descrip
+ set descrip_l = :descrip_l,
+ descrip_s = :descrip_s
+ where ims_md_an_de_id = :ims_md_an_de_id
+
+
+
+
+
+ insert into ims_md_annotation_descrip
+ (ims_md_an_de_id, ims_md_an_id, descrip_l, descrip_s)
+ values
+ (:ims_md_an_de_id, :ims_md_an_id, :descrip_l, :descrip_s)
+
+
+
+
+
+ select '[' || ande.descrip_l || '] ' || ande.descrip_s as desc,
+ ande.ims_md_an_de_id, an.ims_md_an_id, an.ims_md_id
+ from ims_md_annotation_descrip ande, ims_md_annotation an
+ where ande.ims_md_an_id = an.ims_md_an_id
+ and ande.ims_md_an_id = :ims_md_an_id
+
+
+
+
+
+ select *
+ from ims_md_annotation_descrip
+ where ims_md_an_de_id = :ims_md_an_de_id
+ and ims_md_an_id = :ims_md_an_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_ent.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_ent.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_ent.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_ent.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -46,16 +46,10 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_annotation
- where ims_md_an_id = :ims_md_an_id
+ } -select_query_name annotationmd_ent_ad_form {
} -edit_data {
- db_dml do_update
- "update ims_md_annotation
- set entity = :entity
- where ims_md_an_id = :ims_md_an_id "
+ db_dml do_update {}
} -after_submit {
ad_returnredirect [export_vars -base "annotation" {ims_md_an_id ims_md_id}]
@@ -72,8 +66,4 @@
entity { label "" }
}
-db_multirow d_an_ent select_an_ent {
- select entity, ims_md_an_id, ims_md_id
- from ims_md_annotation
- where ims_md_an_id = :ims_md_an_id
-}
+db_multirow d_an_ent select_an_ent {}
Index: openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_ent.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_ent.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/annotationmd/annotation_ent.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,28 @@
+
+
+
+
+
+ update ims_md_annotation
+ set entity = :entity
+ where ims_md_an_id = :ims_md_an_id
+
+
+
+
+
+ select entity, ims_md_an_id, ims_md_id
+ from ims_md_annotation
+ where ims_md_an_id = :ims_md_an_id
+
+
+
+
+
+ select *
+ from ims_md_annotation
+ where ims_md_an_id = :ims_md_an_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/annotationmd/xql_generico.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/annotationmd/Attic/xql_generico.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/annotationmd/xql_generico.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd/classification.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd/classification.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/md/classificationmd/classification.tcl 17 Nov 2008 13:36:44 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd/classification.tcl 12 Dec 2008 14:25:37 -0000 1.3
@@ -39,11 +39,7 @@
purpose_v { label "" }
}
-db_multirow d_cl_pur select_cl_pur {
- select purpose_s, purpose_v
- from ims_md_classification
- where ims_md_cl_id = :ims_md_cl_id
-}
+db_multirow d_cl_pur select_cl_pur {}
# Classification Taxonomic Path
template::list::create \
@@ -67,13 +63,7 @@
}
}
-db_multirow d_cl_tpath select_cl_tpath {
- select '[' || ctp.source_l || '] ' || ctp.source_v as source, ctp.ims_md_cl_ta_id,
- ctp.ims_md_cl_id, cl.ims_md_id
- from ims_md_classification_taxpath ctp, ims_md_classification cl
- where ctp.ims_md_cl_id = :ims_md_cl_id
- and cl.ims_md_cl_id = :ims_md_cl_id
-}
+db_multirow d_cl_tpath select_cl_tpath {}
# Classification Description
template::list::create \
@@ -91,11 +81,7 @@
desc { label "" }
}
-db_multirow d_cl_desc select_cl_desc {
- select '[' || descrip_l || '] ' || descrip_s as desc
- from ims_md_classification_descrip
- where ims_md_cl_id = :ims_md_cl_id
-}
+db_multirow d_cl_desc select_cl_desc {}
# Classification Keywords
template::list::create \
@@ -113,8 +99,4 @@
keyword { label "" }
}
-db_multirow d_cl_key select_cl_key {
- select '[' || keyword_l || '] ' || keyword_s as keyword
- from ims_md_classification_keyword
- where ims_md_cl_id = :ims_md_cl_id
-}
+db_multirow d_cl_key select_cl_key {}
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd/classification.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd/classification.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd/classification.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,38 @@
+
+
+
+
+
+ select purpose_s, purpose_v
+ from ims_md_classification
+ where ims_md_cl_id = :ims_md_cl_id
+
+
+
+
+
+ select '[' || ctp.source_l || '] ' || ctp.source_v as source,
+ ctp.ims_md_cl_ta_id, ctp.ims_md_cl_id, cl.ims_md_id
+ from ims_md_classification_taxpath ctp, ims_md_classification cl
+ where ctp.ims_md_cl_id = :ims_md_cl_id
+ and cl.ims_md_cl_id = :ims_md_cl_id
+
+
+
+
+
+ select '[' || descrip_l || '] ' || descrip_s as desc
+ from ims_md_classification_descrip
+ where ims_md_cl_id = :ims_md_cl_id
+
+
+
+
+
+ select '[' || keyword_l || '] ' || keyword_s as keyword
+ from ims_md_classification_keyword
+ where ims_md_cl_id = :ims_md_cl_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_add.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_add.tcl 17 Nov 2008 13:36:44 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_add.tcl 12 Dec 2008 14:25:37 -0000 1.3
@@ -29,9 +29,7 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
} -new_data {
- db_dml do_insert \
- "insert into ims_md_classification (ims_md_cl_id, ims_md_id)
- values (:ims_md_cl_id, :ims_md_id)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "../classificationmd" {ims_md_id}]
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_add.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_add.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_add.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,13 @@
+
+
+
+
+
+ insert into ims_md_classification
+ (ims_md_cl_id, ims_md_id)
+ values
+ (:ims_md_cl_id, :ims_md_id)
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_addpath.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_addpath.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_addpath.tcl 17 Nov 2008 13:36:44 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_addpath.tcl 12 Dec 2008 14:25:37 -0000 1.3
@@ -47,9 +47,7 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
} -new_data {
- db_dml do_insert \
- "insert into ims_md_classification_taxpath (ims_md_cl_ta_id, ims_md_cl_id)
- values (:ims_md_cl_ta_id, :ims_md_cl_id)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "classification" {ims_md_cl_id ims_md_id}]
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_addpath.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_addpath.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_addpath.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,13 @@
+
+
+
+
+
+ insert into ims_md_classification_taxpath
+ (ims_md_cl_ta_id, ims_md_cl_id)
+ values
+ (:ims_md_cl_ta_id, :ims_md_cl_id)
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_desc.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_desc.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_desc.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_desc.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -78,23 +78,13 @@
{ims_md_cl_id:text(hidden) {value $ims_md_cl_id}}
- } -select_query {
- select *
- from ims_md_classification_descrip
- where ims_md_cl_de_id = :ims_md_cl_de_id
- and ims_md_cl_id = :ims_md_cl_id
+ } -select_query_name classificationmd_desc_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_classification_descrip
- set descrip_l = :descrip_l,
- descrip_s = :descrip_s
- where ims_md_cl_de_id = :ims_md_cl_de_id"
+ db_dml do_update {}
} -new_data {
- db_dml do_insert \
- "insert into ims_md_classification_descrip (ims_md_cl_de_id, ims_md_cl_id, descrip_l, descrip_s)
- values (:ims_md_cl_de_id, :ims_md_cl_id, :descrip_l, :descrip_s)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "classification" {ims_md_cl_id ims_md_id}]
@@ -117,10 +107,4 @@
}
}
-db_multirow d_cl_desc select_cl_desc {
- select '[' || clde.descrip_l || '] ' || clde.descrip_s as desc,
- clde.ims_md_cl_de_id, cl.ims_md_cl_id, cl.ims_md_id
- from ims_md_classification_descrip clde, ims_md_classification cl
- where clde.ims_md_cl_id = cl.ims_md_cl_id
- and clde.ims_md_cl_id = :ims_md_cl_id
-}
+db_multirow d_cl_desc select_cl_desc {}
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_desc.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_desc.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_desc.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,41 @@
+
+
+
+
+
+ update ims_md_classification_descrip
+ set descrip_l = :descrip_l,
+ descrip_s = :descrip_s
+ where ims_md_cl_de_id = :ims_md_cl_de_id
+
+
+
+
+
+ insert into ims_md_classification_descrip
+ (ims_md_cl_de_id, ims_md_cl_id, descrip_l, descrip_s)
+ values
+ (:ims_md_cl_de_id, :ims_md_cl_id, :descrip_l, :descrip_s)
+
+
+
+
+
+ select '[' || clde.descrip_l || '] ' || clde.descrip_s as desc,
+ clde.ims_md_cl_de_id, cl.ims_md_cl_id, cl.ims_md_id
+ from ims_md_classification_descrip clde, ims_md_classification cl
+ where clde.ims_md_cl_id = cl.ims_md_cl_id
+ and clde.ims_md_cl_id = :ims_md_cl_id
+
+
+
+
+
+ select *
+ from ims_md_classification_descrip
+ where ims_md_cl_de_id = :ims_md_cl_de_id
+ and ims_md_cl_id = :ims_md_cl_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_key.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_key.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_key.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_key.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -76,23 +76,13 @@
{ims_md_cl_id:text(hidden) {value $ims_md_cl_id}}
- } -select_query {
- select *
- from ims_md_classification_keyword
- where ims_md_cl_ke_id = :ims_md_cl_ke_id
- and ims_md_cl_id = :ims_md_cl_id
+ } -select_query_name classificationmd_key_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_classification_keyword
- set keyword_l = :keyword_l,
- keyword_s = :keyword_s
- where ims_md_cl_ke_id = :ims_md_cl_ke_id"
+ db_dml do_update {}
} -new_data {
- db_dml do_insert \
- "insert into ims_md_classification_keyword (ims_md_cl_ke_id, ims_md_cl_id, keyword_l, keyword_s)
- values (:ims_md_cl_ke_id, :ims_md_cl_id, :keyword_l, :keyword_s)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "classification" {ims_md_cl_id ims_md_id}]
@@ -115,10 +105,4 @@
}
}
-db_multirow d_cl_key select_cl_key {
- select '[' || kw.keyword_l || '] ' || kw.keyword_s as keyword,
- kw.ims_md_cl_ke_id, cl.ims_md_cl_id, cl.ims_md_id
- from ims_md_classification_keyword kw, ims_md_classification cl
- where kw.ims_md_cl_id = cl.ims_md_cl_id
- and kw.ims_md_cl_id = :ims_md_cl_id
-}
+db_multirow d_cl_key select_cl_key {}
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_key.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_key.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_key.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,41 @@
+
+
+
+
+
+ update ims_md_classification_keyword
+ set keyword_l = :keyword_l,
+ keyword_s = :keyword_s
+ where ims_md_cl_ke_id = :ims_md_cl_ke_id
+
+
+
+
+
+ insert into ims_md_classification_keyword
+ (ims_md_cl_ke_id, ims_md_cl_id, keyword_l, keyword_s)
+ values
+ (:ims_md_cl_ke_id, :ims_md_cl_id, :keyword_l, :keyword_s)
+
+
+
+
+
+ select *
+ from ims_md_classification_keyword
+ where ims_md_cl_ke_id = :ims_md_cl_ke_id
+ and ims_md_cl_id = :ims_md_cl_id
+
+
+
+
+
+ select '[' || kw.keyword_l || '] ' || kw.keyword_s as keyword,
+ kw.ims_md_cl_ke_id, cl.ims_md_cl_id, cl.ims_md_id
+ from ims_md_classification_keyword kw, ims_md_classification cl
+ where kw.ims_md_cl_id = cl.ims_md_cl_id
+ and kw.ims_md_cl_id = :ims_md_cl_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_pur.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_pur.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_pur.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_pur.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -57,17 +57,10 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_classification
- where ims_md_cl_id = :ims_md_cl_id
+ } -select_query_name classificationmd_pur_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_classification
- set purpose_s = :purpose_s,
- purpose_v = :purpose_v
- where ims_md_cl_id = :ims_md_cl_id "
+ db_dml do_update {}
} -after_submit {
ad_returnredirect [export_vars -base "classification" {ims_md_cl_id ims_md_id}]
@@ -85,8 +78,4 @@
purpose_v { label "" }
}
-db_multirow d_cl_pur select_cl_pur {
- select purpose_s, purpose_v, ims_md_cl_id, ims_md_id
- from ims_md_classification
- where ims_md_cl_id = :ims_md_cl_id
-}
+db_multirow d_cl_pur select_cl_pur {}
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_pur.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_pur.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_pur.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,29 @@
+
+
+
+
+
+ update ims_md_classification
+ set purpose_s = :purpose_s,
+ purpose_v = :purpose_v
+ where ims_md_cl_id = :ims_md_cl_id
+
+
+
+
+
+ select purpose_s, purpose_v, ims_md_cl_id, ims_md_id
+ from ims_md_classification
+ where ims_md_cl_id = :ims_md_cl_id
+
+
+
+
+
+ select *
+ from ims_md_classification
+ where ims_md_cl_id = :ims_md_cl_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_taxon.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_taxon.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_taxon.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_taxon.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -91,24 +91,13 @@
{ims_md_cl_ta_id:text(hidden) {value $ims_md_cl_ta_id}}
- } -select_query {
- select *
- from ims_md_classification_taxpath_taxon
- where ims_md_cl_ta_ta_id = :ims_md_cl_ta_ta_id
- and ims_md_cl_ta_id = :ims_md_cl_ta_id
+ } -select_query_name classificationmd_taxon_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_classification_taxpath_taxon
- set identifier = :identifier,
- entry_l = :entry_l,
- entry_s = :entry_s
- where ims_md_cl_ta_ta_id = :ims_md_cl_ta_ta_id"
+ db_dml do_update {}
} -new_data {
- db_dml do_insert \
- "insert into ims_md_classification_taxpath_taxon (ims_md_cl_ta_ta_id, ims_md_cl_ta_id, identifier, entry_l, entry_s)
- values (:ims_md_cl_ta_ta_id, :ims_md_cl_ta_id, :identifier, :entry_l, :entry_s)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars \
@@ -136,10 +125,4 @@
}
}
-db_multirow d_cl_taxon select_cl_taxon {
- select ctt.identifier, '[' || ctt.entry_l || '] ' || ctt.entry_s as entry,
- ctt.ims_md_cl_ta_id, ctt.ims_md_cl_ta_ta_id, cl.ims_md_cl_id, cl.ims_md_id
- from ims_md_classification_taxpath_taxon ctt, ims_md_classification cl
- where ctt.ims_md_cl_ta_id = :ims_md_cl_ta_id
- and cl.ims_md_cl_id = :ims_md_cl_id
-}
+db_multirow d_cl_taxon select_cl_taxon {}
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_taxon.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_taxon.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_taxon.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,42 @@
+
+
+
+
+
+ update ims_md_classification_taxpath_taxon
+ set identifier = :identifier,
+ entry_l = :entry_l,
+ entry_s = :entry_s
+ where ims_md_cl_ta_ta_id = :ims_md_cl_ta_ta_id
+
+
+
+
+
+ insert into ims_md_classification_taxpath_taxon
+ (ims_md_cl_ta_ta_id, ims_md_cl_ta_id, identifier, entry_l, entry_s)
+ values
+ (:ims_md_cl_ta_ta_id, :ims_md_cl_ta_id, :identifier, :entry_l, :entry_s)
+
+
+
+
+
+ select ctt.identifier, '[' || ctt.entry_l || '] ' || ctt.entry_s as entry,
+ ctt.ims_md_cl_ta_id, ctt.ims_md_cl_ta_ta_id, cl.ims_md_cl_id, cl.ims_md_id
+ from ims_md_classification_taxpath_taxon ctt, ims_md_classification cl
+ where ctt.ims_md_cl_ta_id = :ims_md_cl_ta_id
+ and cl.ims_md_cl_id = :ims_md_cl_id
+
+
+
+
+
+ select *
+ from ims_md_classification_taxpath_taxon
+ where ims_md_cl_ta_ta_id = :ims_md_cl_ta_ta_id
+ and ims_md_cl_ta_id = :ims_md_cl_ta_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_tpath.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_tpath.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_tpath.tcl 17 Nov 2008 13:36:44 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_tpath.tcl 12 Dec 2008 14:25:37 -0000 1.3
@@ -44,12 +44,7 @@
source { label "" }
}
-db_multirow d_cl_source select_cl_source {
- select '[' || source_l || '] ' || source_v as source
- from ims_md_classification_taxpath
- where ims_md_cl_ta_id = :ims_md_cl_ta_id
- and ims_md_cl_id = :ims_md_cl_id
-}
+db_multirow d_cl_source select_cl_source {}
# Classification Taxonomic Path Taxonomy
template::list::create \
@@ -68,8 +63,4 @@
entry { label "[_ lorsm.Entry_1]" }
}
-db_multirow d_cl_taxon select_cl_taxon {
- select identifier, '[' || entry_l || '] ' || entry_s as entry
- from ims_md_classification_taxpath_taxon
- where ims_md_cl_ta_id = :ims_md_cl_ta_id
-}
+db_multirow d_cl_taxon select_cl_taxon {}
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_tpath.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_tpath.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_tpath.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,21 @@
+
+
+
+
+
+ select '[' || source_l || '] ' || source_v as source
+ from ims_md_classification_taxpath
+ where ims_md_cl_ta_id = :ims_md_cl_ta_id
+ and ims_md_cl_id = :ims_md_cl_id
+
+
+
+
+
+ select identifier, '[' || entry_l || '] ' || entry_s as entry
+ from ims_md_classification_taxpath_taxon
+ where ims_md_cl_ta_id = :ims_md_cl_ta_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_tsource.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_tsource.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_tsource.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_tsource.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -63,17 +63,10 @@
{ims_md_cl_id:text(hidden) {value $ims_md_cl_id}}
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_classification_taxpath
- where ims_md_cl_ta_id = :ims_md_cl_ta_id
- and ims_md_cl_id = :ims_md_cl_id
+ } -select_query_name classificationmd_tsource_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_classification_taxpath
- set source_l = :source_l, source_v = :source_v
- where ims_md_cl_ta_id = :ims_md_cl_ta_id"
+ db_dml do_update {}
} -after_submit {
ad_returnredirect [export_vars \
@@ -101,10 +94,4 @@
}
}
-db_multirow d_cl_tsource select_cl_tsource {
- select '[' || ctp.source_l || '] ' || ctp.source_v as source, ctp.ims_md_cl_ta_id,
- ctp.ims_md_cl_id, cl.ims_md_id
- from ims_md_classification_taxpath ctp, ims_md_classification cl
- where ctp.ims_md_cl_ta_id = :ims_md_cl_ta_id
- and cl.ims_md_cl_id = :ims_md_cl_id
-}
+db_multirow d_cl_tsource select_cl_tsource {}
Index: openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_tsource.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_tsource.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/classificationmd/classification_tsource.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,32 @@
+
+
+
+
+
+ update ims_md_classification_taxpath
+ set source_l = :source_l,
+ source_v = :source_v
+ where ims_md_cl_ta_id = :ims_md_cl_ta_id
+
+
+
+
+
+ select '[' || ctp.source_l || '] ' || ctp.source_v as source, ctp.ims_md_cl_ta_id,
+ ctp.ims_md_cl_id, cl.ims_md_id
+ from ims_md_classification_taxpath ctp, ims_md_classification cl
+ where ctp.ims_md_cl_ta_id = :ims_md_cl_ta_id
+ and cl.ims_md_cl_id = :ims_md_cl_id
+
+
+
+
+
+ select *
+ from ims_md_classification_taxpath
+ where ims_md_cl_ta_id = :ims_md_cl_ta_id
+ and ims_md_cl_id = :ims_md_cl_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_cont.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_cont.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_cont.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_cont.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -63,22 +63,14 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select * from
- ims_md_educational_context
- where ims_md_ed_co_id = :ims_md_ed_co_id
- and ims_md_id = :ims_md_id
+ } -select_query_name educationalmd_cont_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_educational_context
- set context_s = :context_s,
- context_v = :context_v
- where ims_md_ed_co_id = :ims_md_ed_co_id "
+ db_dml do_update {}
+
} -new_data {
- db_dml do_insert \
- "insert into ims_md_educational_context (ims_md_ed_co_id, ims_md_id, context_s, context_v)
- values (:ims_md_ed_co_id, :ims_md_id, :context_s, :context_v)"
+ db_dml do_insert {}
+
} -after_submit {
ad_returnredirect [export_vars -base "../educationalmd" {ims_md_id}]
ad_script_abort
@@ -102,8 +94,4 @@
}
}
-db_multirow d_ed_cont select_ed_cont {
- select '[' || context_s || '] ' || context_v as context, ims_md_ed_co_id, ims_md_id
- from ims_md_educational_context
- where ims_md_id = :ims_md_id
-}
+db_multirow d_ed_cont select_ed_cont {}
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_cont.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_cont.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_cont.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,39 @@
+
+
+
+
+
+ update ims_md_educational_context
+ set context_s = :context_s,
+ context_v = :context_v
+ where ims_md_ed_co_id = :ims_md_ed_co_id
+
+
+
+
+
+ insert into ims_md_educational_context
+ (ims_md_ed_co_id, ims_md_id, context_s, context_v)
+ values
+ (:ims_md_ed_co_id, :ims_md_id, :context_s, :context_v)
+
+
+
+
+
+ select '[' || context_s || '] ' || context_v as context, ims_md_ed_co_id, ims_md_id
+ from ims_md_educational_context
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select *
+ from ims_md_educational_context
+ where ims_md_ed_co_id = :ims_md_ed_co_id
+ and ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_desc.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_desc.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_desc.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_desc.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -63,23 +63,13 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_educational_descrip
- where ims_md_ed_de_id = :ims_md_ed_de_id
- and ims_md_id = :ims_md_id
+ } -select_query_name educationalmd_desc_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_educational_descrip
- set descrip_l = :descrip_l,
- descrip_s = :descrip_s
- where ims_md_ed_de_id = :ims_md_ed_de_id "
+ db_dml do_update {}
} -new_data {
- db_dml do_insert \
- "insert into ims_md_educational_descrip (ims_md_ed_de_id, ims_md_id, descrip_l, descrip_s)
- values (:ims_md_ed_de_id, :ims_md_id, :descrip_l, :descrip_s)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "../educationalmd" {ims_md_id}]
@@ -104,8 +94,4 @@
}
}
-db_multirow d_ed_desc select_ed_desc {
- select '[' || descrip_l || '] ' || descrip_s as desc, ims_md_ed_de_id, ims_md_id
- from ims_md_educational_descrip
- where ims_md_id = :ims_md_id
-}
+db_multirow d_ed_desc select_ed_desc {}
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_desc.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_desc.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_desc.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,39 @@
+
+
+
+
+
+ update ims_md_educational_descrip
+ set descrip_l = :descrip_l,
+ descrip_s = :descrip_s
+ where ims_md_ed_de_id = :ims_md_ed_de_id
+
+
+
+
+
+ insert into ims_md_educational_descrip
+ (ims_md_ed_de_id, ims_md_id, descrip_l, descrip_s)
+ values
+ (:ims_md_ed_de_id, :ims_md_id, :descrip_l, :descrip_s)
+
+
+
+
+
+ select '[' || descrip_l || '] ' || descrip_s as desc, ims_md_ed_de_id, ims_md_id
+ from ims_md_educational_descrip
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select *
+ from ims_md_educational_descrip
+ where ims_md_ed_de_id = :ims_md_ed_de_id
+ and ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_dif.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_dif.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_dif.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_dif.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -49,19 +49,12 @@
} -on_submit {
# check if the educational difficulty details already exist...
- if {[db_0or1row select_size {
- select ims_md_id
- from ims_md_educational
- where ims_md_id = :ims_md_id}]} {
- db_dml do_update \
- "update ims_md_educational
- set difficulty_s = :difficulty_s, difficulty_v = :difficulty_v
- where ims_md_id = :ims_md_id "
+ if {[db_0or1row select_size {}]} {
+ db_dml do_update {}
} else {
- db_dml do_insert \
- "insert into ims_md_educational (ims_md_id, difficulty_s, difficulty_v)
- values (:ims_md_id, :difficulty_s, :difficulty_v) "
+ db_dml do_insert {}
+
}
} -after_submit {
@@ -79,8 +72,4 @@
diff { label "[_ lorsm.Difficulty_1]" }
}
-db_multirow d_ed_dif select_ed_dif {
- select '[' || difficulty_s || '] ' || difficulty_v as diff, ims_md_id
- from ims_md_educational
- where ims_md_id = :ims_md_id
-}
+db_multirow d_ed_dif select_ed_dif {}
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_dif.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_dif.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_dif.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,37 @@
+
+
+
+
+
+ select ims_md_id
+ from ims_md_educational
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_educational
+ set difficulty_s = :difficulty_s, difficulty_v = :difficulty_v
+ where ims_md_id = :ims_md_id "
+
+
+
+
+
+ insert into ims_md_educational
+ (ims_md_id, difficulty_s, difficulty_v)
+ values
+ (:ims_md_id, :difficulty_s, :difficulty_v)
+
+
+
+
+
+ select '[' || difficulty_s || '] ' || difficulty_v as diff, ims_md_id
+ from ims_md_educational
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_ieur.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_ieur.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_ieur.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_ieur.tcl 12 Dec 2008 14:25:37 -0000 1.4
@@ -62,23 +62,13 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_educational_ieur
- where ims_md_ed_ie_id = :ims_md_ed_ie_id
- and ims_md_id = :ims_md_id
+ } -select_query_name educationalmd_ieur_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_educational_ieur
- set ieur_s = :ieur_s,
- ieur_v = :ieur_v
- where ims_md_ed_ie_id = :ims_md_ed_ie_id"
+ db_dml do_update {}
} -new_data {
- db_dml do_insert \
- "insert into ims_md_educational_ieur (ims_md_ed_ie_id, ims_md_id, ieur_s, ieur_v)
- values (:ims_md_ed_ie_id, :ims_md_id, :ieur_s, :ieur_v)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "../educationalmd" {ims_md_id}]
@@ -103,8 +93,4 @@
}
}
-db_multirow d_ed_ieur select_ed_ieur {
- select '[' || ieur_s || '] ' || ieur_v as ieur, ims_md_ed_ie_id, ims_md_id
- from ims_md_educational_ieur
- where ims_md_id = :ims_md_id
-}
+db_multirow d_ed_ieur select_ed_ieur {}
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_ieur.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_ieur.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_ieur.xql 12 Dec 2008 14:25:37 -0000 1.1
@@ -0,0 +1,39 @@
+
+
+
+
+
+ update ims_md_educational_ieur
+ set ieur_s = :ieur_s,
+ ieur_v = :ieur_v
+ where ims_md_ed_ie_id = :ims_md_ed_ie_id
+
+
+
+
+
+ insert into ims_md_educational_ieur
+ (ims_md_ed_ie_id, ims_md_id, ieur_s, ieur_v)
+ values
+ (:ims_md_ed_ie_id, :ims_md_id, :ieur_s, :ieur_v)
+
+
+
+
+
+ select '[' || ieur_s || '] ' || ieur_v as ieur, ims_md_ed_ie_id, ims_md_id
+ from ims_md_educational_ieur
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select *
+ from ims_md_educational_ieur
+ where ims_md_ed_ie_id = :ims_md_ed_ie_id
+ and ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_intl.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_intl.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_intl.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_intl.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -50,18 +50,10 @@
} -on_submit {
# check if the ED Interactivity Level already exist...
- if {[db_0or1row select_size {
- select ims_md_id
- from ims_md_educational
- where ims_md_id = :ims_md_id}]} {
- db_dml do_update \
- "update ims_md_educational
- set int_level_s = :int_level_s, int_level_v = :int_level_v
- where ims_md_id = :ims_md_id "
+ if {[db_0or1row select_size {}]} {
+ db_dml do_update {}
} else {
- db_dml do_insert \
- "insert into ims_md_educational (ims_md_id, int_level_s, int_level_v)
- values (:ims_md_id, :int_level_s, :int_level_v) "
+ db_dml do_insert {}
}
} -after_submit {
@@ -79,8 +71,4 @@
intl { label "[_ lorsm.Interactivity_Level_1]" }
}
-db_multirow d_ed_intl select_ed_intl {
- select '[' || int_level_s || '] ' || int_level_v as intl, ims_md_id
- from ims_md_educational
- where ims_md_id = :ims_md_id
-}
+db_multirow d_ed_intl select_ed_intl {}
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_intl.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_intl.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_intl.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,38 @@
+
+
+
+
+
+ select ims_md_id
+ from ims_md_educational
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_educational
+ set int_level_s = :int_level_s,
+ int_level_v = :int_level_v
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ insert into ims_md_educational
+ (ims_md_id, int_level_s, int_level_v)
+ values
+ (:ims_md_id, :int_level_s, :int_level_v)
+
+
+
+
+
+ select '[' || int_level_s || '] ' || int_level_v as intl, ims_md_id
+ from ims_md_educational
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_intt.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_intt.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_intt.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_intt.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -50,18 +50,10 @@
} -on_submit {
# check if the ED interactivity type details already exist...
- if {[db_0or1row select_type {
- select ims_md_id
- from ims_md_educational
- where ims_md_id = :ims_md_id}]} {
- db_dml do_update \
- "update ims_md_educational
- set int_type_s = :int_type_s, int_type_v = :int_type_v
- where ims_md_id = :ims_md_id "
+ if {[db_0or1row select_type {}]} {
+ db_dml do_update {}
} else {
- db_dml do_insert \
- "insert into ims_md_educational (ims_md_id, int_type_s, int_type_v)
- values (:ims_md_id, :int_type_s, :int_type_v)"
+ db_dml do_insert {}
}
} -after_submit {
@@ -79,8 +71,4 @@
intt { label "[_ lorsm.Interactivity_Type_1]" }
}
-db_multirow d_ed_intt select_ed_intt {
- select '[' || int_type_s || '] ' || int_type_v as intt, ims_md_id
- from ims_md_educational
- where ims_md_id = :ims_md_id
-}
+db_multirow d_ed_intt select_ed_intt {}
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_intt.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_intt.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_intt.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,38 @@
+
+
+
+
+
+ select ims_md_id
+ from ims_md_educational
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_educational
+ set int_type_s = :int_type_s,
+ int_type_v = :int_type_v
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ insert into ims_md_educational
+ (ims_md_id, int_type_s, int_type_v)
+ values
+ (:ims_md_id, :int_type_s, :int_type_v)
+
+
+
+
+
+ select '[' || int_type_s || '] ' || int_type_v as intt, ims_md_id
+ from ims_md_educational
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_lang.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_lang.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_lang.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_lang.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -57,22 +57,13 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_educational_lang
- where ims_md_ed_la_id = :ims_md_ed_la_id
- and ims_md_id = :ims_md_id
+ } -select_query_name educationalmd_lang_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_educational_lang
- set language = :language
- where ims_md_ed_la_id = :ims_md_ed_la_id "
+ db_dml do_update {}
} -new_data {
- db_dml do_insert \
- "insert into ims_md_educational_lang (ims_md_ed_la_id, ims_md_id, language)
- values (:ims_md_ed_la_id, :ims_md_id, :language)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "../educationalmd" {ims_md_id}]
@@ -97,8 +88,4 @@
}
}
-db_multirow d_ed_lang select_ed_lang {
- select language, ims_md_ed_la_id, ims_md_id
- from ims_md_educational_lang
- where ims_md_id = :ims_md_id
-}
+db_multirow d_ed_lang select_ed_lang {}
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_lang.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_lang.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_lang.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,38 @@
+
+
+
+
+
+ update ims_md_educational_lang
+ set language = :language
+ where ims_md_ed_la_id = :ims_md_ed_la_id
+
+
+
+
+
+ insert into ims_md_educational_lang
+ (ims_md_ed_la_id, ims_md_id, language)
+ values
+ (:ims_md_ed_la_id, :ims_md_id, :language)
+
+
+
+
+
+ select language, ims_md_ed_la_id, ims_md_id
+ from ims_md_educational_lang
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select *
+ from ims_md_educational_lang
+ where ims_md_ed_la_id = :ims_md_ed_la_id
+ and ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_lrt.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_lrt.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_lrt.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_lrt.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -61,23 +61,13 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_educational_lrt
- where ims_md_ed_lr_id = :ims_md_ed_lr_id
- and ims_md_id = :ims_md_id
+ } -select_query_name educationalmd_ltr_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_educational_lrt
- set lrt_s = :lrt_s,
- lrt_v = :lrt_v
- where ims_md_ed_lr_id = :ims_md_ed_lr_id "
+ db_dml do_update {}
} -new_data {
- db_dml do_insert \
- "insert into ims_md_educational_lrt (ims_md_ed_lr_id, ims_md_id, lrt_s, lrt_v)
- values (:ims_md_ed_lr_id, :ims_md_id, :lrt_s, :lrt_v)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "../educationalmd" {ims_md_id}]
@@ -102,8 +92,4 @@
}
}
-db_multirow d_ed_lrt select_ed_lrt {
- select '[' || lrt_s || '] ' || lrt_v as lrt, ims_md_ed_lr_id, ims_md_id
- from ims_md_educational_lrt
- where ims_md_id = :ims_md_id
-}
+db_multirow d_ed_lrt select_ed_lrt {}
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_lrt.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_lrt.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_lrt.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,39 @@
+
+
+
+
+
+ update ims_md_educational_lrt
+ set lrt_s = :lrt_s,
+ lrt_v = :lrt_v
+ where ims_md_ed_lr_id = :ims_md_ed_lr_id
+
+
+
+
+
+ insert into ims_md_educational_lrt
+ (ims_md_ed_lr_id, ims_md_id, lrt_s, lrt_v)
+ values
+ (:ims_md_ed_lr_id, :ims_md_id, :lrt_s, :lrt_v)
+
+
+
+
+
+ select '[' || lrt_s || '] ' || lrt_v as lrt, ims_md_ed_lr_id, ims_md_id
+ from ims_md_educational_lrt
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select *
+ from ims_md_educational_lrt
+ where ims_md_ed_lr_id = :ims_md_ed_lr_id
+ and ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_semd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_semd.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_semd.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_semd.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -51,19 +51,10 @@
} -on_submit {
# check if the ED Semantic Density already exist...
- if {[db_0or1row select_size {
- select ims_md_id from
- ims_md_educational
- where ims_md_id = :ims_md_id}]} {
- db_dml do_update \
- "update ims_md_educational
- set sem_density_s = :sem_density_s,
- sem_density_v = :sem_density_v
- where ims_md_id = :ims_md_id"
+ if {[db_0or1row select_size {}]} {
+ db_dml do_update {}
} else {
- db_dml do_insert \
- "insert into ims_md_educational (ims_md_id, sem_density_s, sem_density_v)
- values (:ims_md_id, :sem_density_s, :sem_density_v)"
+ db_dml do_insert {}
}
} -after_submit {
@@ -81,8 +72,4 @@
semd {label "[_ lorsm.Semantic_Density_1]"}
}
-db_multirow d_ed_semd select_ed_semd {
- select '[' || sem_density_s || '] ' || sem_density_v as semd, ims_md_id
- from ims_md_educational
- where ims_md_id = :ims_md_id
-}
+db_multirow d_ed_semd select_ed_semd {}
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_semd.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_semd.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_semd.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,38 @@
+
+
+
+
+
+ select ims_md_id
+ from ims_md_educational
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_educational
+ set sem_density_s = :sem_density_s,
+ sem_density_v = :sem_density_v
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ insert into ims_md_educational
+ (ims_md_id, sem_density_s, sem_density_v)
+ values
+ (:ims_md_id, :sem_density_s, :sem_density_v)
+
+
+
+
+
+ select '[' || sem_density_s || '] ' || sem_density_v as semd, ims_md_id
+ from ims_md_educational
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_tar.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_tar.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_tar.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_tar.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -62,23 +62,13 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_educational_tar
- where ims_md_ed_ta_id = :ims_md_ed_ta_id
- and ims_md_id = :ims_md_id
+ } -select_query_name educationalmd_tar_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_educational_tar
- set tar_l = :tar_l,
- tar_s = :tar_s
- where ims_md_ed_ta_id = :ims_md_ed_ta_id "
+ db_dml do_update {}
} -new_data {
- db_dml do_insert \
- "insert into ims_md_educational_tar (ims_md_ed_ta_id, ims_md_id, tar_l, tar_s)
- values (:ims_md_ed_ta_id, :ims_md_id, :tar_l, :tar_s)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "../educationalmd" {ims_md_id}]
@@ -101,8 +91,4 @@
}
}
-db_multirow d_ed_tar select_ed_tar {
- select '[' || tar_l || '] ' || tar_s as tar, ims_md_ed_ta_id, ims_md_id
- from ims_md_educational_tar
- where ims_md_id = :ims_md_id
-}
+db_multirow d_ed_tar select_ed_tar {}
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_tar.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_tar.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_tar.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,39 @@
+
+
+
+
+
+ update ims_md_educational_tar
+ set tar_l = :tar_l,
+ tar_s = :tar_s
+ where ims_md_ed_ta_id = :ims_md_ed_ta_id
+
+
+
+
+
+ insert into ims_md_educational_tar
+ (ims_md_ed_ta_id, ims_md_id, tar_l, tar_s)
+ values
+ (:ims_md_ed_ta_id, :ims_md_id, :tar_l, :tar_s)
+
+
+
+
+
+ select *
+ from ims_md_educational_tar
+ where ims_md_ed_ta_id = :ims_md_ed_ta_id
+ and ims_md_id = :ims_md_id
+
+
+
+
+
+ select '[' || tar_l || '] ' || tar_s as tar, ims_md_ed_ta_id, ims_md_id
+ from ims_md_educational_tar
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_tlt.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_tlt.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_tlt.tcl 17 Nov 2008 13:36:44 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_tlt.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -56,20 +56,10 @@
} -on_submit {
# check if the educational typical learning time details already exist...
- if {[db_0or1row select_size {
- select ims_md_id
- from ims_md_educational
- where ims_md_id = :ims_md_id}]} {
- db_dml do_update \
- "update ims_md_educational
- set type_lrn_time_s = :type_lrn_time_s,
- type_lrn_time_l = :type_lrn_time_l,
- type_lrn_time = :type_lrn_time
- where ims_md_id = :ims_md_id "
+ if {[db_0or1row select_size {}]} {
+ db_dml do_update {}
} else {
- db_dml do_insert \
- "insert into ims_md_educational (ims_md_id, type_lrn_time_s, type_lrn_time_l, type_lrn_time)
- values (:ims_md_id, :type_lrn_time_s, :type_lrn_time_l, :type_lrn_time) "
+ db_dml do_insert {}
}
} -after_submit {
@@ -88,8 +78,4 @@
tlt_ls { label "[_ lorsm.Language_1]" }
}
-db_multirow d_ed_tlt select_ed_tlt {
- select type_lrn_time as tlt, '[' || type_lrn_time_l || '] ' || type_lrn_time_s as tlt_ls, ims_md_id
- from ims_md_educational
- where ims_md_id = :ims_md_id
-}
+db_multirow d_ed_tlt select_ed_tlt {}
Index: openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_tlt.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_tlt.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/educationalmd/educational_tlt.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,39 @@
+
+
+
+
+
+ select ims_md_id
+ from ims_md_educational
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_educational
+ set type_lrn_time_s = :type_lrn_time_s,
+ type_lrn_time_l = :type_lrn_time_l,
+ type_lrn_time = :type_lrn_time
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ insert into ims_md_educational
+ (ims_md_id, type_lrn_time_s, type_lrn_time_l, type_lrn_time)
+ values
+ (:ims_md_id, :type_lrn_time_s, :type_lrn_time_l, :type_lrn_time)
+
+
+
+
+
+ select type_lrn_time as tlt, '[' || type_lrn_time_l || '] ' || type_lrn_time_s as tlt_ls, ims_md_id
+ from ims_md_educational
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/form-md-record/md-record.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/form-md-record/md-record.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/md/form-md-record/md-record.tcl 17 Nov 2008 13:36:44 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/md/form-md-record/md-record.tcl 12 Dec 2008 14:25:38 -0000 1.3
@@ -43,11 +43,7 @@
-no_data "-" \
-actions $actions \
-elements {
- object_type { label "[_ lorsm.Object_Type]"}
+ object_type { label "[_ lorsm.Object_Type]" }
}
-db_multirow d_pres select_ge_titles {
- select object_type
- from acs_objects
- where object_id = :ims_md_id
-}
+db_multirow d_pres select_ge_titles {}
Index: openacs-4/packages/lorsm/www/admin/md/form-md-record/md-record.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/form-md-record/md-record.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/form-md-record/md-record.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,12 @@
+
+
+
+
+
+ select object_type
+ from acs_objects
+ where object_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/generalmd/general_aggl.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/generalmd/general_aggl.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/lorsm/www/admin/md/generalmd/general_aggl.tcl 17 Nov 2008 13:36:44 -0000 1.4
+++ openacs-4/packages/lorsm/www/admin/md/generalmd/general_aggl.tcl 12 Dec 2008 14:25:38 -0000 1.5
@@ -51,18 +51,10 @@
} -on_submit {
# check if the aggregation level already exist..
- if {[db_0or1row select_aggregation_level {
- select ims_md_id
- from ims_md_general
- where ims_md_id = :ims_md_id}]} {
- db_dml do_update \
- "update ims_md_general
- set agg_level_v = :agg_level_v, agg_level_s = :agg_level_s
- where ims_md_id = :ims_md_id "
+ if {[db_0or1row select_aggregation_level {}]} {
+ db_dml do_update {}
} else {
- db_dml do_insert \
- "insert into ims_md_general (ims_md_id, agg_level_v, agg_level_s)
- values(:ims_md_id, :agg_level_v, :agg_level_s)"
+ db_dml do_insert {}
}
} -after_submit {
@@ -87,8 +79,4 @@
}
}
-db_multirow d_gen_aggl select_ge_aggl {
- select agg_level_s, agg_level_v, ims_md_id
- from ims_md_general
- where ims_md_id = :ims_md_id
-}
+db_multirow d_gen_aggl select_ge_aggl {}
Index: openacs-4/packages/lorsm/www/admin/md/generalmd/general_aggl.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/generalmd/general_aggl.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/generalmd/general_aggl.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,63 @@
+
+
+
+
+
+ select ims_md_id
+ from ims_md_general
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_general
+ set agg_level_v = :agg_level_v,
+ agg_level_s = :agg_level_s
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ insert into ims_md_general
+ (ims_md_id, agg_level_v, agg_level_s)
+ values
+ (:ims_md_id, :agg_level_v, :agg_level_s)
+
+
+
+
+
+ select agg_level_s, agg_level_v, ims_md_id
+ from ims_md_general
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/generalmd/general_cata.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/generalmd/general_cata.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/lorsm/www/admin/md/generalmd/general_cata.tcl 17 Nov 2008 13:36:45 -0000 1.4
+++ openacs-4/packages/lorsm/www/admin/md/generalmd/general_cata.tcl 12 Dec 2008 14:25:38 -0000 1.5
@@ -67,21 +67,13 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_general_cata
- where ims_md_ge_cata_id = :ims_md_ge_cata_id
- and ims_md_id = :ims_md_id
+ } -select_query_name generalmd_cata_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_general_cata
- set catalog = :catalog, entry_l = :entry_l, entry_s = :entry_s
- where ims_md_ge_cata_id = :ims_md_ge_cata_id"
+ db_dml do_update {}
+
} -new_data {
- db_dml do_insert \
- "insert into ims_md_general_cata (ims_md_ge_cata_id, ims_md_id, catalog, entry_l, entry_s)
- values(:ims_md_ge_cata_id, :ims_md_id, :catalog, :entry_l, :entry_s)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "../generalmd" {ims_md_id}]
@@ -108,9 +100,5 @@
}
}
-db_multirow d_gen_cata select_ge_cata {
- select catalog, entry_l, entry_s, ims_md_ge_cata_id, ims_md_id
- from ims_md_general_cata
- where ims_md_id = :ims_md_id
-}
+db_multirow d_gen_cata select_ge_cata {}
Index: openacs-4/packages/lorsm/www/admin/md/generalmd/general_cata.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/generalmd/general_cata.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/generalmd/general_cata.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,39 @@
+
+
+
+
+
+ update ims_md_general_cata
+ set catalog = :catalog,
+ entry_l = :entry_l, entry_s = :entry_s
+ where ims_md_ge_cata_id = :ims_md_ge_cata_id
+
+
+
+
+
+ insert into ims_md_general_cata
+ (ims_md_ge_cata_id, ims_md_id, catalog, entry_l, entry_s)
+ values
+ (:ims_md_ge_cata_id, :ims_md_id, :catalog, :entry_l, :entry_s)
+
+
+
+
+
+ select catalog, entry_l, entry_s, ims_md_ge_cata_id, ims_md_id
+ from ims_md_general_cata
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select *
+ from ims_md_general_cata
+ where ims_md_ge_cata_id = :ims_md_ge_cata_id
+ and ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/generalmd/general_cover.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/generalmd/general_cover.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/lorsm/www/admin/md/generalmd/general_cover.tcl 17 Nov 2008 13:36:45 -0000 1.4
+++ openacs-4/packages/lorsm/www/admin/md/generalmd/general_cover.tcl 12 Dec 2008 14:25:38 -0000 1.5
@@ -62,21 +62,13 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_general_cover
- where ims_md_ge_cove_id = :ims_md_ge_cove_id
- and ims_md_id = :ims_md_id
+ } -select_query_name generalmd_cover_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_general_cover
- set cover_l = :cover_l, cover_s = :cover_s
- where ims_md_ge_cove_id = :ims_md_ge_cove_id "
+ db_dml do_update {}
+
} -new_data {
- db_dml do_insert \
- "insert into ims_md_general_cover (ims_md_ge_cove_id, ims_md_id, cover_l, cover_s)
- values(:ims_md_ge_cove_id, :ims_md_id, :cover_l, :cover_s)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "../generalmd" {ims_md_id}]
@@ -102,8 +94,4 @@
}
}
-db_multirow d_gen_cover select_ge_cover {
- select cover_l, cover_s, ims_md_ge_cove_id, ims_md_id
- from ims_md_general_cover
- where ims_md_id = :ims_md_id
-}
+db_multirow d_gen_cover select_ge_cover {}
Index: openacs-4/packages/lorsm/www/admin/md/generalmd/general_cover.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/generalmd/general_cover.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/generalmd/general_cover.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,39 @@
+
+
+
+
+
+ update ims_md_general_cover
+ set cover_l = :cover_l,
+ cover_s = :cover_s
+ where ims_md_ge_cove_id = :ims_md_ge_cove_id
+
+
+
+
+
+ insert into ims_md_general_cover
+ (ims_md_ge_cove_id, ims_md_id, cover_l, cover_s)
+ values
+ (:ims_md_ge_cove_id, :ims_md_id, :cover_l, :cover_s)
+
+
+
+
+
+ select cover_l, cover_s, ims_md_ge_cove_id, ims_md_id
+ from ims_md_general_cover
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select *
+ from ims_md_general_cover
+ where ims_md_ge_cove_id = :ims_md_ge_cove_id
+ and ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/generalmd/general_desc.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/generalmd/general_desc.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/lorsm/www/admin/md/generalmd/general_desc.tcl 17 Nov 2008 13:36:45 -0000 1.4
+++ openacs-4/packages/lorsm/www/admin/md/generalmd/general_desc.tcl 12 Dec 2008 14:25:38 -0000 1.5
@@ -62,22 +62,13 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_general_desc
- where ims_md_ge_desc_id = :ims_md_ge_desc_id
- and ims_md_id = :ims_md_id
+ } -select_query_name generalmd_desc_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_general_desc
- set descrip_l = :descrip_l, descrip_s = :descrip_s
- where ims_md_ge_desc_id = :ims_md_ge_desc_id "
+ db_dml do_update {}
} -new_data {
- db_dml do_insert \
- "insert into ims_md_general_desc (ims_md_ge_desc_id, ims_md_id, descrip_l, descrip_s)
- values (:ims_md_ge_desc_id, :ims_md_id, :descrip_l, :descrip_s)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "../generalmd" {ims_md_id}]
@@ -103,8 +94,4 @@
}
}
-db_multirow d_gen_desc select_ge_desc {
- select descrip_l, descrip_s, ims_md_ge_desc_id, ims_md_id
- from ims_md_general_desc
- where ims_md_id = :ims_md_id
-}
+db_multirow d_gen_desc select_ge_desc {}
Index: openacs-4/packages/lorsm/www/admin/md/generalmd/general_desc.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/generalmd/general_desc.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/generalmd/general_desc.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,39 @@
+
+
+
+
+
+ update ims_md_general_desc
+ set descrip_l = :descrip_l,
+ descrip_s = :descrip_s
+ where ims_md_ge_desc_id = :ims_md_ge_desc_id
+
+
+
+
+
+ insert into ims_md_general_desc
+ (ims_md_ge_desc_id, ims_md_id, descrip_l, descrip_s)
+ values
+ (:ims_md_ge_desc_id, :ims_md_id, :descrip_l, :descrip_s)
+
+
+
+
+
+ select *
+ from ims_md_general_desc
+ where ims_md_ge_desc_id = :ims_md_ge_desc_id
+ and ims_md_id = :ims_md_id
+
+
+
+
+
+ select descrip_l, descrip_s, ims_md_ge_desc_id, ims_md_id
+ from ims_md_general_desc
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/generalmd/general_key.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/generalmd/general_key.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/lorsm/www/admin/md/generalmd/general_key.tcl 17 Nov 2008 13:36:45 -0000 1.4
+++ openacs-4/packages/lorsm/www/admin/md/generalmd/general_key.tcl 12 Dec 2008 14:25:38 -0000 1.5
@@ -63,23 +63,13 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_general_key
- where ims_md_ge_key_id = :ims_md_ge_key_id
- and ims_md_id = :ims_md_id
+ } -select_query_name generalmd_key_ad_form {
} -edit_data {
- db_dml do_update "
- update ims_md_general_key
- set keyword_l = :keyword_l,
- keyword_s = :keyword_s
- where ims_md_ge_key_id = :ims_md_ge_key_id "
+ db_dml do_update {}
} -new_data {
- db_dml do_insert "
- insert into ims_md_general_key (ims_md_ge_key_id, ims_md_id, keyword_l, keyword_s)
- values (:ims_md_ge_key_id, :ims_md_id, :keyword_l, :keyword_s)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "../generalmd" {ims_md_id}]
@@ -105,9 +95,5 @@
}
}
-db_multirow d_gen_key select_ge_key {
- select keyword_l, keyword_s, ims_md_ge_key_id, ims_md_id
- from ims_md_general_key
- where ims_md_id = :ims_md_id
-}
+db_multirow d_gen_key select_ge_key {}
Index: openacs-4/packages/lorsm/www/admin/md/generalmd/general_key.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/generalmd/general_key.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/generalmd/general_key.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,39 @@
+
+
+
+
+
+ update ims_md_general_key
+ set keyword_l = :keyword_l,
+ keyword_s = :keyword_s
+ where ims_md_ge_key_id = :ims_md_ge_key_id
+
+
+
+
+
+ insert into ims_md_general_key
+ (ims_md_ge_key_id, ims_md_id, keyword_l, keyword_s)
+ values
+ (:ims_md_ge_key_id, :ims_md_id, :keyword_l, :keyword_s)
+
+
+
+
+
+ select keyword_l, keyword_s, ims_md_ge_key_id, ims_md_id
+ from ims_md_general_key
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select *
+ from ims_md_general_key
+ where ims_md_ge_key_id = :ims_md_ge_key_id
+ and ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/generalmd/general_lang.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/generalmd/general_lang.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/lorsm/www/admin/md/generalmd/general_lang.tcl 17 Nov 2008 13:36:45 -0000 1.4
+++ openacs-4/packages/lorsm/www/admin/md/generalmd/general_lang.tcl 12 Dec 2008 14:25:38 -0000 1.5
@@ -57,21 +57,13 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_general_lang
- where ims_md_ge_lang_id = :ims_md_ge_lang_id
- and ims_md_id = :ims_md_id
+ } -select_query_name generalmd_lang_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_general_lang
- set language = :language
- where ims_md_ge_lang_id = :ims_md_ge_lang_id "
+ db_dml do_update {}
+
} -new_data {
- db_dml do_insert \
- "insert into ims_md_general_lang (ims_md_ge_lang_id, ims_md_id, language)
- values(:ims_md_ge_lang_id, :ims_md_id, :language)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "../generalmd" {ims_md_id}]
@@ -97,8 +89,4 @@
}
}
-db_multirow d_gen_lang select_ge_lang {
- select language, ims_md_ge_lang_id, ims_md_id
- from ims_md_general_lang
- where ims_md_id = :ims_md_id
-}
+db_multirow d_gen_lang select_ge_lang {}
Index: openacs-4/packages/lorsm/www/admin/md/generalmd/general_lang.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/generalmd/general_lang.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/generalmd/general_lang.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,38 @@
+
+
+
+
+
+ update ims_md_general_lang
+ set language = :language
+ where ims_md_ge_lang_id = :ims_md_ge_lang_id
+
+
+
+
+
+ insert into ims_md_general_lang
+ (ims_md_ge_lang_id, ims_md_id, language)
+ values
+ (:ims_md_ge_lang_id, :ims_md_id, :language)
+
+
+
+
+
+ select *
+ from ims_md_general_lang
+ where ims_md_ge_lang_id = :ims_md_ge_lang_id
+ and ims_md_id = :ims_md_id
+
+
+
+
+
+ select language, ims_md_ge_lang_id, ims_md_id
+ from ims_md_general_lang
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/generalmd/general_struc.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/generalmd/general_struc.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/lorsm/www/admin/md/generalmd/general_struc.tcl 17 Nov 2008 13:36:45 -0000 1.4
+++ openacs-4/packages/lorsm/www/admin/md/generalmd/general_struc.tcl 12 Dec 2008 14:25:38 -0000 1.5
@@ -52,19 +52,10 @@
} -on_submit {
# check if the structure details already exist...
- if {[db_0or1row select_structure {
- select ims_md_id
- from ims_md_general
- where ims_md_id = :ims_md_id}]} {
- db_dml do_update \
- "update ims_md_general
- set structure_v = :structure_v, structure_s = :structure_s
- where ims_md_id = :ims_md_id "
-
+ if {[db_0or1row select_structure {}]} {
+ db_dml do_update {}
} else {
- db_dml do_insert \
- "insert into ims_md_general (ims_md_id, structure_v, structure_s)
- values (:ims_md_id, :structure_v, :structure_s)"
+ db_dml do_insert {}
}
} -after_submit {
@@ -88,9 +79,5 @@
}
}
-db_multirow d_gen_struc select_ge_struc {
- select structure_s, structure_v, ims_md_id
- from ims_md_general
- where ims_md_id = :ims_md_id
-}
+db_multirow d_gen_struc select_ge_struc {}
Index: openacs-4/packages/lorsm/www/admin/md/generalmd/general_struc.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/generalmd/general_struc.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/generalmd/general_struc.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,37 @@
+
+
+
+
+
+ select ims_md_id
+ from ims_md_general
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_general
+ set structure_v = :structure_v, structure_s = :structure_s
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ insert into ims_md_general
+ (ims_md_id, structure_v, structure_s)
+ values
+ (:ims_md_id, :structure_v, :structure_s)
+
+
+
+
+
+ select structure_s, structure_v, ims_md_id
+ from ims_md_general
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/generalmd/general_title.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/generalmd/general_title.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/lorsm/www/admin/md/generalmd/general_title.tcl 17 Nov 2008 13:36:45 -0000 1.4
+++ openacs-4/packages/lorsm/www/admin/md/generalmd/general_title.tcl 12 Dec 2008 14:25:38 -0000 1.5
@@ -62,21 +62,13 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_general_title
- where ims_md_ge_ti_id = :ims_md_ge_ti_id
- and ims_md_id = :ims_md_id
+ } -select_query_name generalmd_title_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_general_title
- set title_l = :title_l, title_s = :title_s
- where ims_md_ge_ti_id = :ims_md_ge_ti_id "
+ db_dml do_update {}
+
} -new_data {
- db_dml do_insert \
- "insert into ims_md_general_title (ims_md_ge_ti_id, ims_md_id, title_l, title_s)
- values (:ims_md_ge_ti_id, :ims_md_id, :title_l, :title_s)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "../generalmd" {ims_md_id}]
@@ -102,10 +94,6 @@
}
}
-db_multirow d_gen_titles select_ge_titles {
- select title_l, title_s, ims_md_ge_ti_id, ims_md_id
- from ims_md_general_title
- where ims_md_id = :ims_md_id
-} {
+db_multirow d_gen_titles select_ge_titles {} {
set item_url [export_vars -base "item" { ims_md_id }]
}
Index: openacs-4/packages/lorsm/www/admin/md/generalmd/general_title.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/generalmd/general_title.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/generalmd/general_title.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,39 @@
+
+
+
+
+
+ select *
+ from ims_md_general_title
+ where ims_md_ge_ti_id = :ims_md_ge_ti_id
+ and ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_general_title
+ set title_l = :title_l,
+ title_s = :title_s
+ where ims_md_ge_ti_id = :ims_md_ge_ti_id
+
+
+
+
+
+ insert into ims_md_general_title
+ (ims_md_ge_ti_id, ims_md_id, title_l, title_s)
+ values
+ (:ims_md_ge_ti_id, :ims_md_id, :title_l, :title_s)
+
+
+
+
+
+ select title_l, title_s, ims_md_ge_ti_id, ims_md_id
+ from ims_md_general_title
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_cont.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_cont.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_cont.tcl 17 Nov 2008 13:36:45 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_cont.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -87,39 +87,21 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_life_cycle_contrib lfc, ims_md_life_cycle_contrib_entity lfce
- where lfc.ims_md_lf_cont_id = :ims_md_lf_cont_id
- and lfc.ims_md_id = :ims_md_id
- and lfce.ims_md_lf_cont_id = :ims_md_lf_cont_id
+ } -select_query_name lifecyclemd_cont_ad_form {
+
} -edit_data {
db_transaction {
- db_dml update_lfc \
- "update ims_md_life_cycle_contrib
- set role_v = :role_v,
- role_s = :role_s,
- cont_date = :cont_date,
- cont_date_l = :cont_date_l,
- cont_date_s = :cont_date_s
- where ims_md_lf_cont_id = :ims_md_lf_cont_id"
+ db_dml update_lfc {}
- db_dml update_lfce \
- "update ims_md_life_cycle_contrib_entity
- set entity = :entity
- where ims_md_lf_cont_id = :ims_md_lf_cont_id"
+ db_dml update_lfce {}
}
} -new_data {
db_transaction {
- db_dml insert_lfc \
- "insert into ims_md_life_cycle_contrib (ims_md_lf_cont_id, ims_md_id, role_s, role_v, cont_date, cont_date_l, cont_date_s)
- values (:ims_md_lf_cont_id, :ims_md_id, :role_s, :role_v, :cont_date, :cont_date_l, :cont_date_s)"
+ db_dml insert_lfc {}
- db_dml insert_lfce \
- "insert into ims_md_life_cycle_contrib_entity (ims_md_lf_cont_enti_id, ims_md_lf_cont_id, entity)
- values (nextval('ims_md_life_cycle_contrib_entity_seq'), :ims_md_lf_cont_id, :entity)"
+ db_dml insert_lfce {}
}
} -after_submit {
@@ -148,11 +130,5 @@
}
}
-db_multirow d_lf_cont select_lf_cont {
- select lfc.role_v || ' ' || '[' || lfc.role_s || ']' as role, lfce.entity, lfc.cont_date,
- '[' || lfc.cont_date_l || ']' || ' ' || lfc.cont_date_s as cont_date_ls, lfc.ims_md_lf_cont_id, lfc.ims_md_id
- from ims_md_life_cycle_contrib lfc, ims_md_life_cycle_contrib_entity lfce
- where lfc.ims_md_lf_cont_id = lfce.ims_md_lf_cont_id
- and lfc.ims_md_id = :ims_md_id
-}
+db_multirow d_lf_cont select_lf_cont {}
Index: openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_cont.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_cont.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_cont.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,62 @@
+
+
+
+
+
+ select *
+ from ims_md_life_cycle_contrib lfc, ims_md_life_cycle_contrib_entity lfce
+ where lfc.ims_md_lf_cont_id = :ims_md_lf_cont_id
+ and lfc.ims_md_id = :ims_md_id
+ and lfce.ims_md_lf_cont_id = :ims_md_lf_cont_id
+
+
+
+
+
+ update ims_md_life_cycle_contrib
+ set role_v = :role_v,
+ role_s = :role_s,
+ cont_date = :cont_date,
+ cont_date_l = :cont_date_l,
+ cont_date_s = :cont_date_s
+ where ims_md_lf_cont_id = :ims_md_lf_cont_id
+
+
+
+
+
+ update ims_md_life_cycle_contrib_entity
+ set entity = :entity
+ where ims_md_lf_cont_id = :ims_md_lf_cont_id
+
+
+
+
+
+ insert into ims_md_life_cycle_contrib
+ (ims_md_lf_cont_id, ims_md_id, role_s, role_v, cont_date, cont_date_l, cont_date_s)
+ values
+ (:ims_md_lf_cont_id, :ims_md_id, :role_s, :role_v, :cont_date, :cont_date_l, :cont_date_s)
+
+
+
+
+
+ insert into ims_md_life_cycle_contrib_entity
+ (ims_md_lf_cont_enti_id, ims_md_lf_cont_id, entity)
+ values
+ (nextval('ims_md_life_cycle_contrib_entity_seq'), :ims_md_lf_cont_id, :entity)"
+
+
+
+
+
+ select lfc.role_v || ' ' || '[' || lfc.role_s || ']' as role, lfce.entity, lfc.cont_date,
+ '[' || lfc.cont_date_l || ']' || ' ' || lfc.cont_date_s as cont_date_ls, lfc.ims_md_lf_cont_id, lfc.ims_md_id
+ from ims_md_life_cycle_contrib lfc, ims_md_life_cycle_contrib_entity lfce
+ where lfc.ims_md_lf_cont_id = lfce.ims_md_lf_cont_id
+ and lfc.ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_stat.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_stat.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_stat.tcl 17 Nov 2008 13:36:45 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_stat.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -50,19 +50,10 @@
} -on_submit {
# Checks whether LC status exist...
- if {[db_0or1row select_lc_version {
- select ims_md_id
- from ims_md_life_cycle
- where ims_md_id = :ims_md_id}]} {
- db_dml do_update \
- "update ims_md_life_cycle
- set status_s = :status_s,
- status_v = :status_v
- where ims_md_id = :ims_md_id "
+ if {[db_0or1row select_lc_version {}]} {
+ db_dml do_update {}
} else {
- db_dml do_insert \
- "insert into ims_md_life_cycle (ims_md_id, status_s, status_v)
- values (:ims_md_id, :status_s, :status_v)"
+ db_dml do_insert {}
}
} -after_submit {
@@ -81,8 +72,4 @@
status_v { label "[_ lorsm.Value]" }
}
-db_multirow d_lf_stat select_lf_stat {
- select status_s, status_v, ims_md_id
- from ims_md_life_cycle
- where ims_md_id = :ims_md_id
-}
+db_multirow d_lf_stat select_lf_stat {}
Index: openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_stat.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_stat.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_stat.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,29 @@
+
+
+
+
+
+ select ims_md_id
+ from ims_md_life_cycle
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_life_cycle
+ set status_s = :status_s,
+ status_v = :status_v
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select status_s, status_v, ims_md_id
+ from ims_md_life_cycle
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_version.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_version.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_version.tcl 17 Nov 2008 13:36:45 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_version.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -50,18 +50,10 @@
} -on_submit {
# check if the LC version already exists...
- if {[db_0or1row select_lc_version {
- select ims_md_id
- from ims_md_life_cycle
- where ims_md_id = :ims_md_id}]} {
- db_dml do_update \
- "update ims_md_life_cycle
- set version_l = :version_l, version_s = :version_s
- where ims_md_id = :ims_md_id "
+ if {[db_0or1row select_lc_version {}]} {
+ db_dml do_update {}
} else {
- db_dml do_insert \
- "insert into ims_md_life_cycle (ims_md_id, version_l, version_s)
- values (:ims_md_id, :version_l, :version_s)"
+ db_dml do_insert {}
}
} -after_submit {
@@ -80,8 +72,4 @@
version_s { label "[_ lorsm.Version_1]" }
}
-db_multirow d_lf_ver select_lf_ver {
- select version_l, version_s, ims_md_id
- from ims_md_life_cycle
- where ims_md_id = :ims_md_id
-}
+db_multirow d_lf_ver select_lf_ver {}
Index: openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_version.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_version.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/lifecyclemd/lifecycle_version.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,38 @@
+
+
+
+
+
+ select ims_md_id
+ from ims_md_life_cycle
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_life_cycle
+ set version_l = :version_l,
+ version_s = :version_s
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ insert into ims_md_life_cycle
+ (ims_md_id, version_l, version_s)
+ values
+ (:ims_md_id, :version_l, :version_s)
+
+
+
+
+
+ select version_l, version_s, ims_md_id
+ from ims_md_life_cycle
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/metamd/meta_cata.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/metamd/meta_cata.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/metamd/meta_cata.tcl 17 Nov 2008 13:36:45 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/metamd/meta_cata.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -69,21 +69,13 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_metadata_cata
- where ims_md_md_cata_id = :ims_md_md_cata_id
- and ims_md_id = :ims_md_id
+ } -select_query_name metamd_cata_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_metadata_cata
- set catalog = :catalog, entry_l = :entry_l, entry_s = :entry_s
- where ims_md_md_cata_id = :ims_md_md_cata_id"
+ db_dml do_update {}
+
} -new_data {
- db_dml do_insert \
- "insert into ims_md_metadata_cata (ims_md_md_cata_id, ims_md_id, catalog, entry_l, entry_s)
- values(:ims_md_md_cata_id, :ims_md_id, :catalog, :entry_l, :entry_s)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "../metamd" {ims_md_id}]
@@ -109,8 +101,4 @@
}
}
-db_multirow d_md_cata select_md_cata {
- select catalog, '[' || entry_l || ']' || ' ' || entry_s as entry_ls, ims_md_md_cata_id, ims_md_id
- from ims_md_metadata_cata
- where ims_md_id = :ims_md_id
-}
+db_multirow d_md_cata select_md_cata {}
Index: openacs-4/packages/lorsm/www/admin/md/metamd/meta_cata.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/metamd/meta_cata.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/metamd/meta_cata.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,41 @@
+
+
+
+
+
+ update ims_md_metadata_cata
+ set catalog = :catalog,
+ entry_l = :entry_l,
+ entry_s = :entry_s
+ where ims_md_md_cata_id = :ims_md_md_cata_id
+
+
+
+
+
+ insert into ims_md_metadata_cata
+ (ims_md_md_cata_id, ims_md_id, catalog, entry_l, entry_s)
+ values
+ (:ims_md_md_cata_id, :ims_md_id, :catalog, :entry_l, :entry_s)
+
+
+
+
+
+ select *
+ from ims_md_metadata_cata
+ where ims_md_md_cata_id = :ims_md_md_cata_id
+ and ims_md_id = :ims_md_id
+
+
+
+
+
+ select catalog, '[' || entry_l || ']' || ' ' || entry_s as entry_ls,
+ ims_md_md_cata_id, ims_md_id
+ from ims_md_metadata_cata
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/metamd/meta_cont.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/metamd/meta_cont.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/metamd/meta_cont.tcl 17 Nov 2008 13:36:45 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/metamd/meta_cont.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -86,39 +86,20 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_metadata_contrib mdc, ims_md_metadata_contrib_entity mdce
- where mdc.ims_md_md_cont_id = :ims_md_md_cont_id
- and mdc.ims_md_id = :ims_md_id
- and mdce.ims_md_md_cont_id = :ims_md_md_cont_id
+ } -select_query_name metamd_cont_ad_form {
} -edit_data {
db_transaction {
- db_dml update_mdc \
- "update ims_md_metadata_contrib
- set role_v = :role_v,
- role_s = :role_s,
- cont_date = :cont_date,
- cont_date_l = :cont_date_l,
- cont_date_s = :cont_date_s
- where ims_md_md_cont_id = :ims_md_md_cont_id"
+ db_dml update_mdc {}
- db_dml update_mdce \
- "update ims_md_metadata_contrib_entity
- set entity = :entity
- where ims_md_md_cont_id = :ims_md_md_cont_id"
+ db_dml update_mdce {}
}
} -new_data {
db_transaction {
- db_dml insert_mdc \
- "insert into ims_md_metadata_contrib (ims_md_md_cont_id, ims_md_id, role_s, role_v, cont_date, cont_date_l, cont_date_s)
- values (:ims_md_md_cont_id, :ims_md_id, :role_s, :role_v, :cont_date, :cont_date_l, :cont_date_s)"
+ db_dml insert_mdc {}
- db_dml insert_mdce \
- "insert into ims_md_metadata_contrib_entity (ims_md_md_cont_enti_id, ims_md_md_cont_id, entity)
- values (nextval('ims_md_metadata_contrib_entity_seq'), :ims_md_md_cont_id, :entity)"
+ db_dml insert_mdce {}
}
} -after_submit {
@@ -147,10 +128,4 @@
}
}
-db_multirow d_md_cont select_md_cont {
- select mdc.role_v || ' ' || '[' || mdc.role_s || ']' as role, mdce.entity, mdc.cont_date,
- '[' || mdc.cont_date_l || ']' || ' ' || mdc.cont_date_s as cont_date_ls, mdc.ims_md_md_cont_id, mdc.ims_md_id
- from ims_md_metadata_contrib mdc, ims_md_metadata_contrib_entity mdce
- where mdc.ims_md_md_cont_id = mdce.ims_md_md_cont_id
- and mdc.ims_md_id = :ims_md_id
-}
+db_multirow d_md_cont select_md_cont {}
Index: openacs-4/packages/lorsm/www/admin/md/metamd/meta_cont.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/metamd/meta_cont.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/metamd/meta_cont.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,64 @@
+
+
+
+
+
+ select *
+ from ims_md_metadata_contrib mdc, ims_md_metadata_contrib_entity mdce
+ where mdc.ims_md_md_cont_id = :ims_md_md_cont_id
+ and mdc.ims_md_id = :ims_md_id
+ and mdce.ims_md_md_cont_id = :ims_md_md_cont_id
+
+
+
+
+
+ update ims_md_metadata_contrib
+ set role_v = :role_v,
+ role_s = :role_s,
+ cont_date = :cont_date,
+ cont_date_l = :cont_date_l,
+ cont_date_s = :cont_date_s
+ where ims_md_md_cont_id = :ims_md_md_cont_id
+
+
+
+
+
+ update ims_md_metadata_contrib_entity
+ set entity = :entity
+ where ims_md_md_cont_id = :ims_md_md_cont_id
+
+
+
+
+
+ insert into ims_md_metadata_contrib
+ (ims_md_md_cont_id, ims_md_id, role_s, role_v, cont_date, cont_date_l, cont_date_s)
+ values
+ (:ims_md_md_cont_id, :ims_md_id, :role_s, :role_v, :cont_date, :cont_date_l, :cont_date_s)
+
+
+
+
+
+ insert into ims_md_metadata_contrib_entity
+ (ims_md_md_cont_enti_id, ims_md_md_cont_id, entity)
+ values
+ (nextval('ims_md_metadata_contrib_entity_seq'), :ims_md_md_cont_id, :entity)
+
+
+
+
+
+ select mdc.role_v || ' ' || '[' || mdc.role_s || ']' as role,
+ mdce.entity, mdc.cont_date,
+ '[' || mdc.cont_date_l || ']' || ' ' || mdc.cont_date_s as cont_date_ls,
+ mdc.ims_md_md_cont_id, mdc.ims_md_id
+ from ims_md_metadata_contrib mdc, ims_md_metadata_contrib_entity mdce
+ where mdc.ims_md_md_cont_id = mdce.ims_md_md_cont_id
+ and mdc.ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/metamd/meta_lang.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/metamd/meta_lang.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/metamd/meta_lang.tcl 17 Nov 2008 13:36:46 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/metamd/meta_lang.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -45,19 +45,10 @@
} -on_submit {
# check if the mdmd language details already exist...
- if {[db_0or1row select_lang {
- select ims_md_id
- from ims_md_metadata
- where ims_md_id = :ims_md_id}]} {
- db_dml do_update "
- update ims_md_metadata
- set language = :language
- where ims_md_id = :ims_md_id "
-
+ if {[db_0or1row select_lang {}]} {
+ db_dml do_update {}
} else {
- db_dml do_insert "
- insert into ims_md_metadata (ims_md_id, language)
- values(:ims_md_id, :language)"
+ db_dml do_insert {}
}
} -after_submit {
@@ -75,8 +66,4 @@
language { label "[_ lorsm.Language_1]" }
}
-db_multirow d_md_lang select_md_lang {
- select language, ims_md_id
- from ims_md_metadata
- where ims_md_id = :ims_md_id
-}
+db_multirow d_md_lang select_md_lang {}
Index: openacs-4/packages/lorsm/www/admin/md/metamd/meta_lang.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/metamd/meta_lang.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/metamd/meta_lang.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,37 @@
+
+
+
+
+
+ select ims_md_id
+ from ims_md_metadata
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_metadata
+ set language = :language
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ insert into ims_md_metadata
+ (ims_md_id, language)
+ values
+ (:ims_md_id, :language)
+
+
+
+
+
+ select language, ims_md_id
+ from ims_md_metadata
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/metamd/meta_scheme.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/metamd/meta_scheme.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/metamd/meta_scheme.tcl 17 Nov 2008 13:36:46 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/metamd/meta_scheme.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -57,22 +57,13 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_metadata_scheme
- where ims_md_md_sch_id = :ims_md_md_sch_id
- and ims_md_id = :ims_md_id
+ } -select_query_name metamd_scheme_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_metadata_scheme
- set scheme = :scheme
- where ims_md_md_sch_id = :ims_md_md_sch_id "
+ db_dml do_update {}
} -new_data {
- db_dml do_insert \
- "insert into ims_md_metadata_scheme (ims_md_md_sch_id, ims_md_id, scheme)
- values (:ims_md_md_sch_id, :ims_md_id, :scheme)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "../metamd" {ims_md_id}]
@@ -97,8 +88,4 @@
}
}
-db_multirow d_md_scheme select_md_scheme {
- select scheme, ims_md_id, ims_md_md_sch_id, scheme
- from ims_md_metadata_scheme
- where ims_md_id = :ims_md_id
-}
+db_multirow d_md_scheme select_md_scheme {}
Index: openacs-4/packages/lorsm/www/admin/md/metamd/meta_scheme.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/metamd/meta_scheme.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/metamd/meta_scheme.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,38 @@
+
+
+
+
+
+ select *
+ from ims_md_metadata_scheme
+ where ims_md_md_sch_id = :ims_md_md_sch_id
+ and ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_metadata_scheme
+ set scheme = :scheme
+ where ims_md_md_sch_id = :ims_md_md_sch_id
+
+
+
+
+
+ insert into ims_md_metadata_scheme
+ (ims_md_md_sch_id, ims_md_id, scheme)
+ values
+ (:ims_md_md_sch_id, :ims_md_id, :scheme)
+
+
+
+
+
+ select scheme, ims_md_id, ims_md_md_sch_id, scheme
+ from ims_md_metadata_scheme
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/relationmd/relation.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/relationmd/relation.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/md/relationmd/relation.tcl 17 Nov 2008 13:37:54 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/md/relationmd/relation.tcl 12 Dec 2008 14:25:38 -0000 1.3
@@ -40,12 +40,7 @@
kind_v { label "" }
}
-db_multirow d_re_kind select_re_kind {
- select kind_s, kind_v
- from ims_md_relation
- where ims_md_re_id = :ims_md_re_id
- and ims_md_id = :ims_md_id
-}
+db_multirow d_re_kind select_re_kind {}
# Relation Resource Identifier
template::list::create \
@@ -63,12 +58,7 @@
identifier { label "" }
}
-db_multirow d_re_ident select_re_ident {
- select identifier
- from ims_md_relation_resource
- where ims_md_re_id = :ims_md_re_id
- and ims_md_re_re_id = :ims_md_re_re_id
-}
+db_multirow d_re_ident select_re_ident {}
# Relation Resource Catalog-Entry
template::list::create \
@@ -88,11 +78,7 @@
entry_s { label "" }
}
-db_multirow d_re_cata select_re_cata {
- select catalog, entry_l, entry_s
- from ims_md_relation_resource_catalog
- where ims_md_re_re_id = :ims_md_re_re_id
-}
+db_multirow d_re_cata select_re_cata {}
# Relation Resource Description
template::list::create \
@@ -110,11 +96,6 @@
descrip { label "" }
}
-db_multirow d_re_desc select_re_desc {
- select '[' || descrip_l || ']' || ' ' || descrip_s as descrip
- from ims_md_relation_resource
- where ims_md_re_id = :ims_md_re_id
- and ims_md_re_re_id = :ims_md_re_re_id
-}
+db_multirow d_re_desc select_re_desc {}
Index: openacs-4/packages/lorsm/www/admin/md/relationmd/relation.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/relationmd/relation.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/relationmd/relation.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,39 @@
+
+
+
+
+
+ select kind_s, kind_v
+ from ims_md_relation
+ where ims_md_re_id = :ims_md_re_id
+ and ims_md_id = :ims_md_id
+
+
+
+
+
+ select identifier
+ from ims_md_relation_resource
+ where ims_md_re_id = :ims_md_re_id
+ and ims_md_re_re_id = :ims_md_re_re_id
+
+
+
+
+
+ select catalog, entry_l, entry_s
+ from ims_md_relation_resource_catalog
+ where ims_md_re_re_id = :ims_md_re_re_id
+
+
+
+
+
+ select '[' || descrip_l || ']' || ' ' || descrip_s as descrip
+ from ims_md_relation_resource
+ where ims_md_re_id = :ims_md_re_id
+ and ims_md_re_re_id = :ims_md_re_re_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/relationmd/relation_add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/relationmd/relation_add.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/md/relationmd/relation_add.tcl 17 Nov 2008 13:37:55 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/md/relationmd/relation_add.tcl 12 Dec 2008 14:25:38 -0000 1.3
@@ -39,13 +39,9 @@
} -new_data {
db_transaction {
- db_dml do_insert_relation \
- "insert into ims_md_relation (ims_md_re_id, ims_md_id)
- values (:ims_md_re_id, :ims_md_id)"
+ db_dml do_insert_relation {}
- db_dml do_insert_resource \
- "insert into ims_md_relation_resource (ims_md_re_re_id, ims_md_re_id)
- values (nextval('ims_md_relation_resource_seq'), :ims_md_re_id)"
+ db_dml do_insert_resource {}
}
} -after_submit {
Index: openacs-4/packages/lorsm/www/admin/md/relationmd/relation_add.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/relationmd/relation_add.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/relationmd/relation_add.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,22 @@
+
+
+
+
+
+ insert into ims_md_relation
+ (ims_md_re_id, ims_md_id)
+ values
+ (:ims_md_re_id, :ims_md_id)
+
+
+
+
+
+ insert into ims_md_relation_resource
+ (ims_md_re_re_id, ims_md_re_id)
+ values
+ (nextval('ims_md_relation_resource_seq'), :ims_md_re_id)
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/relationmd/relation_cata.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/relationmd/relation_cata.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/relationmd/relation_cata.tcl 17 Nov 2008 13:37:55 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/relationmd/relation_cata.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -84,24 +84,13 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_relation_resource_catalog
- where ims_md_re_re_ca_id = :ims_md_re_re_ca_id
- and ims_md_re_re_id = :ims_md_re_re_id
+ } -select_query_name relationmd_cata_ad_form {
} -edit_data {
- db_dml do_update "
- update ims_md_relation_resource_catalog
- set catalog = :catalog,
- entry_l = :entry_l,
- entry_s = :entry_s
- where ims_md_re_re_ca_id = :ims_md_re_re_ca_id"
+ db_dml do_update {}
} -new_data {
- db_dml do_insert "
- insert into ims_md_relation_resource_catalog (ims_md_re_re_ca_id, ims_md_re_re_id, catalog, entry_l, entry_s)
- values (:ims_md_re_re_ca_id, :ims_md_re_re_id, :catalog, :entry_l, :entry_s)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars \
@@ -130,10 +119,4 @@
}
}
-db_multirow d_re_cata select_re_cata {
- select reca.catalog, reca.entry_l, reca.entry_s, reca.ims_md_re_re_ca_id,
- reca.ims_md_re_re_id, re.ims_md_id, re.ims_md_re_id
- from ims_md_relation_resource_catalog reca, ims_md_relation re
- where reca.ims_md_re_re_id = :ims_md_re_re_id
- and re.ims_md_re_id = :ims_md_re_id
-}
+db_multirow d_re_cata select_re_cata {}
Index: openacs-4/packages/lorsm/www/admin/md/relationmd/relation_cata.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/relationmd/relation_cata.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/relationmd/relation_cata.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,42 @@
+
+
+
+
+
+ select *
+ from ims_md_relation_resource_catalog
+ where ims_md_re_re_ca_id = :ims_md_re_re_ca_id
+ and ims_md_re_re_id = :ims_md_re_re_id
+
+
+
+
+
+ update ims_md_relation_resource_catalog
+ set catalog = :catalog,
+ entry_l = :entry_l,
+ entry_s = :entry_s
+ where ims_md_re_re_ca_id = :ims_md_re_re_ca_id
+
+
+
+
+
+ insert into ims_md_relation_resource_catalog
+ (ims_md_re_re_ca_id, ims_md_re_re_id, catalog, entry_l, entry_s)
+ values
+ (:ims_md_re_re_ca_id, :ims_md_re_re_id, :catalog, :entry_l, :entry_s)
+
+
+
+
+
+ select reca.catalog, reca.entry_l, reca.entry_s, reca.ims_md_re_re_ca_id,
+ reca.ims_md_re_re_id, re.ims_md_id, re.ims_md_re_id
+ from ims_md_relation_resource_catalog reca, ims_md_relation re
+ where reca.ims_md_re_re_id = :ims_md_re_re_id
+ and re.ims_md_re_id = :ims_md_re_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/relationmd/relation_desc.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/relationmd/relation_desc.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/relationmd/relation_desc.tcl 17 Nov 2008 13:37:55 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/relationmd/relation_desc.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -59,18 +59,10 @@
{ims_md_re_id:text(hidden) {value $ims_md_re_id}}
- } -select_query {
- select *
- from ims_md_relation_resource
- where ims_md_re_re_id = :ims_md_re_re_id
- and ims_md_re_id = :ims_md_re_id
+ } -select_query_name relationmd_desc_ad_form {
} -edit_data {
- db_dml do_update "
- update ims_md_relation_resource
- set descrip_l = :descrip_l,
- descrip_s = :descrip_s
- where ims_md_re_re_id = :ims_md_re_re_id "
+ db_dml do_update {}
} -after_submit {
ad_returnredirect [export_vars \
@@ -89,10 +81,4 @@
descrip {label "[_ lorsm.Description_1]"}
}
-db_multirow d_re_desc select_re_desc {
- select '[' || rere.descrip_l || ']' || ' ' || rere.descrip_s as descrip,
- rere.ims_md_re_re_id, re.ims_md_re_id, re.ims_md_id
- from ims_md_relation_resource rere, ims_md_relation re
- where rere.ims_md_re_id = :ims_md_re_id
- and re.ims_md_re_id = :ims_md_re_id
-}
+db_multirow d_re_desc select_re_desc {}
Index: openacs-4/packages/lorsm/www/admin/md/relationmd/relation_desc.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/relationmd/relation_desc.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/relationmd/relation_desc.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,32 @@
+
+
+
+
+
+ select *
+ from ims_md_relation_resource
+ where ims_md_re_re_id = :ims_md_re_re_id
+ and ims_md_re_id = :ims_md_re_id
+
+
+
+
+
+ update ims_md_relation_resource
+ set descrip_l = :descrip_l,
+ descrip_s = :descrip_s
+ where ims_md_re_re_id = :ims_md_re_re_id
+
+
+
+
+
+ select '[' || rere.descrip_l || ']' || ' ' || rere.descrip_s as descrip,
+ rere.ims_md_re_re_id, re.ims_md_re_id, re.ims_md_id
+ from ims_md_relation_resource rere, ims_md_relation re
+ where rere.ims_md_re_id = :ims_md_re_id
+ and re.ims_md_re_id = :ims_md_re_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/relationmd/relation_ident.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/relationmd/relation_ident.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/relationmd/relation_ident.tcl 17 Nov 2008 13:37:55 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/relationmd/relation_ident.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -53,17 +53,10 @@
{ims_md_re_id:text(hidden) {value $ims_md_re_id}}
- } -select_query {
- select *
- from ims_md_relation_resource
- where ims_md_re_re_id = :ims_md_re_re_id
- and ims_md_re_id = :ims_md_re_id
+ } -select_query_name relationmd_ident_ad_form {
} -edit_data {
- db_dml do_update "
- update ims_md_relation_resource
- set identifier = :identifier
- where ims_md_re_re_id = :ims_md_re_re_id "
+ db_dml do_update {}
} -after_submit {
ad_returnredirect [export_vars \
@@ -82,9 +75,4 @@
identifier { label "[_ lorsm.Identifier_1]" }
}
-db_multirow d_re_ident select_re_ident {
- select rere.identifier, rere.ims_md_re_re_id, re.ims_md_re_id, re.ims_md_id
- from ims_md_relation_resource rere, ims_md_relation re
- where rere.ims_md_re_id = :ims_md_re_id
- and re.ims_md_re_id = :ims_md_re_id
-}
+db_multirow d_re_ident select_re_ident {}
Index: openacs-4/packages/lorsm/www/admin/md/relationmd/relation_ident.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/relationmd/relation_ident.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/relationmd/relation_ident.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,30 @@
+
+
+
+
+
+ select *
+ from ims_md_relation_resource
+ where ims_md_re_re_id = :ims_md_re_re_id
+ and ims_md_re_id = :ims_md_re_id
+
+
+
+
+
+ update ims_md_relation_resource
+ set identifier = :identifier
+ where ims_md_re_re_id = :ims_md_re_re_id
+
+
+
+
+
+ select rere.identifier, rere.ims_md_re_re_id, re.ims_md_re_id, re.ims_md_id
+ from ims_md_relation_resource rere, ims_md_relation re
+ where rere.ims_md_re_id = :ims_md_re_id
+ and re.ims_md_re_id = :ims_md_re_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/relationmd/relation_kind.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/relationmd/relation_kind.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/relationmd/relation_kind.tcl 17 Nov 2008 13:37:55 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/relationmd/relation_kind.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -59,18 +59,10 @@
{ims_md_re_re_id:text(hidden) {value $ims_md_re_re_id}}
- } -select_query {
- select *
- from ims_md_relation
- where ims_md_re_id = :ims_md_re_id
- and ims_md_id = :ims_md_id
+ } -select_query_name relationmd_kind_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_relation
- set kind_s = :kind_s,
- kind_v = :kind_v
- where ims_md_re_id = :ims_md_re_id"
+ db_dml do_update {}
} -after_submit {
ad_returnredirect [export_vars \
@@ -90,9 +82,4 @@
kind_v { label "[_ lorsm.Value]" }
}
-db_multirow d_re_kind select_re_kind {
- select re.kind_s, re.kind_v, re.ims_md_re_id, re.ims_md_id, rere.ims_md_re_re_id
- from ims_md_relation re, ims_md_relation_resource rere
- where re.ims_md_re_id = :ims_md_re_id
- and rere.ims_md_re_id = :ims_md_re_id
-}
+db_multirow d_re_kind select_re_kind {}
Index: openacs-4/packages/lorsm/www/admin/md/relationmd/relation_kind.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/relationmd/relation_kind.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/relationmd/relation_kind.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,31 @@
+
+
+
+
+
+ select *
+ from ims_md_relation
+ where ims_md_re_id = :ims_md_re_id
+ and ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_relation
+ set kind_s = :kind_s,
+ kind_v = :kind_v
+ where ims_md_re_id = :ims_md_re_id
+
+
+
+
+
+ select re.kind_s, re.kind_v, re.ims_md_re_id, re.ims_md_id, rere.ims_md_re_re_id
+ from ims_md_relation re, ims_md_relation_resource rere
+ where re.ims_md_re_id = :ims_md_re_id
+ and rere.ims_md_re_id = :ims_md_re_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_caor.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_caor.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_caor.tcl 17 Nov 2008 13:37:55 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_caor.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -52,18 +52,10 @@
} -on_submit {
# check if the Rights Copyright details already exist...
- if {[db_0or1row select_type {
- select ims_md_id
- from ims_md_rights
- where ims_md_id = :ims_md_id}]} {
- db_dml do_update \
- "update ims_md_rights
- set caor_s = :caor_s, caor_v = :caor_v
- where ims_md_id = :ims_md_id "
+ if {[db_0or1row select_type {}]} {
+ db_dml do_update {}
} else {
- db_dml do_insert \
- "insert into ims_md_rights (ims_md_id, caor_s, caor_v)
- values (:ims_md_id, :caor_s, :caor_v) "
+ db_dml do_insert {}
}
} -after_submit {
@@ -81,8 +73,4 @@
caor { label "[_ lorsm.Copyright_Info]" }
}
-db_multirow d_ri_caor select_ri_caor {
- select '[' || caor_s || '] ' || caor_v as caor, ims_md_id
- from ims_md_rights
- where ims_md_id = :ims_md_id
-}
+db_multirow d_ri_caor select_ri_caor {}
Index: openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_caor.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_caor.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_caor.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,37 @@
+
+
+
+
+
+ select ims_md_id
+ from ims_md_rights
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_rights
+ set caor_s = :caor_s, caor_v = :caor_v
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ insert into ims_md_rights
+ (ims_md_id, caor_s, caor_v)
+ values
+ (:ims_md_id, :caor_s, :caor_v)
+
+
+
+
+
+ select '[' || caor_s || '] ' || caor_v as caor, ims_md_id
+ from ims_md_rights
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_cost.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_cost.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_cost.tcl 17 Nov 2008 13:37:55 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_cost.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -52,19 +52,10 @@
} -on_submit {
# check if the Rights Cost details already exist...
- if {[db_0or1row select_type {
- select ims_md_id
- from ims_md_rights
- where ims_md_id = :ims_md_id}]} {
- db_dml do_update \
- "update ims_md_rights
- set cost_s = :cost_s,
- cost_v = :cost_v
- where ims_md_id = :ims_md_id "
+ if {[db_0or1row select_type {}]} {
+ db_dml do_update {}
} else {
- db_dml do_insert \
- "insert into ims_md_rights (ims_md_id, cost_s, cost_v)
- values(:ims_md_id, :cost_s, :cost_v) "
+ db_dml do_insert {}
}
} -after_submit {
@@ -82,8 +73,4 @@
cost { label "[_ lorsm.Cost_1]" }
}
-db_multirow d_ri_cost select_ri_cost {
- select '[' || cost_s || '] ' || cost_v as cost, ims_md_id
- from ims_md_rights
- where ims_md_id = :ims_md_id
-}
+db_multirow d_ri_cost select_ri_cost {}
Index: openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_cost.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_cost.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_cost.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,38 @@
+
+
+
+
+
+ select ims_md_id
+ from ims_md_rights
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_rights
+ set cost_s = :cost_s,
+ cost_v = :cost_v
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ insert into ims_md_rights
+ (ims_md_id, cost_s, cost_v)
+ values
+ (:ims_md_id, :cost_s, :cost_v)
+
+
+
+
+
+ select '[' || cost_s || '] ' || cost_v as cost, ims_md_id
+ from ims_md_rights
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_desc.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_desc.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_desc.tcl 17 Nov 2008 13:37:55 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_desc.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -52,17 +52,11 @@
} -on_submit {
# check if the Rights Description details already exist...
- if {[db_0or1row select_type {select ims_md_id from ims_md_rights where ims_md_id = :ims_md_id}]} {
- db_dml do_update "
- update ims_md_rights
- set descrip_l = :descrip_l,
- descrip_s = :descrip_s
- where ims_md_id = :ims_md_id "
+ if {[db_0or1row select_type {}]} {
+ db_dml do_update {}
} else {
- db_dml do_insert "
- insert into ims_md_rights (ims_md_id, descrip_l, descrip_s)
- values (:ims_md_id, :descrip_l, :descrip_s) "
+ db_dml do_insert {}
}
} -after_submit {
@@ -80,8 +74,4 @@
desc { label "[_ lorsm.Description_1]" }
}
-db_multirow d_ri_desc select_ri_desc {
- select '[' || descrip_l || '] ' || descrip_s as desc, ims_md_id
- from ims_md_rights
- where ims_md_id = :ims_md_id
-}
+db_multirow d_ri_desc select_ri_desc {}
Index: openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_desc.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_desc.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/rightsmd/rights_desc.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,38 @@
+
+
+
+
+
+ select ims_md_id
+ from ims_md_rights
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_rights
+ set descrip_l = :descrip_l,
+ descrip_s = :descrip_s
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ insert into ims_md_rights
+ (ims_md_id, descrip_l, descrip_s)
+ values
+ (:ims_md_id, :descrip_l, :descrip_s) "
+
+
+
+
+
+ select '[' || descrip_l || '] ' || descrip_s as desc, ims_md_id
+ from ims_md_rights
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_dur.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_dur.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_dur.tcl 17 Nov 2008 13:37:55 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_dur.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -56,20 +56,10 @@
} -on_submit {
# check if the tech duration details already exist...
- if {[db_0or1row select_duration {
- select ims_md_id
- from ims_md_technical
- where ims_md_id = :ims_md_id}]} {
- db_dml do_update \
- "update ims_md_technical
- set duration_s = :duration_s,
- duration_l = :duration_l,
- duration = :duration
- where ims_md_id = :ims_md_id "
+ if {[db_0or1row select_duration {}]} {
+ db_dml do_update {}
} else {
- db_dml do_insert \
- "insert into ims_md_technical (ims_md_id, duration_l, duration_s)
- values (:ims_md_id, :duration_l, :duration_s)"
+ db_dml do_insert {}
}
} -after_submit {
@@ -89,8 +79,4 @@
duration_s { label "[_ lorsm.Source_1]" }
}
-db_multirow d_te_dur select_te_dur {
- select duration_l, duration_s, duration || 's' as duration_sec, ims_md_id
- from ims_md_technical
- where ims_md_id = :ims_md_id
-}
+db_multirow d_te_dur select_te_dur {}
Index: openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_dur.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_dur.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_dur.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,39 @@
+
+
+
+
+
+ select ims_md_id
+ from ims_md_technical
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_technical
+ set duration_s = :duration_s,
+ duration_l = :duration_l,
+ duration = :duration
+ where ims_md_id = :ims_md_id "
+
+
+
+
+
+ insert into ims_md_technical
+ (ims_md_id, duration_l, duration_s)
+ values
+ (:ims_md_id, :duration_l, :duration_s)
+
+
+
+
+
+ select duration_l, duration_s, duration || 's' as duration_sec, ims_md_id
+ from ims_md_technical
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_form.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_form.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_form.tcl 17 Nov 2008 13:37:55 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_form.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -54,22 +54,13 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_technical_format
- where ims_md_te_fo_id = :ims_md_te_fo_id
- and ims_md_id = :ims_md_id
+ } -select_query_name technicalmd_form_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_technical_format
- set format = :format
- where ims_md_te_fo_id = :ims_md_te_fo_id "
+ db_dml do_update {}
} -new_data {
- db_dml do_insert \
- "insert into ims_md_technical_format (ims_md_te_fo_id, ims_md_id, format)
- values(:ims_md_te_fo_id, :ims_md_id, :format)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "../technicalmd" {ims_md_id}]
@@ -94,8 +85,4 @@
}
}
-db_multirow d_te_form select_te_form {
- select format, ims_md_te_fo_id, ims_md_id
- from ims_md_technical_format
- where ims_md_id = :ims_md_id
-}
+db_multirow d_te_form select_te_form {}
Index: openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_form.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_form.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_form.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,38 @@
+
+
+
+
+
+ select *
+ from ims_md_technical_format
+ where ims_md_te_fo_id = :ims_md_te_fo_id
+ and ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_technical_format
+ set format = :format
+ where ims_md_te_fo_id = :ims_md_te_fo_id
+
+
+
+
+
+ insert into ims_md_technical_format
+ (ims_md_te_fo_id, ims_md_id, format)
+ values
+ (:ims_md_te_fo_id, :ims_md_id, :format)
+
+
+
+
+
+ select format, ims_md_te_fo_id, ims_md_id
+ from ims_md_technical_format
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_inst.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_inst.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_inst.tcl 17 Nov 2008 13:37:55 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_inst.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -49,17 +49,11 @@
} -on_submit {
# check if the tech size details already exist...
- if {[db_0or1row select_size {select ims_md_id from ims_md_technical where ims_md_id = :ims_md_id}]} {
- db_dml do_update \
- "update ims_md_technical
- set instl_rmrks_l = :instl_rmrks_l,
- instl_rmrks_s = :instl_rmrks_s
- where ims_md_id = :ims_md_id"
+ if {[db_0or1row select_size {}]} {
+ db_dml do_update {}
} else {
- db_dml do_insert \
- "insert into ims_md_technical (ims_md_id, instl_rmrks_l, instl_rmrks_s)
- values(:ims_md_id, :instl_rmrks_l, :instl_rmrks_s) "
+ db_dml do_insert {}
}
} -after_submit {
@@ -77,8 +71,4 @@
instl_rmrks { label "[_ lorsm.Installation_Remarks_1]" }
}
-db_multirow d_te_inst select_te_inst {
- select '[' || instl_rmrks_l || ']' || ' ' || instl_rmrks_s as instl_rmrks, ims_md_id
- from ims_md_technical
- where ims_md_id = :ims_md_id
-}
+db_multirow d_te_inst select_te_inst {}
Index: openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_inst.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_inst.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_inst.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,38 @@
+
+
+
+
+
+ select ims_md_id
+ from ims_md_technical
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_technical
+ set instl_rmrks_l = :instl_rmrks_l,
+ instl_rmrks_s = :instl_rmrks_s
+ where ims_md_id = :ims_md_id"
+
+
+
+
+
+ insert into ims_md_technical
+ (ims_md_id, instl_rmrks_l, instl_rmrks_s)
+ values
+ (:ims_md_id, :instl_rmrks_l, :instl_rmrks_s)
+
+
+
+
+
+ select '[' || instl_rmrks_l || ']' || ' ' || instl_rmrks_s as instl_rmrks, ims_md_id
+ from ims_md_technical
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_loca.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_loca.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_loca.tcl 17 Nov 2008 13:37:55 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_loca.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -63,23 +63,13 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_technical_location
- where ims_md_te_lo_id = :ims_md_te_lo_id
- and ims_md_id = :ims_md_id
+ } -select_query_name technicalmd_loca_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_technical_location
- set type = :type,
- location = :location
- where ims_md_te_lo_id = :ims_md_te_lo_id "
+ db_dml do_update {}
} -new_data {
- db_dml do_insert \
- "insert into ims_md_technical_location (ims_md_te_lo_id, ims_md_id, type, location)
- values(:ims_md_te_lo_id, :ims_md_id, :type, :location)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "../technicalmd" {ims_md_id}]
@@ -105,8 +95,4 @@
}
}
-db_multirow d_te_loca select_te_loca {
- select type, location, ims_md_te_lo_id, ims_md_id
- from ims_md_technical_location
- where ims_md_id = :ims_md_id
-}
+db_multirow d_te_loca select_te_loca {}
Index: openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_loca.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_loca.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_loca.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,39 @@
+
+
+
+
+
+ select *
+ from ims_md_technical_location
+ where ims_md_te_lo_id = :ims_md_te_lo_id
+ and ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_technical_location
+ set type = :type,
+ location = :location
+ where ims_md_te_lo_id = :ims_md_te_lo_id
+
+
+
+
+
+ insert into ims_md_technical_location
+ (ims_md_te_lo_id, ims_md_id, type, location)
+ values
+ (:ims_md_te_lo_id, :ims_md_id, :type, :location)
+
+
+
+
+
+ select type, location, ims_md_te_lo_id, ims_md_id
+ from ims_md_technical_location
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_otr.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_otr.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_otr.tcl 17 Nov 2008 13:37:55 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_otr.tcl 12 Dec 2008 14:25:38 -0000 1.4
@@ -50,19 +50,10 @@
} -on_submit {
# check if the tech other platform req details already exist...
- if {[db_0or1row select_size {
- select ims_md_id
- from ims_md_technical
- where ims_md_id = :ims_md_id}]} {
- db_dml do_update "
- update ims_md_technical
- set otr_plt_l = :otr_plt_l,
- otr_plt_s = :otr_plt_s
- where ims_md_id = :ims_md_id "
+ if {[db_0or1row select_size {}]} {
+ db_dml do_update {}
} else {
- db_dml do_insert "
- insert into ims_md_technical (ims_md_id, otr_plt_l, otr_plt_s)
- values(:ims_md_id, :otr_plt_l, :otr_plt_s)"
+ db_dml do_insert {}
}
} -after_submit {
@@ -80,8 +71,4 @@
otr_plt { label "[_ lorsm.Other_Platform_Req]" }
}
-db_multirow d_te_otr select_te_otr {
- select '[' || otr_plt_l || ']' || ' ' || otr_plt_s as otr_plt, ims_md_id
- from ims_md_technical
- where ims_md_id = :ims_md_id
-}
+db_multirow d_te_otr select_te_otr {}
Index: openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_otr.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_otr.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_otr.xql 12 Dec 2008 14:25:38 -0000 1.1
@@ -0,0 +1,38 @@
+
+
+
+
+
+ select ims_md_id
+ from ims_md_technical
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_technical
+ set otr_plt_l = :otr_plt_l,
+ otr_plt_s = :otr_plt_s
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ insert into ims_md_technical
+ (ims_md_id, otr_plt_l, otr_plt_s)
+ values
+ (:ims_md_id, :otr_plt_l, :otr_plt_s)
+
+
+
+
+
+ select '[' || otr_plt_l || ']' || ' ' || otr_plt_s as otr_plt, ims_md_id
+ from ims_md_technical
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_req.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_req.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_req.tcl 17 Nov 2008 13:37:55 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_req.tcl 12 Dec 2008 14:25:39 -0000 1.4
@@ -81,27 +81,13 @@
{ims_md_id:text(hidden) {value $ims_md_id}}
- } -select_query {
- select *
- from ims_md_technical_requirement
- where ims_md_te_rq_id = :ims_md_te_rq_id
- and ims_md_id = :ims_md_id
+ } -select_query_name technicalmd_req_ad_form {
} -edit_data {
- db_dml do_update \
- "update ims_md_technical_requirement
- set type_v = :type_v,
- type_s = :type_s,
- name_v = :name_v,
- name_s = :type_s,
- min_version = :min_version,
- max_version = :max_version
- where ims_md_te_rq_id = :ims_md_te_rq_id"
+ db_dml do_update {}
} -new_data {
- db_dml do_insert \
- "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 (:ims_md_te_rq_id, :ims_md_id, :type_s, :type_v, :type_s, :name_v, :min_version, :max_version)"
+ db_dml do_insert {}
} -after_submit {
ad_returnredirect [export_vars -base "../technicalmd" {ims_md_id}]
@@ -129,10 +115,4 @@
}
}
-db_multirow d_te_req select_te_req {
- select '[' || type_s || ']' || ' ' || type_v as type,
- '[' || name_s || ']' || ' ' || name_v as name,
- min_version, max_version, ims_md_te_rq_id, ims_md_id
- from ims_md_technical_requirement
- where ims_md_id = :ims_md_id
-}
+db_multirow d_te_req select_te_req {}
Index: openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_req.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_req.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_req.xql 12 Dec 2008 14:25:39 -0000 1.1
@@ -0,0 +1,45 @@
+
+
+
+
+
+ update ims_md_technical_requirement
+ set type_v = :type_v,
+ type_s = :type_s,
+ name_v = :name_v,
+ name_s = :type_s,
+ min_version = :min_version,
+ max_version = :max_version
+ where ims_md_te_rq_id = :ims_md_te_rq_id
+
+
+
+
+
+ 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
+ (:ims_md_te_rq_id, :ims_md_id, :type_s, :type_v, :type_s, :name_v, :min_version, :max_version)
+
+
+
+
+
+ select '[' || type_s || ']' || ' ' || type_v as type,
+ '[' || name_s || ']' || ' ' || name_v as name,
+ min_version, max_version, ims_md_te_rq_id, ims_md_id
+ from ims_md_technical_requirement
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ select *
+ from ims_md_technical_requirement
+ where ims_md_te_rq_id = :ims_md_te_rq_id
+ and ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_size.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_size.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_size.tcl 17 Nov 2008 13:37:55 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_size.tcl 12 Dec 2008 14:25:39 -0000 1.4
@@ -44,18 +44,10 @@
} -on_submit {
# check if the tech size details already exist...
- if {[db_0or1row select_size {
- select ims_md_id
- from ims_md_technical
- where ims_md_id = :ims_md_id}]} {
- db_dml do_update \
- "update ims_md_technical
- set t_size = :t_size
- where ims_md_id = :ims_md_id "
+ if {[db_0or1row select_size {}]} {
+ db_dml do_update {}
} else {
- db_dml do_insert \
- "insert into ims_md_technical (ims_md_id, t_size)
- values (:ims_md_id, :t_size) "
+ db_dml do_insert {}
}
} -after_submit {
@@ -79,8 +71,4 @@
}
}
-db_multirow d_te_size select_te_size {
- select t_size || ' bytes' as t_size_bytes, ims_md_id
- from ims_md_technical
- where ims_md_id = :ims_md_id
-}
+db_multirow d_te_size select_te_size {}
Index: openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_size.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_size.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/md/technicalmd/technical_size.xql 12 Dec 2008 14:25:39 -0000 1.1
@@ -0,0 +1,37 @@
+
+
+
+
+
+ select ims_md_id
+ from ims_md_technical
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ update ims_md_technical
+ set t_size = :t_size
+ where ims_md_id = :ims_md_id
+
+
+
+
+
+ insert into ims_md_technical
+ (ims_md_id, t_size)
+ values
+ (:ims_md_id, :t_size)
+
+
+
+
+
+ select t_size || ' bytes' as t_size_bytes, ims_md_id
+ from ims_md_technical
+ where ims_md_id = :ims_md_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/shared/add-shared-course-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/shared/add-shared-course-2.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/shared/add-shared-course-2.tcl 17 Nov 2008 13:37:55 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/shared/add-shared-course-2.tcl 12 Dec 2008 14:25:39 -0000 1.3
@@ -22,10 +22,7 @@
set class_key [dotlrn_community::get_community_type_from_community_id $community_id]
# check if the course is actually shared
-if {[db_string isshared \
- {select isshared
- from ims_cp_manifests
- where man_id = :man_id}] == "f"} {
+if {[db_string isshared {}] == "f"} {
# if it ain't complain and quit
ad_complain "[_ lorsm.lt_The_course_you_are_tr]"
@@ -34,20 +31,12 @@
# check if the course is already added as course for this class
-if {![db_0or1row exists \
- {select man_id, lorsm_instance_id
- from ims_cp_manifest_class
- where man_id = :man_id
- and lorsm_instance_id = :package_id
- and community_id = :community_id}]} {
+if {![db_0or1row exists {}]} {
set var1 [lorsm::get_course_name -manifest_id $man_id]
ad_complain "[_ lorsm.lt_The_course_var1_is_al]"
}
-db_dml add-course \
- {insert into ims_cp_manifest_class
- (man_id, lorsm_instance_id, community_id, class_key, isenabled, istrackable)
- values (:man_id, :package_id, :community_id, :class_key, 't', 'f')}
+db_dml add-course {}
ad_returnredirect $return_url
Index: openacs-4/packages/lorsm/www/admin/shared/add-shared-course-2.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/shared/add-shared-course-2.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/shared/add-shared-course-2.xql 12 Dec 2008 14:25:39 -0000 1.1
@@ -0,0 +1,31 @@
+
+
+
+
+
+ select isshared
+ from ims_cp_manifests
+ where man_id = :man_id
+
+
+
+
+
+ select man_id, lorsm_instance_id
+ from ims_cp_manifest_class
+ where man_id = :man_id
+ and lorsm_instance_id = :package_id
+ and community_id = :community_id
+
+
+
+
+
+ insert into ims_cp_manifest_class
+ (man_id, lorsm_instance_id, community_id, class_key, isenabled, istrackable)
+ values
+ (:man_id, :package_id, :community_id, :class_key, 't', 'f')
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/shared/add-shared-course.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/shared/add-shared-course.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/shared/add-shared-course.tcl 17 Nov 2008 13:37:55 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/shared/add-shared-course.tcl 12 Dec 2008 14:25:39 -0000 1.3
@@ -21,22 +21,14 @@
set class_key [dotlrn_community::get_community_type_from_community_id $community_id]
# check if the course is actually shared
-if {[db_string isshared \
- {select isshared
- from ims_cp_manifests
- where man_id = :man_id}] == "f"} {
+if {[db_string isshared {}] == "f"} {
# if it ain't complain and quit
ad_complain "[_ lorsm.lt_The_course_you_are_tr]"
}
# check if the course is already added as course for this class
-if {![db_0or1row exists \
- {select man_id, lorsm_instance_id
- from ims_cp_manifest_class
- where man_id = :man_id
- and lorsm_instance_id = :package_id
- and community_id = :community_id}]} {
+if {![db_0or1row exists {}]} {
ad_complain "The course [lorsm::get_course_name -manifest_id $man_id], is already part of your class"
}
Index: openacs-4/packages/lorsm/www/admin/shared/add-shared-course.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/shared/add-shared-course.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/shared/add-shared-course.xql 12 Dec 2008 14:25:39 -0000 1.1
@@ -0,0 +1,22 @@
+
+
+
+
+
+ select isshared
+ from ims_cp_manifests
+ where man_id = :man_id
+
+
+
+
+
+ select man_id, lorsm_instance_id
+ from ims_cp_manifest_class
+ where man_id = :man_id
+ and lorsm_instance_id = :package_id
+ and community_id = :community_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/shared/course-info.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/shared/course-info.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/shared/course-info.tcl 17 Nov 2008 13:37:55 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/shared/course-info.tcl 12 Dec 2008 14:25:39 -0000 1.3
@@ -39,28 +39,9 @@
# Checks whether this course is already in use on this community
-set active [db_0or1row check "
- select man_id, community_id, lorsm_instance_id
- from ims_cp_manifest_class
- where man_id = :man_id
- and community_id = :community_id"]
+set active [db_0or1row check {}]
-if {[db_0or1row manifest "
- select cp.man_id, cp.course_name, cp.identifier, cp.version,
- text 'Yes' as hello,
- case
- when hasmetadata = 't' then 'Yes'
- else 'No'
- end as man_metadata,
- case
- when isscorm = 't' then 'Yes'
- else 'No'
- end as isscorm,
- cp.isshared, acs.creation_user, acs.creation_date, acs.context_id
- from ims_cp_manifests cp, acs_objects acs
- where cp.man_id = acs.object_id
- and cp.man_id = :man_id
- and cp.parent_man_id = 0"]} {
+if {[db_0or1row manifest {}]} {
# Sets the variable for display.
set display 1
@@ -82,11 +63,7 @@
set creation_date [lc_time_fmt $creation_date "%x %X"]
# Check for submanifests
- if {[db_0or1row submans "
- select count(*) as submanifests
- from ims_cp_manifests
- where man_id = :man_id
- and parent_man_id = :man_id"]} {
+ if {[db_0or1row submans {}]} {
} else {
set submanifests 0
}
@@ -107,14 +84,7 @@
style=\"background-color: #e0e0e0; font-weight: bold;\">Items
"
-db_foreach organizations \
- {select org.org_id, org.org_title as org_title, org.hasmetadata,
- tree_level(o.tree_sortkey) as indent
- from ims_cp_organizations org, acs_objects o
- where org.org_id = o.object_id
- and man_id = :man_id
- order by org_id
-} {
+db_foreach organizations {} {
append orgs_list \
"
$org_title |
Index: openacs-4/packages/lorsm/www/admin/shared/course-info.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/shared/course-info.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/shared/course-info.xql 12 Dec 2008 14:25:39 -0000 1.1
@@ -0,0 +1,53 @@
+
+
+
+
+
+ select man_id, community_id, lorsm_instance_id
+ from ims_cp_manifest_class
+ where man_id = :man_id
+ and community_id = :community_id"
+
+
+
+
+
+ select cp.man_id, cp.course_name, cp.identifier, cp.version,
+ text 'Yes' as hello,
+ case when hasmetadata = 't' then 'Yes'
+ else 'No'
+ end as man_metadata,
+
+ case when isscorm = 't' then 'Yes'
+ else 'No'
+ end as isscorm,
+
+ cp.isshared, acs.creation_user, acs.creation_date, acs.context_id
+ from ims_cp_manifests cp, acs_objects acs
+ where cp.man_id = acs.object_id
+ and cp.man_id = :man_id
+ and cp.parent_man_id = 0
+
+
+
+
+
+ select count(*) as submanifests
+ from ims_cp_manifests
+ where man_id = :man_id
+ and parent_man_id = :man_id
+
+
+
+
+
+ select org.org_id, org.org_title as org_title, org.hasmetadata,
+ tree_level(o.tree_sortkey) as indent
+ from ims_cp_organizations org, acs_objects o
+ where org.org_id = o.object_id
+ and man_id = :man_id
+ order by org_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/tracking/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/tracking/index.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/tracking/index.tcl 17 Nov 2008 13:37:55 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/tracking/index.tcl 12 Dec 2008 14:25:39 -0000 1.4
@@ -64,14 +64,7 @@
}
}
- db_multirow -extend { ims_md_id } student_track select_students {
- select user_id as student_name, start_time, end_time
- from lorsm_student_track
- where community_id = :community_id
- and course_id = :man_id
- and end_time NOTNULL
- order by start_time desc
- } {
+ db_multirow -extend { ims_md_id } student_track select_students {} {
set ims_md_id $man_id
}
@@ -100,14 +93,7 @@
set extra_where ""
}
- db_multirow -extend {viewer_name} object_views objects_views \
- "select v.*, i.item_title as title
- from views_views v, ims_cp_items i, ims_cp_organizations o
- where i.ims_item_id = v.object_id
- and i.org_id = o.org_id
- and o.man_id = :man_id
- $extra_where"
- {
+ db_multirow -extend {viewer_name} object_views objects_views {} {
set viewer_name [acs_user::get_element -user_id $viewer_id -element name]
}
@@ -140,15 +126,7 @@
}
}
- db_multirow -extend { ims_md_id } student_track select_students {
- select user_id as student_name, count(*) as counter,
- sum(end_time - start_time) as time_spent
- from lorsm_student_track
- where community_id = :community_id
- and course_id = :man_id
- and end_time NOTNULL
- group by user_id
- } {
+ db_multirow -extend { ims_md_id } student_track select_students2 {} {
set ims_md_id $man_id
}
@@ -176,11 +154,5 @@
set extra_where ""
}
- db_multirow object_views objects_views \
- "select v.*, i.item_title as title
- from view_aggregates v, ims_cp_items i, ims_cp_organizations o
- where i.ims_item_id = v.object_id
- and i.org_id = o.org_id
- and o.man_id = :man_id
- $extra_where"
+ db_multirow object_views objects_views2 {}
}
Index: openacs-4/packages/lorsm/www/admin/tracking/index.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/tracking/index.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/tracking/index.xql 12 Dec 2008 14:25:39 -0000 1.1
@@ -0,0 +1,49 @@
+
+
+
+
+
+ select user_id as student_name, start_time, end_time
+ from lorsm_student_track
+ where community_id = :community_id
+ and course_id = :man_id
+ and end_time NOTNULL
+ order by start_time desc
+
+
+
+
+
+ select v.*, i.item_title as title
+ from views_views v, ims_cp_items i, ims_cp_organizations o
+ where i.ims_item_id = v.object_id
+ and i.org_id = o.org_id
+ and o.man_id = :man_id
+ $extra_where
+
+
+
+
+
+ select v.*, i.item_title as title
+ from view_aggregates v, ims_cp_items i, ims_cp_organizations o
+ where i.ims_item_id = v.object_id
+ and i.org_id = o.org_id
+ and o.man_id = :man_id
+ $extra_where
+
+
+
+
+
+ select user_id as student_name, count(*) as counter,
+ sum(end_time - start_time) as time_spent
+ from lorsm_student_track
+ where community_id = :community_id
+ and course_id = :man_id
+ and end_time NOTNULL
+ group by user_id
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student-2.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student-2.tcl 17 Nov 2008 13:37:55 -0000 1.3
+++ openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student-2.tcl 12 Dec 2008 14:25:39 -0000 1.4
@@ -58,14 +58,7 @@
set extra_vars fs_local_package_id
-db_foreach organizations {
- select org.org_id, org.org_title as org_title, org.hasmetadata,
- tree_level(o.tree_sortkey) as indent
- from ims_cp_organizations org, acs_objects o
- where org.org_id = o.object_id
- and man_id = :man_id
- order by org_id
-} {
+db_foreach organizations {} {
set indent [expr $indent +1]
set missing_text "[_ lorsm.Nothing_here]"
@@ -85,20 +78,7 @@
set indent_items [lorsm::get_items_indent -org_id $org_id]
- db_foreach organization_item {
- select o.object_id,
- --repeat(' ', (tree_level(tree_sortkey) - :indent)* 2) as indent,
- i.ims_item_id, i.item_title as item_title, i.hasmetadata,
- i.ims_item_id as identifierref, i.type, i.org_id, m.fs_package_id,
- m.folder_id, m.course_name
- from acs_objects o, ims_cp_items i, ims_cp_manifests m
- where o.object_type like 'ims_item_object'
- and i.org_id = :org_id
- and o.object_id = i.ims_item_id
- and m.man_id = :man_id
- order by object_id
- --, tree_sortkey
- } {
+ db_foreach organization_item {} {
foreach indent_item $indent_items {
set indent_item_id [lindex $indent_item 0]
@@ -131,19 +111,7 @@
append orgs_list [string trim $table_item]
set item_table ""
- db_foreach student_activity {
- select *
- from lorsm_student_track lorsm, lorsm_cmi_core cmi, ims_cp_manifests manif, ims_cp_items imsitems
- where lorsm.community_id=:community_id
- and lorsm.track_id=cmi.track_id
- and lorsm.course_id=:man_id
- and manif.man_id=:man_id
- and cmi.man_id=:man_id
- and cmi.item_id=:identifierref
- and user_id=:user_id
- and imsitems.ims_item_id=cmi.item_id
- order by cmi.track_id asc
- } {
+ db_foreach student_activity {} {
set cut_start_time [string range $start_time 0 18]
set total_total_time [expr $total_time+$session_time]
set edit_url [export_vars -base "drill-student-singletrack" \
Index: openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student-2.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student-2.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student-2.xql 12 Dec 2008 14:25:39 -0000 1.1
@@ -0,0 +1,48 @@
+
+
+
+
+
+ select org.org_id, org.org_title as org_title, org.hasmetadata,
+ tree_level(o.tree_sortkey) as indent
+ from ims_cp_organizations org, acs_objects o
+ where org.org_id = o.object_id
+ and man_id = :man_id
+ order by org_id
+
+
+
+
+
+ select o.object_id,
+ --repeat(' ', (tree_level(tree_sortkey) - :indent)* 2) as indent,
+ i.ims_item_id, i.item_title as item_title, i.hasmetadata,
+ i.ims_item_id as identifierref, i.type, i.org_id, m.fs_package_id,
+ m.folder_id, m.course_name
+ from acs_objects o, ims_cp_items i, ims_cp_manifests m
+ where o.object_type like 'ims_item_object'
+ and i.org_id = :org_id
+ and o.object_id = i.ims_item_id
+ and m.man_id = :man_id
+ order by object_id
+ --, tree_sortkey
+
+
+
+
+
+ select *
+ from lorsm_student_track lorsm, lorsm_cmi_core cmi, ims_cp_manifests manif, ims_cp_items imsitems
+ where lorsm.community_id=:community_id
+ and lorsm.track_id=cmi.track_id
+ and lorsm.course_id=:man_id
+ and manif.man_id=:man_id
+ and cmi.man_id=:man_id
+ and cmi.item_id=:identifierref
+ and user_id=:user_id
+ and imsitems.ims_item_id=cmi.item_id
+ order by cmi.track_id asc
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student-singletrack.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student-singletrack.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student-singletrack.tcl 17 Nov 2008 13:37:55 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student-singletrack.tcl 12 Dec 2008 14:25:39 -0000 1.3
@@ -22,22 +22,13 @@
set man_name [lorsm::get_course_name -manifest_id $man_id]
-set thistrack [ db_1row thiscmitrack \
- "select *
- from lorsm_cmi_core
- where track_id=:track_id " ]
+set thistrack [ db_1row thiscmitrack {}]
set thistrack $track_id
set context [list "$classname,$man_name,$student_name,session_id: $track_id"]
-set numrows [ db_0or1row istherealready \
- "select min(lorsm.track_id) as mint from lorsm_cmi_core cmi, lorsm_student_track lorsm
- where lorsm.community_id=:community_id
- and lorsm.course_id=:man_id
- and user_id=:user_id
- and lorsm.track_id=cmi.track_id
- and lorsm.track_id>:track_id "]
+set numrows [ db_0or1row istherealready {}]
# seems numrows always 1 when doing an aggregate query
if { $mint == "" } {
set querypart ""
@@ -69,17 +60,8 @@
}
}
-db_multirow student_track single_student_track \
- "select *
- from lorsm_student_track lorsm, ims_cp_manifests manif
- where lorsm.community_id=$community_id
- and lorsm.course_id=$man_id
- and (lorsm.track_id>=$track_id $querypart)
- and manif.man_id=$man_id
- and user_id=$user_id
- order by lorsm.track_id asc" \
- {
+db_multirow student_track single_student_track {} {
set edit_url [export_vars -base "drill-student-singletrack" {track_id}]
set drill_url [export_vars -base "drill-student-singletrack" {track_id}]
- }
+}
Index: openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student-singletrack.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student-singletrack.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student-singletrack.xql 12 Dec 2008 14:25:39 -0000 1.1
@@ -0,0 +1,36 @@
+
+
+
+
+
+ select *
+ from lorsm_cmi_core
+ where track_id=:track_id
+
+
+
+
+
+ select min(lorsm.track_id) as mint from lorsm_cmi_core cmi, lorsm_student_track lorsm
+ where lorsm.community_id=:community_id
+ and lorsm.course_id=:man_id
+ and user_id=:user_id
+ and lorsm.track_id=cmi.track_id
+ and lorsm.track_id>:track_id
+
+
+
+
+
+ select *
+ from lorsm_student_track lorsm, ims_cp_manifests manif
+ where lorsm.community_id=$community_id
+ and lorsm.course_id=$man_id
+ and (lorsm.track_id>=$track_id $querypart)
+ and manif.man_id=$man_id
+ and user_id=$user_id
+ order by lorsm.track_id asc
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student.tcl 17 Nov 2008 13:37:55 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student.tcl 12 Dec 2008 14:25:39 -0000 1.3
@@ -51,18 +51,7 @@
db_multirow \
-extend { edit_url drill_url total_total_time cut_start_time } \
- student single_student {
- select *
- from lorsm_student_track lorsm, lorsm_cmi_core cmi, ims_cp_manifests manif, ims_cp_items imsitems
- where lorsm.community_id=:community_id
- and lorsm.track_id=cmi.track_id
- and lorsm.course_id=:man_id
- and manif.man_id=:man_id
- and cmi.man_id=:man_id
- and user_id=:user_id
- and imsitems.ims_item_id=cmi.item_id
- order by cmi.track_id asc
- } {
+ student single_student {} {
set cut_start_time [string range $start_time 0 18]
set total_total_time [expr $total_time+$session_time]
set edit_url [export_vars -base "drill-student-singletrack" {track_id}]
Index: openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/tracking-rte/drill-student.xql 12 Dec 2008 14:25:39 -0000 1.1
@@ -0,0 +1,19 @@
+
+
+
+
+
+ select *
+ from lorsm_student_track lorsm, lorsm_cmi_core cmi, ims_cp_manifests manif, ims_cp_items imsitems
+ where lorsm.community_id=:community_id
+ and lorsm.track_id=cmi.track_id
+ and lorsm.course_id=:man_id
+ and manif.man_id=:man_id
+ and cmi.man_id=:man_id
+ and user_id=:user_id
+ and imsitems.ims_item_id=cmi.item_id
+ order by cmi.track_id asc
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/tracking-rte/items.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/tracking-rte/items.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/tracking-rte/items.tcl 17 Nov 2008 13:37:55 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/tracking-rte/items.tcl 12 Dec 2008 14:25:39 -0000 1.3
@@ -33,20 +33,7 @@
db_multirow \
-extend { item_id items_title identifierref } \
- suborgs select_suborgs {
- select o.object_id, i.item_id,
- i.item_title as item_title,
- i.hasmetadata,
- i.item_id as identifierref,
- i.type, i.org_id, m.fs_package_id, m.folder_id,
- m.course_name
- from acs_objects o, ims_cp_items i, ims_cp_manifests m
- where o.object_type = 'ims_item'
- and i.org_id = :org_id
- and o.object_id = i.item_id
- and m.man_id = :man_id
- order by object_id, tree_sortkey
-} {
+ suborgs select_suborgs {} {
set item_id $item_id
}
Index: openacs-4/packages/lorsm/www/admin/tracking-rte/items.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/tracking-rte/items.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/tracking-rte/items.xql 12 Dec 2008 14:25:39 -0000 1.1
@@ -0,0 +1,21 @@
+
+
+
+
+
+ select o.object_id, i.item_id,
+ i.item_title as item_title,
+ i.hasmetadata,
+ i.item_id as identifierref,
+ i.type, i.org_id, m.fs_package_id, m.folder_id,
+ m.course_name
+ from acs_objects o, ims_cp_items i, ims_cp_manifests m
+ where o.object_type = 'ims_item'
+ and i.org_id = :org_id
+ and o.object_id = i.item_id
+ and m.man_id = :man_id
+ order by object_id, tree_sortkey
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/tracking-rte/list.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/tracking-rte/list.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/tracking-rte/list.tcl 17 Nov 2008 13:37:55 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/tracking-rte/list.tcl 12 Dec 2008 14:25:39 -0000 1.3
@@ -19,16 +19,7 @@
edit_url
drill_url
- } students which_students {
- select user_id, course_name, max(score_raw) as max_attained
- from ( select *
- from lorsm_student_track lorsm, lorsm_cmi_core cmi, ims_cp_manifests manif
- where lorsm.community_id=:community_id
- and lorsm.track_id=cmi.track_id
- and lorsm.course_id=:man_id
- and manif.man_id=:man_id) alltracks
- group by user_id, course_name
- } {
+ } students which_students {} {
set edit_url [export_vars -base "drill-student" {user_id}]
set drill_url [export_vars -base "drill-student" {user_id}]
}
Index: openacs-4/packages/lorsm/www/admin/tracking-rte/list.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/tracking-rte/list.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/tracking-rte/list.xql 12 Dec 2008 14:25:39 -0000 1.1
@@ -0,0 +1,17 @@
+
+
+
+
+
+ select user_id, course_name, max(score_raw) as max_attained
+ from ( select *
+ from lorsm_student_track lorsm, lorsm_cmi_core cmi, ims_cp_manifests manif
+ where lorsm.community_id=:community_id
+ and lorsm.track_id=cmi.track_id
+ and lorsm.course_id=:man_id
+ and manif.man_id=:man_id) alltracks
+ group by user_id, course_name
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/tracking-rte/orgs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/tracking-rte/orgs.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/tracking-rte/orgs.tcl 17 Nov 2008 13:37:55 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/tracking-rte/orgs.tcl 12 Dec 2008 14:25:39 -0000 1.3
@@ -25,29 +25,9 @@
# documentation for further details.
-db_multirow orgs select_orgs {
- select org.org_id,
- org.org_title as org_title, org.hasmetadata,
- tree_level(o.tree_sortkey) as indent
- from ims_cp_organizations org, acs_objects o
- where org.org_id = o.object_id
- and man_id = :man_id
- order by org_id
-} {
+db_multirow orgs select_orgs {} {
set org_title $org_title
}
-db_multirow suborgs select_suborgs {
- select o.object_id,
- repeat(' ', (tree_level(tree_sortkey) - :indent)* 2) as indent,
- i.item_id,
- i.item_title as item_title, i.hasmetadata,
- i.item_id as identifierref, i.type, i.org_id, m.fs_package_id, m.folder_id, m.course_name
- from acs_objects o, ims_cp_items i, ims_cp_manifests m
- where o.object_type = 'ims_item'
- and i.org_id = :org_id
- and o.object_id = i.item_id
- and m.man_id = :man_id
- order by object_id, tree_sortkey
-}
+db_multirow suborgs select_suborgs {}
Index: openacs-4/packages/lorsm/www/admin/tracking-rte/orgs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/tracking-rte/orgs.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/tracking-rte/orgs.xql 12 Dec 2008 14:25:39 -0000 1.1
@@ -0,0 +1,32 @@
+
+
+
+
+
+ select org.org_id,
+ org.org_title as org_title, org.hasmetadata,
+ tree_level(o.tree_sortkey) as indent
+ from ims_cp_organizations org, acs_objects o
+ where org.org_id = o.object_id
+ and man_id = :man_id
+ order by org_id
+
+
+
+
+
+ select o.object_id,
+ repeat(' ', (tree_level(tree_sortkey) - :indent)* 2) as indent,
+ i.item_id,
+ i.item_title as item_title, i.hasmetadata,
+ i.item_id as identifierref, i.type, i.org_id, m.fs_package_id, m.folder_id, m.course_name
+ from acs_objects o, ims_cp_items i, ims_cp_manifests m
+ where o.object_type = 'ims_item'
+ and i.org_id = :org_id
+ and o.object_id = i.item_id
+ and m.man_id = :man_id
+ order by object_id, tree_sortkey
+
+
+
+
Index: openacs-4/packages/lorsm/www/admin/tracking-rte/toc.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/tracking-rte/toc.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lorsm/www/admin/tracking-rte/toc.tcl 17 Nov 2008 13:37:55 -0000 1.2
+++ openacs-4/packages/lorsm/www/admin/tracking-rte/toc.tcl 12 Dec 2008 14:25:39 -0000 1.3
@@ -38,14 +38,7 @@
set extra_vars fs_local_package_id
-db_foreach organizations {
- select org.org_id, org.org_title as org_title, org.hasmetadata,
- tree_level(o.tree_sortkey) as indent
- from ims_cp_organizations org, acs_objects o
- where org.org_id = o.object_id
- and man_id = :man_id
- order by org_id
-} {
+db_foreach organizations {} {
set indent [expr $indent +1]
set missing_text "[_ lorsm.Nothing_here]"
@@ -61,19 +54,7 @@
append orgs_list "Organization: $org_title ($org_id)
|
"
- db_foreach organization_item {
- select o.object_id,
- repeat(' ', (tree_level(tree_sortkey) - :indent)* 2) as indent,
- i.item_id, i.item_title as item_title, i.hasmetadata,
- i.item_id as identifierref,
- i.type, i.org_id, m.fs_package_id, m.folder_id, m.course_name
- from acs_objects o, ims_cp_items i, ims_cp_manifests m
- where o.object_type = 'ims_item'
- and i.org_id = :org_id
- and o.object_id = i.item_id
- and m.man_id = :man_id
- order by object_id, tree_sortkey
- } {
+ db_foreach organization_item {} {
if { [empty_string_p $identifierref] } {
set table_item "Item: $item_id $indent AAA $item_title"
} else {
@@ -86,19 +67,7 @@
append orgs_list [string trim $table_item]
set item_table ""
- db_foreach student_activity {
- select *
- from lorsm_student_track lorsm, lorsm_cmi_core cmi, ims_cp_manifests manif, ims_cp_items imsitems
- where lorsm.community_id=:community_id
- and lorsm.track_id=cmi.track_id
- and lorsm.course_id=:man_id
- and manif.man_id=:man_id
- and cmi.man_id=:man_id
- and cmi.item_id=:identifierref
- and user_id=:user_id
- and imsitems.ims_item_id=cmi.item_id
- order by cmi.track_id asc
- } {
+ db_foreach student_activity {} {
set cut_start_time [string range $start_time 0 18]
set total_total_time [expr $total_time+$session_time]
set edit_url [export_vars -base "drill-student-singletrack" {track_id}]
Index: openacs-4/packages/lorsm/www/admin/tracking-rte/toc.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/tracking-rte/toc.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lorsm/www/admin/tracking-rte/toc.xql 12 Dec 2008 14:25:39 -0000 1.1
@@ -0,0 +1,47 @@
+
+
+
+
+
+ select org.org_id, org.org_title as org_title, org.hasmetadata,
+ tree_level(o.tree_sortkey) as indent
+ from ims_cp_organizations org, acs_objects o
+ where org.org_id = o.object_id
+ and man_id = :man_id
+ order by org_id
+
+
+
+
+
+ select o.object_id,
+ repeat(' ', (tree_level(tree_sortkey) - :indent)* 2) as indent,
+ i.item_id, i.item_title as item_title, i.hasmetadata,
+ i.item_id as identifierref,
+ i.type, i.org_id, m.fs_package_id, m.folder_id, m.course_name
+ from acs_objects o, ims_cp_items i, ims_cp_manifests m
+ where o.object_type = 'ims_item'
+ and i.org_id = :org_id
+ and o.object_id = i.item_id
+ and m.man_id = :man_id
+ order by object_id, tree_sortkey
+
+
+
+
+
+ select *
+ from lorsm_student_track lorsm, lorsm_cmi_core cmi, ims_cp_manifests manif, ims_cp_items imsitems
+ where lorsm.community_id=:community_id
+ and lorsm.track_id=cmi.track_id
+ and lorsm.course_id=:man_id
+ and manif.man_id=:man_id
+ and cmi.man_id=:man_id
+ and cmi.item_id=:identifierref
+ and user_id=:user_id
+ and imsitems.ims_item_id=cmi.item_id
+ order by cmi.track_id asc
+
+
+
+
Index: openacs-4/packages/lorsm/www/delivery/applet.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/applet.adp,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/lorsm/www/delivery/applet.adp 17 Nov 2008 13:38:34 -0000 1.6
+++ openacs-4/packages/lorsm/www/delivery/applet.adp 12 Dec 2008 14:25:39 -0000 1.7
@@ -6,21 +6,8 @@
exit_url="exit?man_id=@man_id@&track_id=@track_id@&return_url=@return_url@";
return_url="@return_url@";
main_body_url="body?man_id=@man_id@";
- content_url="
-
- @body_url;noquote@
-
-
- body?man_id=@man_id@
- ";
- menu_url="@menu_type@?man_id=@man_id@&return_url=@return_url@
-
- &ims_id=@ims_id@
-
- &track_id=@track_id@
-
- &menu_off=@menu_off@
- ";
+ content_url="@body_url;noquote@body?man_id=@man_id@";
+ menu_url="@menu_type@?man_id=@man_id@&return_url=@return_url@&ims_id=@ims_id@&track_id=@track_id@&menu_off=@menu_off@";
record_view_url="record-view?man_id=@man_id@&item_id=@item_id@";
@@ -55,7 +42,5 @@
-
-
Index: openacs-4/packages/lorsm/www/delivery/applet.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/applet.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/lorsm/www/delivery/applet.tcl 17 Nov 2008 13:38:34 -0000 1.4
+++ openacs-4/packages/lorsm/www/delivery/applet.tcl 12 Dec 2008 14:25:39 -0000 1.5
@@ -15,13 +15,15 @@
set menu_type [ad_get_client_property lorsm menu_type]
set debuglevel [ad_get_client_property lorsm debuglevel]
+
if {$debuglevel > 0} {
set app_width 150
set app_height 150
} else {
set app_width 0
set app_height 0
}
+
set random [clock seconds]
set ses_renew [ad_parameter \
-package_id [ad_acs_kernel_id] \
Index: openacs-4/packages/lorsm/www/delivery/blank-no-javascript.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/blank-no-javascript.html,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lorsm/www/delivery/blank-no-javascript.html 17 Nov 2008 13:38:34 -0000 1.3
+++ openacs-4/packages/lorsm/www/delivery/blank-no-javascript.html 12 Dec 2008 14:25:39 -0000 1.4
@@ -4,6 +4,7 @@
|