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

Cannot start attempt at quiz if no graded questions are present

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.1.6, 2.2.3
    • Component/s: Quiz
    • Labels:
    • Environment:
      Centos 5.7 and 6.2 x86_64, Postgresql 8.4 and 9.1, php 5.3, apache 2.2
    • Database:
      PostgreSQL
    • Testing Instructions:
      Hide

      1. Create a quiz.
      2. On the edit quiz page, add one question; Ensure Maximum grade is non-zero; and set the grade for the question you added to zero.
      3. Click the preview link in the settings block to try starting an attempt.
      4. Look at the resulting error message, and see if you think it makes sense.

      Show
      1. Create a quiz. 2. On the edit quiz page, add one question; Ensure Maximum grade is non-zero; and set the grade for the question you added to zero. 3. Click the preview link in the settings block to try starting an attempt. 4. Look at the resulting error message, and see if you think it makes sense.
    • Workaround:
      Hide
      • Set grades to the questions
      • Hide the categories in the gradebook

      This seems to come closest to the "ungraded" quiz from moodle 2.1.1 as implemented by our instructors. Any information regarding better ways to achieve the desired effect would be highly appreciated

      Show
      Set grades to the questions Hide the categories in the gradebook This seems to come closest to the "ungraded" quiz from moodle 2.1.1 as implemented by our instructors. Any information regarding better ways to achieve the desired effect would be highly appreciated
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Description of the problem
      -------------------------------------------
      After upgrading from moodle 2.1.1 to 2.2.1+ (Build: 20120213), students attempting to solve a quiz where all questions are graded with 0 points are faced with an error message:

      "Cannot start an attempt at this quiz. The quiz is supposed to be graded but there are no questions in the quiz that are worth any marks"
      Stack trace:
      line 73 of /mod/quiz/locallib.php: moodle_exception thrown
      line 148 of /mod/quiz/startattempt.php: call to quiz_create_attempt()

      The quiz in question is used for giving the students opportunities to self-test their progress and should not be graded. It seems that prior to the upgrade, this could be achieved by allocating 0 points for each question.

      Exprected behaviour
      -------------------------------------------
      It would be nice to either provide an option to keep the quiz ungraded or to warn the administrator during upgrade about this change in behaviour.

      Note:
      -------------------------------------------
      We upgraded directly from 2.1.1 to 2.2.1+. It seems that the Question Engine update was done while performing this update, because a backup from before the update lists
      "This appears to be a site that has not yet been upgraded to include the new question engine."

      while the same helper plugin returns for the 2.2.1+ site
      "This appears to be a site that has been upgraded to include the new question engine."

      (sorry if this is common knowledge)

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/May/12