Changeset - 68253df307c7
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 14 years ago 2011-10-20 08:57:06
ohnobinki@ohnopublishing.net
Fix bug #119, regression caused by 63da13bd33d5. Previous and Next buttons for schedules with large numbers of permutations works.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
inc/class.schedule.php
Show inline comments
 
@@ -596,53 +596,53 @@ class Schedule
 
	if (!empty($_REQUEST['print']))
 
	  {
 
	    $print = $_REQUEST['print'];
 
	    if ($print !== 'all')
 
	      {
 
		for ($i = $first_permutation; $i <= $last_permutation; $i ++)
 
		  $suppressed_permutations[$i] = TRUE;
 
		foreach (explode(',', $print) as $item_to_print)
 
		  unset($suppressed_permutations[((int)$item_to_print) - 1]);
 
	      }
 
	  }
 

	
 
	for($nn = $first_permutation + 1; $nn <= $last_permutation; $nn++)
 
	  {
 
	    if (!empty($suppressed_permutations[$nn - 1]))
 
	      continue;
 
	    echo  "<li><a href=\"#tabs-" . $nn . "\">&nbsp;" . $nn . "&nbsp;</a></li>\n";
 
	  }
 
			
 
	echo "    </ul></div>\n  \n";
 

	
 
	echo "    <div id=\"pagers\">\n";
 
	/* Previous button */
 
	if ($page > 0)
 
	  echo '      <div id="pager-previous" class="pager left"><a href="' . htmlentities($this->my_url($this->id, $page - 1)) . '">&laquo; Previous</a></div>' . "\n";
 
	  echo '      <div id="pager-previous" class="pager left"><a href="' . htmlentities($this->my_url($page - 1)) . '">&laquo; Previous</a></div>' . "\n";
 

	
 
	/* Next button */
 
	if ($page + 1 < $npages)
 
	  echo '      <div id="pager-next" class="pager right"><a href="' . htmlentities($this->my_url($this->id, $page + 1)) . '">Next &raquo;</a></div>' . "\n";
 
	  echo '      <div id="pager-next" class="pager right"><a href="' . htmlentities($this->my_url($page + 1)) . '">Next &raquo;</a></div>' . "\n";
 
	echo "    </div> <!-- id=\"pagers\" -->\n";
 

	
 

	
 
	echo "  <div class=\"scroller\">\n"
 
	  . "    <div class=\"scontent\">\n";
 
		
 
	for($i = $first_permutation; $i < $last_permutation; $i++)
 
	  {
 
	    /*
 
	     * Skip suppressed permutations, such as when displaying a
 
	     * page for printing a particular permutation.
 
	     */
 
	    if (!empty($suppressed_permutations[$i]))
 
	      continue;
 

	
 
	    /*
 
	     * Store a JSON list of courses, each with only the one
 
	     * section rendered in this permutation. This is used for
 
	     * the ``Registration Numbers'' dialog which noramlly
 
	     * shows users course synonyms.
 
	     */
 
	    $permutation_courses = array();
 

	
 
	     echo  '      <div class="section" id="tabs-' . ($i+1) . "\">\n";
0 comments (0 inline, 0 general)