Index: openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl,v diff -u -r1.70 -r1.71 --- openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl 24 Feb 2006 03:49:27 -0000 1.70 +++ openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl 24 Feb 2006 18:32:24 -0000 1.71 @@ -592,9 +592,9 @@ set calendar_id [dotlrn_calendar::get_group_calendar_id -community_id $community_id] lappend calendar_id_list $calendar_id if { $all_sessions_p && $calendar_id == $active_calendar_id } { - set sessions [dotlrn_ecommerce::section::sessions $calendar_id] + set sessions [dotlrn_ecommerce::section::sessions -anchor $course_key $calendar_id] } else { - set sessions [util_memoize [list dotlrn_ecommerce::section::sessions $calendar_id] $memoize_max_age] + set sessions [util_memoize [list dotlrn_ecommerce::section::sessions -anchor $course_key $calendar_id] $memoize_max_age] } set instructors [util_memoize [list dotlrn_ecommerce::section::instructors $community_id $__instructors] $memoize_max_age] Index: openacs-4/packages/dotlrn-ecommerce/tcl/section-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/tcl/section-procs.tcl,v diff -u -r1.36 -r1.37 --- openacs-4/packages/dotlrn-ecommerce/tcl/section-procs.tcl 24 Feb 2006 03:49:26 -0000 1.36 +++ openacs-4/packages/dotlrn-ecommerce/tcl/section-procs.tcl 24 Feb 2006 18:32:24 -0000 1.37 @@ -72,6 +72,7 @@ } ad_proc -public dotlrn_ecommerce::section::sessions { + -anchor calendar_id } { Return sessions @@ -141,20 +142,32 @@ set form [rp_getform] set all_p_param [ns_set get $form all_sessions_p] set active_calendar_id [ns_set get $form active_calendar_id] + ns_set delkey $form all_sessions_p + ns_set delkey $form active_calendar_id if { $all_p_param eq "" || $active_calendar_id != $calendar_id } { # Just return 3 with more link if { [llength $text_sessions] > 3 } { set sessions [join [lrange $text_sessions 0 2] ",
"] - ns_set delkey $form all_sessions_p - ns_set delkey $form active_calendar_id - append sessions "
[expr [llength $text_sessions]-3] more" + if { [exists_and_not_null anchor] } { + append sessions "
[expr [llength $text_sessions]-3] more" + } else { + append sessions "
[expr [llength $text_sessions]-3] more" + } + return $sessions } } set sessions [join $text_sessions ",
"] - + if { [llength $text_sessions] } { + if { [exists_and_not_null anchor] } { + append sessions "
less" + } else { + append sessions "
less" + } + } + return $sessions }