Index: openacs-4/packages/imsld/catalog/imsld.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/catalog/imsld.en_US.ISO-8859-1.xml,v diff -u -r1.4 -r1.5 --- openacs-4/packages/imsld/catalog/imsld.en_US.ISO-8859-1.xml 6 Oct 2005 14:15:11 -0000 1.4 +++ openacs-4/packages/imsld/catalog/imsld.en_US.ISO-8859-1.xml 6 Oct 2005 15:39:46 -0000 1.5 @@ -160,7 +160,7 @@ There was an error trying to delete the dir $dir. Time Limit Identifier <ul> Completed Activities <br /> - <ul> Next Activity: %activity_name% <br /> + <ul> %first_or_next% Activity: %activity_name% <br /> Uploading and processing your course, please wait... Valid types are learning, support and structure Warning: More than one learning object in environment %identifie%. Just one used (the first one) Index: openacs-4/packages/imsld/lib/imsld-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/lib/imsld-chunk.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/imsld/lib/imsld-chunk.adp 6 Oct 2005 13:04:23 -0000 1.2 +++ openacs-4/packages/imsld/lib/imsld-chunk.adp 6 Oct 2005 15:39:47 -0000 1.3 @@ -1,3 +1,3 @@ -@activity_name@ +@activity_name;noquote@ @completed_activities;noquote@ @activity_urls;noquote@ Index: openacs-4/packages/imsld/tcl/imsld-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/tcl/imsld-procs.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/imsld/tcl/imsld-procs.tcl 5 Oct 2005 15:33:25 -0000 1.6 +++ openacs-4/packages/imsld/tcl/imsld-procs.tcl 6 Oct 2005 15:39:47 -0000 1.7 @@ -151,7 +151,7 @@ ) } - ad_returnredirect "[ad_url]${return_url}" + ad_returnredirect "${return_url}" } ad_proc -public imsld::next_activity { @@ -180,6 +180,7 @@ and content_revision__is_live(imsld_id) = 't' } set completed_activities "" + set first_p 0 set user_id [expr { [empty_string_p $user_id] ? [ad_conn user_id] : $user_id }] if { ![db_string get_last_entry { select count(*) @@ -188,6 +189,7 @@ and imsld_id = :imsld_id }] } { # special case: the user has no entry, the ims-ld hasn't started yet for that user + set first_p 1 db_1row get_first_role_part { select irp.role_part_id from cr_items cr0, cr_items cr1, cr_items cr2, imsld_methods im, imsld_plays ip, imsld_acts ia, imsld_role_parts irp @@ -308,7 +310,7 @@ and rp.sort_order = (select min(irp2.sort_order) from imsld_role_parts irp2 where irp2.act_id = ia.item_id) }] } { # there is no more to search, we reached the end of the unit of learning - return [list { "[_ imsld.finished]" } {} "$completed_activities"] + return [list "[_ imsld.finished]" {} "$completed_activities"] } } } @@ -337,6 +339,7 @@ # !!! HERE IS WHERE WE DECIDE IF WE CALL A DOTLRN SERVICE TO SERVE THE ACTIVITY, DEPENDING ON THE IDENTIFIER ??? # BY DEFAULT GET THE RESOURCE AND DISPLAY IT FROM THE FILE STORAGE set activity_name [expr { [empty_string_p $title] ? $identifier : $title }] + set first_or_next [expr { $first_p ? "First" : "Next"}] set activity_urls "[_ imsld.lt_ul_Next_Activity_acti]" db_foreach la_associated_files { select cpf.imsld_file_id, @@ -371,8 +374,8 @@ from fs_objects fs where fs.live_revision = :imsld_file_id }] - set file_url "[ad_url][apm_package_url_from_id $fs_package_id]view/${file_url}" - append activity_urls "
  • $file_name \[ finish \]
  • " + set file_url "[apm_package_url_from_id $fs_package_id]view/${file_url}" + append activity_urls "
  • $file_name \[ finish \]
  • " } if_no_rows { # the activity doesn't have any resource associated, display the default page append activity_urls "[_ imsld.lt_li_desc_no_file_assoc]"