Index: openacs-4/packages/lorsm/www/delivery/delivery-progress-bar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/delivery-progress-bar.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lorsm/www/delivery/delivery-progress-bar.tcl 11 Jul 2006 18:45:24 -0000 1.2 +++ openacs-4/packages/lorsm/www/delivery/delivery-progress-bar.tcl 12 Jul 2006 07:06:13 -0000 1.3 @@ -53,15 +53,21 @@ set first_item_id [lindex $item_list 0] set first_item_url "" -if {$item_id eq ""} { - set item_id $first_item_id - ad_returnredirect [export_vars -base ${lorsm_url}/record-view {man_id item_id}] - ad_script_abort -} +#if {$item_id eq ""} { +# set item_id $first_item_id +# ad_returnredirect [export_vars -base ${lorsm_url}/record-view {man_id item_id}] +# ad_script_abort +#} #set curr_index [expr [lsearch -exact $item_list $last_item_viewed]] set curr_index [expr [lsearch -exact $item_list $item_id]] -if {$curr_index < 1} {set curr_index 0} +if {$curr_index < 0} { + # start course + # we want the next_url to be the first item + set curr_index -1 + set __include "/packages/lorsm/lib/start" +} + set prev_item_id [lindex $item_list [expr $curr_index - 1]] set next_item_id [lindex $item_list [expr $curr_index + 1]] set prev_url "" @@ -79,7 +85,9 @@ } else { if { $next_item_id eq "" } { set next_url [dotlrn_community::get_community_url [dotlrn_community::get_community_id]] + set progress_index "" } set show_next 1 -} \ No newline at end of file +} + Index: openacs-4/packages/lorsm/www/delivery/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/index.vuh,v diff -u -r1.5 -r1.6 --- openacs-4/packages/lorsm/www/delivery/index.vuh 11 Jul 2006 19:47:04 -0000 1.5 +++ openacs-4/packages/lorsm/www/delivery/index.vuh 12 Jul 2006 07:06:13 -0000 1.6 @@ -42,7 +42,7 @@ set prev_url [export_vars -base "${delivery_url}/record-view" -url {{item_id $prev_item_id} man_id}] set next_url [export_vars -base "${delivery_url}/record-view" -url {{item_id $next_item_id} man_id}] if {$next_item_id eq ""} { - set next_url [export_vars -base ${lorsm_url}] + set next_url ${delivery_url}/end } set form [rp_getform] ns_set delkey $form next_url @@ -85,7 +85,10 @@ rp_internal_redirect /packages/lorsm/www/delivery/${folder_name} ad_script_abort } - default { - + end { + rp_form_put __include /packages/lorsm/lib/end + rp_internal_redirect /packages/lorsm/www/delivery/${folder_name} } + default { + } }