Moodle
  1. Moodle
  2. MDL-33563

Rubric grades could be posted in decimal format

    Details

    • Testing Instructions:
      Hide
      1. Create course with both new and old Assignment modules using advanced grading method "Rubrics", and also new and old Assignment modules using advanced grading method "Marking guide".
      2. In each module create rubric or guide so it uses different grading range than module. For example, in rubric student may get 1 out of maximum 3 points and this has to be mapped to 0-100 grade.
      3. Grade student and make sure the grade is rounded and properly displayed in old Assignment module (mod_assignment) and is diplayed as decimal in new Assignment module (mod_assign).
      4. Use scale for grading in new Assignment module and make sure the grade is rounded now. For example, if scale is ("Bad", "Average", "Good"), the grading method does not return "Bad-and-a-half".

      Backward-compatibility:

      1. Ideally install one of the plugins from https://moodle.org/plugins/browse.php?list=category&id=39 (hopefully they work on 2.5 maybe with some warnings about setType).
      2. Create new assignment module and choose this grading method.
      3. Make sure that grades are rounded.
      Show
      Create course with both new and old Assignment modules using advanced grading method "Rubrics", and also new and old Assignment modules using advanced grading method "Marking guide". In each module create rubric or guide so it uses different grading range than module. For example, in rubric student may get 1 out of maximum 3 points and this has to be mapped to 0-100 grade. Grade student and make sure the grade is rounded and properly displayed in old Assignment module (mod_assignment) and is diplayed as decimal in new Assignment module (mod_assign). Use scale for grading in new Assignment module and make sure the grade is rounded now. For example, if scale is ("Bad", "Average", "Good"), the grading method does not return "Bad-and-a-half". Backward-compatibility: Ideally install one of the plugins from https://moodle.org/plugins/browse.php?list=category&id=39 (hopefully they work on 2.5 maybe with some warnings about setType). Create new assignment module and choose this grading method. Make sure that grades are rounded.
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull 2.5 Branch:
      wip-MDL-33563-m25
    • Pull Master Branch:
      wip-MDL-33563-master
    • Rank:
      139

      Description

      Currently the 2.2.3 rubric grading method only posts integer grades. It seems that if the quiz module can return decimal grades, then the rubric grading method should also be able to return decimal grades. The calculation is performed automatically, not manually entered by the instructor (as with the dropdowns in the assignment grading interface). My students frequently ask why they cannot get the fractional point totals, as this could make a difference when aggregated at the end of the course.

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          Yes, there seems to be some rounding happening here. I'm not sure why.

          Show
          Michael de Raadt added a comment - Yes, there seems to be some rounding happening here. I'm not sure why.
          Hide
          Marina Glancy added a comment -

          rounding happens because in case of simple grading (in mod_assignment) teacher had a dropdown with integers between 0 and maxgrade, or scale elements. So to make the final grade compatible with simple grading, it is rounded in advanced grading too.

          There is a function gradingform_controller::set_grade_range
          https://github.com/moodle/moodle/blob/master/grade/grading/form/lib.php#L595
          which actually can set the same range as used for the current grading.

          For example, in case of grading with a scale, the non-decimal numbers would make no sense.

          Show
          Marina Glancy added a comment - rounding happens because in case of simple grading (in mod_assignment) teacher had a dropdown with integers between 0 and maxgrade, or scale elements. So to make the final grade compatible with simple grading, it is rounded in advanced grading too. There is a function gradingform_controller::set_grade_range https://github.com/moodle/moodle/blob/master/grade/grading/form/lib.php#L595 which actually can set the same range as used for the current grading. For example, in case of grading with a scale, the non-decimal numbers would make no sense.
          Hide
          Phineas Head added a comment -

          For reasons too complex and boring to go into, I really need this to be implemented. As far as I can see, the fix is very simple indeed;

          Change argument 2 of the round() function on line 791 of ~/grade/grading/form/rubric/lib.php from 0 to 5

          This works fine on my localhost XAMPP installation but fails on my Remote Learner production server. They use a virtualised implementation and tell me that although the patch they apply makes the code change, for some reason they don't understand, it doesn't work – scores are still entered and returned as integers.

          Have I missed something 'downstream' of the method call that also rounds the score?
          Is there any reason why this would work on XAMPP and not with a patching system?

          Please can Rubrics (and other systems like Guides) be made not to force integers? The fix appears to be very simple (notwithstanding what I've missed!). I understand the need to tally with Scales but this should be achieved as an option, not forced (i.e. 'Return Integers (if using Scales)' OR 'Return Decimals (if using Scores)').

          Show
          Phineas Head added a comment - For reasons too complex and boring to go into, I really need this to be implemented. As far as I can see, the fix is very simple indeed; Change argument 2 of the round() function on line 791 of ~/grade/grading/form/rubric/lib.php from 0 to 5 This works fine on my localhost XAMPP installation but fails on my Remote Learner production server. They use a virtualised implementation and tell me that although the patch they apply makes the code change, for some reason they don't understand, it doesn't work – scores are still entered and returned as integers. Have I missed something 'downstream' of the method call that also rounds the score? Is there any reason why this would work on XAMPP and not with a patching system? Please can Rubrics (and other systems like Guides) be made not to force integers? The fix appears to be very simple (notwithstanding what I've missed!). I understand the need to tally with Scales but this should be achieved as an option, not forced (i.e. 'Return Integers (if using Scales)' OR 'Return Decimals (if using Scores)').
          Hide
          Susan Mangan added a comment -

          We also cannot use the Rubric feature unless decimals are allowed Such as shame as it looks so promising! It the fix noted above really all that is required? Is this safe to modify on our own? I'm reluctant to do so unless confirmed by a developer. Thanks!

          Show
          Susan Mangan added a comment - We also cannot use the Rubric feature unless decimals are allowed Such as shame as it looks so promising! It the fix noted above really all that is required? Is this safe to modify on our own? I'm reluctant to do so unless confirmed by a developer. Thanks!
          Hide
          Marina Glancy added a comment -

          This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue.

          For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

          Show
          Marina Glancy added a comment - This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue. For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment
          Hide
          Marina Glancy added a comment -

          I can see that this issue collected a lot of votes and it will become our priority in the close future. I've added gradebook and assignment components because those components will be affected. As I've already said this requires much more changes and thoughts than it seems.

          Show
          Marina Glancy added a comment - I can see that this issue collected a lot of votes and it will become our priority in the close future. I've added gradebook and assignment components because those components will be affected. As I've already said this requires much more changes and thoughts than it seems.
          Hide
          Dan Marsden added a comment -

          Thanks Marina - I've had discussions with a few of our clients about this too - I've thought about picking this up myself if I can find the time....

          Show
          Dan Marsden added a comment - Thanks Marina - I've had discussions with a few of our clients about this too - I've thought about picking this up myself if I can find the time....
          Hide
          Marina Glancy added a comment -

          will be so awesome Dan if you can work on it. Maybe if you work on it you can meanwhile resolve issue MDL-38105 about negative scores

          Show
          Marina Glancy added a comment - will be so awesome Dan if you can work on it. Maybe if you work on it you can meanwhile resolve issue MDL-38105 about negative scores
          Hide
          Marina Glancy added a comment -
          Show
          Marina Glancy added a comment - Dan, can you look at this please: https://github.com/marinaglancy/moodle/compare/master...wip-MDL-33563-master
          Hide
          Dan Marsden added a comment -

          quick look at the diff and it seems to make sense to me - haven't tested it. Nice work!

          Show
          Dan Marsden added a comment - quick look at the diff and it seems to make sense to me - haven't tested it. Nice work!
          Hide
          Susan Mangan added a comment -

          I wish there was a like button on these tracker items!

          Show
          Susan Mangan added a comment - I wish there was a like button on these tracker items!
          Hide
          Martin Dougiamas added a comment - - edited

          Adding this to scrum to consider getting into master and 2.5 asap.

          Show
          Martin Dougiamas added a comment - - edited Adding this to scrum to consider getting into master and 2.5 asap.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated (25 & master), thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated (25 & master), thanks!
          Hide
          Andrew Davis added a comment -

          Phew. I believe this is all working as described. Passing.

          Im about to open a new MDL to do with layout in the Clean theme but thats unrelated to this fix.

          Show
          Andrew Davis added a comment - Phew. I believe this is all working as described. Passing. Im about to open a new MDL to do with layout in the Clean theme but thats unrelated to this fix.
          Hide
          Damyon Wiese added a comment -

          Thanks again for another week of fixes, improvements and testing. These changes have been released to the world.

          Cheers, Damyon

          Show
          Damyon Wiese added a comment - Thanks again for another week of fixes, improvements and testing. These changes have been released to the world. Cheers, Damyon

            People

            • Votes:
              32 Vote for this issue
              Watchers:
              24 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: