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

Keyholder role assigned above course context is ignored

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.3, 2.0
    • Component/s: Enrolments
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      To duplicate the problem:

      Define a new role Keyholder with all permissions Not set

      Set enrol_manual_keyholdername = Keyolder (Site administration -> Courses -> Enrollments -> Internal enrollment)

      Assign the Keyholder Role to user X in category Miscellaneous.

      Create a new course C in category Miscellaneous. Set an enrollment key. Do not assign a Teacher.

      Login as student and click course C

      You will get message: "This course requires an 'enrolment key' - a one-time password that you should have received from teacher"

            • Why doesn't the message instruct the student to get the key from user X?

      The code in enrol/manual/enrol.php (around line 378) looks like it should return user X

      $contacts = get_role_users($CFG->enrol_manual_keyholder_role,get_context_instance((CONTEXT_COURSE,$course->id))

        Attachments

          Activity

            People

            Assignee:
            howardsmiller Howard Miller
            Reporter:
            jisner John Isner
            Tester:
            Petr Skoda Petr Skoda
            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:
              Resolved:
              Fix Release Date:
              15/Oct/08