Moodle
  1. Moodle
  2. MDL-28457

Grades validation fails for CalculatedMultichoice questions

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.1
    • Fix Version/s: None
    • Component/s: Questions
    • Labels:
    • Environment:
      Kubuntu 11.04
    • Database:
      PostgreSQL
    • Testing Instructions:
      Hide

      'Create New Question'
      choose Calculated multichoice

      Question name: Test
      Question text: What is 3 *

      {x}?
      One or multiple answers: One answer Only

      Choice 1:
      {={x}

      +..}...:

      {x}
      Grade None

      Choice 2:
      {={x}

      +..}...:

      {x}*1
      Grade None

      Choice 3:
      {={x}

      +..}...:

      {x}*2
      Grade None

      Choice 4:
      {={x}

      +..}...:

      {x}+3
      Grade None

      Choice 5:
      {={x}

      +..}...:

      {x}*3
      Grade 100%

      Save Changes

      Question refuses to be save. Error message in
      Choice 1 says "One of the choices should be 100%, so that it is
      possible to get a full grade for this question."

      Change One or Multiple Answers to Multiple Answers allowed

      Add

      Choice 6:
      {={x}

      +..}...:

      {x}+{x}

      Grade None

      Save Changes

      Now the error message is "The positive grades you have chosen do not add up to 100% Instead, they add up to 0%"

      Show
      'Create New Question' choose Calculated multichoice Question name: Test Question text: What is 3 * {x}? One or multiple answers: One answer Only Choice 1: {={x} +..}...: {x} Grade None Choice 2: {={x} +..}...: {x}*1 Grade None Choice 3: {={x} +..}...: {x}*2 Grade None Choice 4: {={x} +..}...: {x}+3 Grade None Choice 5: {={x} +..}...: {x}*3 Grade 100% Save Changes Question refuses to be save. Error message in Choice 1 says "One of the choices should be 100%, so that it is possible to get a full grade for this question." Change One or Multiple Answers to Multiple Answers allowed Add Choice 6: {={x} +..}...: {x}+{x} Grade None Save Changes Now the error message is "The positive grades you have chosen do not add up to 100% Instead, they add up to 0%"
    • Affected Branches:
      MOODLE_21_STABLE
    • Rank:
      18109

      Description

      The sanity checks for grades on a calculated multichoice question sometimes fail. If you have a number of choices, with exactly one choice marked as 100% grade and all the others as None, and have selected "One Answer Only", you can get the error message: "One of the choices should be 100%, so that it is possible to get a full grade for this question."

      On the other hand, if you select "Multiple Answers Allowed", you can get: "The positive grades you have chosen do not add up to 100% Instead, they add up to 0%". Likewise, if you have exactly 2 choices at 50%.

      Strangely, this only seems to happen when you have a larger number of choices (5 or 6), but that doesn't seem to make sense to me in light of what I think the fix could be.

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved: