Moodle
  1. Moodle
  2. MDL-34645

Enrolment via JS enrol interface ignores default duration setting

    Details

      Description

      If a manual enrolment method has a set default duration and users are enrolled via the ajax-y interface, the enrollment duration is not set in the enrolment options (however it is set in the non-javascript enrolment screen). It's set to the default Unlimited duration.

      Steps to replicate:
      */ Set the default duration on a manual enrolment method to say, 120 days.
      */ View the enrol users page for that course: /enrol/users.php?id=<id>
      */ Wait for the page to load and then click enrol, in the JS interface, expand the 'Enrolment options' section.
      */ You'll see the duration is set to Unlimited instead of 120.

      */ If you visit the non-js interface (which you can get to by clicking the 'enrol users' button before the JS has a chance to load) you'll see the 'Enrolment duration' field is filled in and is obeyed when you enrol users with that interface.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Adam Olley added a comment -

            Hi Petr,

            I've attached my fix for this issue. Thoughts?

            Show
            Adam Olley added a comment - Hi Petr, I've attached my fix for this issue. Thoughts?
            Hide
            Michael de Raadt added a comment -

            It looks like this is also a duplicate. While I love seeing patched issues, it would be good if we didn't end up with duplicate issues.

            Show
            Michael de Raadt added a comment - It looks like this is also a duplicate. While I love seeing patched issues, it would be good if we didn't end up with duplicate issues.
            Hide
            Petr Skoda added a comment -

            Thanks, submitting for integration.

            Show
            Petr Skoda added a comment - Thanks, submitting for integration.
            Hide
            Adam Olley added a comment -

            As commented in MDL-31849, not a duplicate.

            Show
            Adam Olley added a comment - As commented in MDL-31849 , not a duplicate.
            Hide
            Dan Poltawski 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
            Dan Poltawski 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 -

            Thanks Adam, spot on again and integrated.

            Show
            Sam Hemelryk added a comment - Thanks Adam, spot on again and integrated.
            Hide
            Aparup Banerjee added a comment -

            reset for testing (mistaken failure from Jason)

            Show
            Aparup Banerjee added a comment - reset for testing (mistaken failure from Jason)
            Hide
            Jason Fowler added a comment -

            all good here Adam

            Show
            Jason Fowler added a comment - all good here Adam
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Fixed STOP Closed STOP Thanks STOP

            Yay, imagination! Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - Fixed STOP Closed STOP Thanks STOP Yay, imagination! Ciao

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: