Uploaded image for project: '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 Master Branch:
      wip-MDL-33563-master

      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.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            salvetore Michael de Raadt added a comment -

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

            Show
            salvetore Michael de Raadt added a comment - Yes, there seems to be some rounding happening here. I'm not sure why.
            Hide
            marina 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 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
            phin.head 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
            phin.head 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
            pjfish06 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
            pjfish06 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 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 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 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 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
            danmarsden 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
            danmarsden 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 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 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 Marina Glancy added a comment -
            Show
            marina Marina Glancy added a comment - Dan, can you look at this please: https://github.com/marinaglancy/moodle/compare/master...wip-MDL-33563-master
            Hide
            danmarsden 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
            danmarsden 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
            pjfish06 Susan Mangan added a comment -

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

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

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

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

            Integrated (25 & master), thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Integrated (25 & master), thanks!
            Hide
            andyjdavis 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
            andyjdavis 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 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 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:
                  Fix Release Date:
                  9/Sep/13