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

Quiz calculating incorrectly when decimal item marks used.



    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.4
    • 1.9.6
    • Quiz
    • None
    • All
    • Any


      Seen similar bugs listed in the tracker but none quite nail it, so please excuse (and merge) if I have missed the point and duplicated.

      Having issues where Moodle will accept decimal values for items in a quiz, but then rounds them down AFTER students have attempted.

      To replicate:

      1. Create quiz with two (or more/less) questions,
      2. In the quiz edit screen, make the item values for each question 1.5 as per the attached image - note that Moodle doesn't stop me doing this,
      3. Open the quiz,
      4. Student gets both questions right,
      5. Student is shown 2/3 as their final mark because Moodle has rounded down the marks to 1 and added them together, without rounding down the total.

      If I mess around re-setting the item marks and doing a regrade then it does correct itself, but really there should either be a trap to stop me entering decimals (note that I can also add decimal values as the default grade in the individual question, which is also permitted and subsequently rounded down), or it should just allow decimals and be done with it. Either one would be good, but the point at the moment is that it lets the user enter data with no errors until after (as happened with an irate customer this morning) the students have completed the quiz and found out that they have gotten less than they deserved.




            timhunt Tim Hunt
            drex Mark Drechsler
            Sam Hemelryk Sam Hemelryk
            Tim Hunt, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            0 Vote for this issue
            0 Start watching this issue