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

Conditional activities not accessible after manually overriding grades.

    Details

    • Testing Instructions:
      Hide

      1. Create two assignments, both of them with a max mark of 9 or some other distinctive number that isnt 100.
      2. Set the conditional settings in the second assignment so that it can only be accessed when a grade of 70% is achieved on the first assignment.
      3. Enrol a test student.
      4. Manually override the test students grade for quiz 1 to 100%.
      5) Log in as the student to see that you can access the restricted assignment.

      If it doesnt appear initially log out, shut your browser and do whatever is necessary to get a new session.

      Show
      1. Create two assignments, both of them with a max mark of 9 or some other distinctive number that isnt 100. 2. Set the conditional settings in the second assignment so that it can only be accessed when a grade of 70% is achieved on the first assignment. 3. Enrol a test student. 4. Manually override the test students grade for quiz 1 to 100%. 5) Log in as the student to see that you can access the restricted assignment. If it doesnt appear initially log out, shut your browser and do whatever is necessary to get a new session.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull Master Branch:
      MDL-31713_override

      Description

      It appears that the rawgrademax value is set to 100 when overriding a grade, rather than the max marks achievable for that grade item, which means the score returned in lib/conditionlib.php by the function get_cached_grade_score is wrong. When viewing the grade report it was visible that the students all had achieved 100% for the assignment, but were still unable to access the next assignment which required a grade of 70%. After displaying the score returned by the get_cached_grade_score function, it was shown that the actual grade was returned, not the percentage.

      The logic used in this method to return the percentage is -

      ((finalgrade - rawgrademin) * 100) / rawgrademax - rawgrademin)

      If the finalgrade is 8, the rawgrademin 0 and the rawgrademax 8, then this would return 100, however the rawgrademax is set to 100 in the DB, so the score returned is 8 so the condition is not met!

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/May/13