Index: openacs-4/packages/lorsm/www/delivery-no-index/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery-no-index/index.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lorsm/www/delivery-no-index/index.tcl 26 Apr 2005 08:56:24 -0000 1.2 +++ openacs-4/packages/lorsm/www/delivery-no-index/index.tcl 17 May 2005 21:48:05 -0000 1.3 @@ -10,6 +10,7 @@ @cvs-id $Id$ } { man_id:integer,notnull + ims_id:integer,notnull,optional } -properties { } -validate { } -errors { @@ -18,6 +19,12 @@ set user_id [ad_conn user_id] set community_id [dotlrn_community::get_community_id] +if { [info exists ims_id] } { + set item_id $ims_id + + set body_url [export_vars -base "record-view" -url {item_id man_id}] +} + # Get the course name if {[db_0or1row manifest " select @@ -38,20 +45,20 @@ } db_0or1row get_last_viewed { - select item_id as imsitem_id, coalesce(acs_object__name(object_id),'Item '||object_id) as last_page_viewed + select ims_item_id as imsitem_id, coalesce(acs_object__name(object_id),'Item '||object_id) as last_page_viewed from views v, ims_cp_items i, ims_cp_organizations o where v.viewer_id = :user_id - and v.object_id = i.item_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 } set all_items [db_list get_total_items { - select i.item_id + select i.ims_item_id from ims_cp_items i, ims_cp_organizations o where o.man_id = :man_id