Moodle
  1. Moodle
  2. MDL-29824

Course with multiple self-enrol methods shows confusing error "Maximum number of users allowed to self-enrol was already reached" when only one method has reached the maximum

    Details

    • Database:
      Any
    • Testing Instructions:
      Hide

      1/ create a corse and add multiple self enrol instances - use different max user limits, with and without enrolment key
      2/ self enrol as normal users
      3/ try to hit the max enrolled limit
      4/ also set max number as 1, open enrol page from two browsers using different accounts, enrol as one user and hit enrol in the second browser, you should get standard error message

      Show
      1/ create a corse and add multiple self enrol instances - use different max user limits, with and without enrolment key 2/ self enrol as normal users 3/ try to hit the max enrolled limit 4/ also set max number as 1, open enrol page from two browsers using different accounts, enrol as one user and hit enrol in the second browser, you should get standard error message
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w43_MDL-29824_m22_enrolmax
    • Rank:
      19350

      Description

      If a course has multiple self-enrol methods and one or more of those methods has reached the maximum number of enrolments, this message is displayed: "Maximum number of users allowed to self-enrol was already reached." This is expected; however, when other self-enrol methods are available for the course and have not reached the maximum, the error kind of makes it look like the whole course has reached a maximum rather than just one method, especially when it's the first method that has reached the max and thus displays the message at the top of the page. We have clients reporting this as confusing. The confusion stems from the fact that the label for the method that has reached the max disappears. Either the label should not disappear or the message itself should include the self-enrol method name so it's more clear to the user exactly what has reached its maximum. See attached screenshot for example of the problem.

        Activity

        Hide
        Michael de Raadt added a comment -

        Thanks for suggesting this.

        In the meantime feel free to help us work on this issue. If you are able to provide a patch, please add a patch label so we will spot it.

        Show
        Michael de Raadt added a comment - Thanks for suggesting this. In the meantime feel free to help us work on this issue. If you are able to provide a patch, please add a patch label so we will spot it.
        Hide
        Petr Škoda added a comment -

        Hello, I have used a bit different approach, the enrolment form is printed in all cases even when enrolment not possible any more, this hopefully unifies the visual appearance and simplifies error handling. I have also added page heading.

        Thanks a lot for the report.

        Show
        Petr Škoda added a comment - Hello, I have used a bit different approach, the enrolment form is printed in all cases even when enrolment not possible any more, this hopefully unifies the visual appearance and simplifies error handling. I have also added page heading. Thanks a lot for the report.
        Hide
        Sam Hemelryk added a comment -

        Thanks Petr this has been integrated now

        Show
        Sam Hemelryk added a comment - Thanks Petr this has been integrated now
        Hide
        Rossiani Wijaya added a comment -

        This is working great.

        Test passed.

        Show
        Rossiani Wijaya added a comment - This is working great. Test passed.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        And this has been sent upstream (already available @ git and cvs repos). Many, many thanks!

        Closing as fixed, ciao

        Show
        Eloy Lafuente (stronk7) added a comment - And this has been sent upstream (already available @ git and cvs repos). Many, many thanks! Closing as fixed, ciao
        Hide
        Chris Follin added a comment -

        Thank you for fixing this. Would it be backportable to 2.1.x? The diff URL doesn't load so I'm not sure what the changes are.

        Show
        Chris Follin added a comment - Thank you for fixing this. Would it be backportable to 2.1.x? The diff URL doesn't load so I'm not sure what the changes are.
        Hide
        Petr Škoda added a comment -

        no backporting is planned, if you want to backport it in your site please use git to find out what commits are related to this MDL issue, sorry

        Show
        Petr Škoda added a comment - no backporting is planned, if you want to backport it in your site please use git to find out what commits are related to this MDL issue, sorry

          People

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

            Dates

            • Created:
              Updated:
              Resolved: