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

Improve enrol plugins interaction with enrol/index.php

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.0
    • Fix Version/s: None
    • Component/s: Enrolments
    • Labels:
      None
    • Affected Branches:
      MOODLE_30_STABLE

      Description

      The api to interact with enrol/index.php is pretty limited as it just returns an HTML string, this limits what we can do in enrol/index.php when muliple options are available. We had problems on MDL-50332 and MDL-47761 and the current behaviour is not specially usable. For example, when there are multiple enrol_self instances, some of them might not be available, in this enrol_self specific case, can_self_enrol returns true or an error string (which is neither optimal though) we should be able to display (enrol/index.php) the available enrolment methods and the not available ones separately, for this we need to change what the hook returns.

      Without breaking backwards compatibility, we should look at deprecating enrol_page_hook while allowing a new API to be used. We can update enrol/index.php as part of this issue too.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              dmonllao David Monllaó
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: