Moodle
  1. Moodle
  2. MDL-40195

Assignment quick grading stores only 1 decimal place

    Details

    • Testing Instructions:
      Hide

      */ In a mod_assign activity with at least 1 user enrolled in the course, view the assignment.
      */ Go to enter/view grades inside the assignment.
      */ Enter quick grading mode (checkbox at the bottom)
      */ Enter a grade to 2 places (i.e. 12.34)
      */ Click the save button below the table.
      */ Refresh the page and verify the grade in the textbox is still 12.34, NOT 12.3.

      Show
      */ In a mod_assign activity with at least 1 user enrolled in the course, view the assignment. */ Go to enter/view grades inside the assignment. */ Enter quick grading mode (checkbox at the bottom) */ Enter a grade to 2 places (i.e. 12.34) */ Click the save button below the table. */ Refresh the page and verify the grade in the textbox is still 12.34, NOT 12.3.
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Apologies if this has already been reported - I searched and found nothing.

      When grading assignments and using quick grading to enter grades, the teacher view will only capture and hold decimals to 1 place, regardless of what the course and site default decimal settings are.

      The student's assignment view, user grade report, as well as the instructor's grader report view, all show the correct decimal number for the grade.

      Steps to replicate:
      -Set 'overall decimal places' to 2 in course grade settings (if site default is not already 2)

      • Add basic assignment (not assignment 2.2 type) without advanced grading
      • have student make a submission
      • enter 'View/grade all submissions' screen
      • turn on quick grading
      • save a grade with more than 1 decimal
      • click 'save all quick grading changes'

      Expected result: Grade saved to course decimal place settings

      What actually happens: Grade is saved to only 1 decimal place

      Screenshots attached.

        Gliffy Diagrams

          Activity

          Hide
          Adam Olley added a comment -

          I've updated this item with links to a patch on github. The rest of mod_assign formats it's grades to 2 decimal places, so thats what I've done here (unlike mod_quiz, mod_assign doesn't have a decimalplaces setting).

          Show
          Adam Olley added a comment - I've updated this item with links to a patch on github. The rest of mod_assign formats it's grades to 2 decimal places, so thats what I've done here (unlike mod_quiz, mod_assign doesn't have a decimalplaces setting).
          Hide
          Jason Fowler added a comment -

          Code looks good Adam, and it should make it compatible with the rest of the grading. Thanks for the patch, pushing for integration now.

          Show
          Jason Fowler added a comment - Code looks good Adam, and it should make it compatible with the rest of the grading. Thanks for the patch, pushing for integration now.
          Hide
          Damyon Wiese added a comment -

          Thanks Adam,

          This looks correct to me and I confirmed that it doesn't affect the detection of modified grades when the page is saved.

          Integrated to 24, 25 and master.

          Show
          Damyon Wiese added a comment - Thanks Adam, This looks correct to me and I confirmed that it doesn't affect the detection of modified grades when the page is saved. Integrated to 24, 25 and master.
          Hide
          Ankit Agarwal added a comment -

          Tested on 24, 25, master. Works as described.

          Show
          Ankit Agarwal added a comment - Tested on 24, 25, master. Works as described.
          Hide
          Damyon Wiese added a comment -

          Moodle has many old functions,
          And although they cause no malfunction,
          There comes a day,
          When they get deprecated away,
          And get and put on the list for expulsion.

          Thanks for all the reports/testing/fixes this week. This issue has been sent upstream.

          Show
          Damyon Wiese added a comment - Moodle has many old functions, And although they cause no malfunction, There comes a day, When they get deprecated away, And get and put on the list for expulsion. Thanks for all the reports/testing/fixes this week. This issue has been sent upstream.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: