Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-38765

quiz: When there is no attempt left, it shows the "No more attempts are allowed" message twice

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.2, 2.4.3
    • Fix Version/s: 2.4.6, 2.5.2
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      Hide

      1. Create a quiz with only one attempt allowed.

      2. Attempt the quiz as a student.

      3. After you finish review, on the view page, you should only see the message "No more attempt allowed" once, just above the back to course button.

      Show
      1. Create a quiz with only one attempt allowed. 2. Attempt the quiz as a student. 3. After you finish review, on the view page, you should only see the message "No more attempt allowed" once, just above the back to course button.
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      When there is no attempt left, it shows the "No more attempts are allowed" message twice
      1) the message comes form the function:

      public function view_best_score($viewobj) {
      $output = '';
      // Print information about the student's best score for this quiz if possible.
      if (!$viewobj->moreattempts)

      { $output .= $this->heading(get_string('nomoreattempts', 'quiz')); }

      return $output;
      }

      in mod/quiz/renderer.php which is called in view_page in the same class/ same file.

      The same message is generated from prevent_new_attempt() method in quizaccess_numattempts class (mod/quiz/accessrule/numattempts/rule.php)

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Sep/13