Fixing exercise pagination for simple questions

skala
Julio Montoya 12 years ago
parent e0d7afc62a
commit b526b0889d
  1. 5
      main/exercice/exercise.class.php
  2. 2
      main/inc/lib/display.lib.php

@ -5301,14 +5301,15 @@ class Exercise
{
$mediaQuestions = $this->getMediaList();
$html = '<div class="exercise_pagination pagination pagination-mini "><ul>';
$html = '<div class="exercise_pagination pagination pagination-mini"><ul>';
$counter = 0;
foreach ($questionList as $questionId) {
$isCurrent = $currentQuestion == ($counter + 1) ? true : false;
if (isset($mediaQuestions) && isset($mediaQuestions[$questionId])) {
$html .= Display::progressPaginationBar($mediaQuestions[$questionId], $currentQuestion, $conditions, $link, $counter + 1, true, true, false, $isCurrent);
} else {
$html .= Display::parsePaginationItem($questionId, $isCurrent, $conditions, $link, $counter+1);
$html .= Display::parsePaginationItem($questionId, $isCurrent, $conditions, $link, $counter);
}
$counter++;
}

@ -1795,7 +1795,7 @@ class Display
* @param $fixValue
* @return string
*/
static function parsePaginationItem($itemId, $isCurrent, $conditions, $link, $nextValue, $isMedia = false, $localCounter = null, $fixedValue = null)
static function parsePaginationItem($itemId, $isCurrent, $conditions, $link, $nextValue = 0, $isMedia = false, $localCounter = null, $fixedValue = null)
{
$defaultClass = "before";
$class = $defaultClass;

Loading…
Cancel
Save