Moodle
  1. Moodle
  2. MDL-31158

Allow grade recovery during re-enrollment to be site-configurable

    Details

    • Database:
      Any
    • Testing Instructions:
      Hide

      1. Create a course.
      2. Go to the enrolment page. Click the "enrol users" button.
      3. Verify that the "Recover user's old grades if possible" box is unchecked.
      4. Enable the "Recover grades" site setting "recovergradesdefault".
      5. Reload the enrolment page and click the "enrol users" button again. Verify that the box is now checked.

      Show
      1. Create a course. 2. Go to the enrolment page. Click the "enrol users" button. 3. Verify that the "Recover user's old grades if possible" box is unchecked. 4. Enable the "Recover grades" site setting "recovergradesdefault". 5. Reload the enrolment page and click the "enrol users" button again. Verify that the box is now checked.
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:
      MDL-31158_grade_recovery
    • Rank:
      37599

      Description

      MDL-25718 introduced the option to recover grades when a student un-enrols and re-enrols. To recover grades, there's a hidden checkbox in the AJAX enrollment page. We've had problems with our instructors missing this option. It would be great if there was an option to have this be the default behavior--i.e. that the box is always checked. The below patch adds a site option for setting the default behavior.

        Issue Links

          Activity

          Hide
          Andrew Davis added a comment -

          Ive added a second commit to tighten up a string but otherwise this looks great. The master branch diff URL was https://github.com/mackensen/moodle/compare/master...MDL-31158

          This could be considered a new feature so probably only wants to go into master.

          Show
          Andrew Davis added a comment - Ive added a second commit to tighten up a string but otherwise this looks great. The master branch diff URL was https://github.com/mackensen/moodle/compare/master...MDL-31158 This could be considered a new feature so probably only wants to go into master.
          Hide
          Andrew Davis added a comment -

          Made some changes to the testing instructions. Now Im after a peer review.

          Show
          Andrew Davis added a comment - Made some changes to the testing instructions. Now Im after a peer review.
          Hide
          Jason Fowler added a comment -

          looks good Andrew

          Show
          Jason Fowler added a comment - looks good Andrew
          Hide
          Andrew Davis added a comment -

          Submitting for integration. Im not sure if this is a new feature that should thus only go into head or if it can go into 2.2 and 2.1 stable.

          Show
          Andrew Davis added a comment - Submitting for integration. Im not sure if this is a new feature that should thus only go into head or if it can go into 2.2 and 2.1 stable.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Sam Hemelryk added a comment -

          Hi Andrew + Helen,

          The code for this issue is spot on the only thing I am not sure about are the two new strings.
          Would the two of you mind having a think about this and seeing what you think.

          Helen the changes Andrew has here introduce a new setting that allows the admin to change a default that controls the restoring of grades when a user is enrolled.
          Before this setting Moodle did not restore a users grades if possible when enrolling them in a course.
          With this setting you can change that default so that it will restore grades if possible during enrolment.
          When a teacher enrols a user they can of course still choose to change whether the grades are restored or not, this is purely a default.

          The strings at the moment..
          The name of the setting: "Recover grades"
          The description: "Recover student grades by default when re-enrolling a student."

          I wonder about something like the following:
          Name: "Recover grades default"
          Desc: "If enabled by default Moodle will attempt to recover a users grades when they are re-enrolled in a course. This can still be changed at the time of enrolment as it only alters the default"

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Hi Andrew + Helen, The code for this issue is spot on the only thing I am not sure about are the two new strings. Would the two of you mind having a think about this and seeing what you think. Helen the changes Andrew has here introduce a new setting that allows the admin to change a default that controls the restoring of grades when a user is enrolled. Before this setting Moodle did not restore a users grades if possible when enrolling them in a course. With this setting you can change that default so that it will restore grades if possible during enrolment. When a teacher enrols a user they can of course still choose to change whether the grades are restored or not, this is purely a default. The strings at the moment.. The name of the setting: "Recover grades" The description: "Recover student grades by default when re-enrolling a student." I wonder about something like the following: Name: "Recover grades default" Desc: "If enabled by default Moodle will attempt to recover a users grades when they are re-enrolled in a course. This can still be changed at the time of enrolment as it only alters the default" Cheers Sam
          Hide
          Andrew Davis added a comment -

          your suggestion for the setting name is good. Your suggestion for the description however is super wordy and confusing.

          I would however suggest we tweak for clarity "By default, recover student grades when re-enrolling a student in a course."

          I don't think we need to explain that it can be changed. Its expected behaviour that a default can be changed. Its a default, not a forced option. If it cannot be changed then it is not a default

          Show
          Andrew Davis added a comment - your suggestion for the setting name is good. Your suggestion for the description however is super wordy and confusing. I would however suggest we tweak for clarity "By default, recover student grades when re-enrolling a student in a course." I don't think we need to explain that it can be changed. Its expected behaviour that a default can be changed. Its a default, not a forced option. If it cannot be changed then it is not a default
          Hide
          Helen Foster added a comment -

          Hi Sam and Andrew,

          Thanks for asking my opinion on these new language strings

          I assume that the new setting will be added to admin/settings.php?section=enrolsettingsmanual (Settings > Site administration > Plugins > Enrolments > Manual enrolments) - right?

          I looked there to check existing strings so that our new strings can follow the same style. I noticed the word 'default' is already used a lot on the page, so it's probably not necessary to use it in both new strings.

          Thus, my suggestions for the strings are:

          $string['recovergradesdefault'] = 'Recover grades default';

          (agreeing with you both!)

          $string['recovergradesdefault_help'] = 'Recover grades when re-enrolling a user in a course.';

          using Andrew's suggestion and replacing 'student' with 'user' to match the style of other strings.

          Alternatively we could go for:

          $string['recovergradesdefault_help'] = 'Recover old grades when re-enrolling a user in a course.';

          including the word 'old' as it's used in the course UI 'Recover user's old grades if possible'.

          Show
          Helen Foster added a comment - Hi Sam and Andrew, Thanks for asking my opinion on these new language strings I assume that the new setting will be added to admin/settings.php?section=enrolsettingsmanual (Settings > Site administration > Plugins > Enrolments > Manual enrolments) - right? I looked there to check existing strings so that our new strings can follow the same style. I noticed the word 'default' is already used a lot on the page, so it's probably not necessary to use it in both new strings. Thus, my suggestions for the strings are: $string ['recovergradesdefault'] = 'Recover grades default'; (agreeing with you both!) $string ['recovergradesdefault_help'] = 'Recover grades when re-enrolling a user in a course.'; using Andrew's suggestion and replacing 'student' with 'user' to match the style of other strings. Alternatively we could go for: $string ['recovergradesdefault_help'] = 'Recover old grades when re-enrolling a user in a course.'; including the word 'old' as it's used in the course UI 'Recover user's old grades if possible'.
          Hide
          Sam Hemelryk added a comment -

          Awesome thanks for the thoughts Helen.
          Andrew could you please amend the strings and ping me when done so that I can integrate this

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Awesome thanks for the thoughts Helen. Andrew could you please amend the strings and ping me when done so that I can integrate this Cheers Sam
          Hide
          Sam Hemelryk added a comment -

          Awesome thanks Andrew this has been integrated now.
          Noting it was only integrated on master as this is a new feature.

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Awesome thanks Andrew this has been integrated now. Noting it was only integrated on master as this is a new feature. Cheers Sam
          Hide
          Adrian Greeve added a comment -

          Tested in master. Everything works wells. Test passed.

          Show
          Adrian Greeve added a comment - Tested in master. Everything works wells. Test passed.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Some changes to Moodle should be milestones in the project by themselves.

          This is not the case and your fix is not so important, but your collaboration is highly appreciated, thanks!

          Closing as fixed, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Some changes to Moodle should be milestones in the project by themselves. This is not the case and your fix is not so important, but your collaboration is highly appreciated, thanks! Closing as fixed, ciao
          Hide
          Helen Foster added a comment -

          Thanks Andrew for this new setting. Documentation for it can now be found in the 2.3 docs wiki:

          Show
          Helen Foster added a comment - Thanks Andrew for this new setting. Documentation for it can now be found in the 2.3 docs wiki: http://docs.moodle.org/23/en/Grade_settings#Recover_grades_default http://docs.moodle.org/23/en/Enrolled_users#Enrolling_users

            People

            • Votes:
              11 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: