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

Access restrictions with grade - the "less than value" cannot be modified

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Take any resource and set a Grade restriction so that a student must have ≥ 65% and < 80% in a "quiz" activity.
      After saving it, try to deactivate one of the two parts of the restriction. For example disable the < 80% restriction and save it.

      Issue:
      You will see that the < 80% is still activated after reloading.

      After applying the fix:
      You will see that the < 80% is deactivated after reloading, as intended.

      Behat

      1. Confirm that availability/condition/grade/tests/behat/availability_grade.feature passes.
      Show
      Take any resource and set a Grade restriction so that a student must have ≥ 65% and < 80% in a "quiz" activity. After saving it, try to deactivate one of the two parts of the restriction. For example disable the < 80% restriction and save it. Issue: You will see that the < 80% is still activated after reloading. After applying the fix: You will see that the < 80% is deactivated after reloading, as intended. Behat Confirm that availability/condition/grade/tests/behat/availability_grade.feature passes.
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-49477-master

      Description

      When a teacher sets a "Grade" access restrictions on a ressource or an activity and wants to modify it later on, Moodle dosen't seem to take into account any kind of changes for the "less than" part.

      For example, take a file ressource and set a Grade restriction so that a student must have ≥ 65% and < 80% in a "quiz" activity.

      After saving it, try to deactivate the < 80% part of the restriction. Moodle will refuse to save it even though it "saves" the new setting. When returning into the Restric access, you will see that the < 80% is still activated. However, I wasn't able to reproduce the bug when playing with the "more than and equal to" values. It seems that it is only the "less than" that is affected.

      I was able to reproduce this bug on Moodle 2.7.3 (vanilla version) and 2.9DEV.

        Attachments

          Activity

            People

            Assignee:
            vpowerrc Viduranga Wijesooriya
            Reporter:
            melrome Melvin Romero
            Peer reviewer:
            Frédéric Massart
            Integrator:
            Andrew Nicols
            Tester:
            Jetha Chan
            Participants:
            Component watchers:
            Sam Marshall, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              11/May/15