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

Quizzes with negative grades

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Quiz
    • Labels:
      None
    • Environment:
      All
    • Database:
      Any
    • URL:
      moodle.org
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      In the multichoice question types it seems that negative grades (for example -50%) don't work. If your answer is wrong the result is allways 0.

      I searched in the code, and it seems that the problem is in the function grade_responses of the file questiontype.php for multichoice question types.

      It seems that this line must be redone to allow negative grades:

      $state->raw_grade = min(max((float) $state->raw_grade,

      0.0), 1.0) * $question->maxgrad

      http://moodle.cvs.sourceforge.net/moodle/moodle/question/type/multichoice/questiontype.php?view=log

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              imported Imported
              Tester:
              Nobody
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: