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

Duplicating activity leads to manual enrolment for users

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • 3.11.8
    • Enrolments, Roles / Access
    • MOODLE_311_STABLE

      Some users gets enrolled manually to a course without realizing it. This is due to a user with a lower level role, able to switch role to a higher level and then duplicating an activity for the course.

      Please see below steps to replicate:

      1. Create a new course category.
      2. Create a course.
      3. Visit the course and add a Label.
      4. Create a user (say: test.user1)
      5. Edit the Non-editing teacher role and ensure that:

      • It can be assigned in Category level
      • Can switch role to Teacher or Course creator
        moodle/restore:configure = Not set
        moodle/restore:restoreactivity = Not set
        moodle/restore:restorecourse = Not set
        moodle/course:enrolconfig = Not set
        moodle/course:view = Allow
        moodle/role:switchroles = Allow
        5. In the course category, assign a Non-Editing teacher for test.user1 (category level)
        6. Log in as test.user1 and go to the course.
        7. Switch Role to Teacher
        8. Turn editing on.
        9. Click Edit and then Duplicate the Label activity.
        10. Back as admin, view the course logs:

      RESULT:
      Logs will show:
      Time: 14 July 2022, 10:12 AM
      User full name: test user1
      Affected user: test user1
      Event context: Course: courseC
      Component: System
      Event name: User enrolled in course
      Description: The user with id '35' enrolled the user with id '35' using the enrolment method 'manual' in the course with id '4'. Origin: restore
      IP: 0:0:0:0:0:0:0:1

      Time: 14 July 2022, 10:12 AM
      User fullname: test user1
      Affected user: test user1
      Event context: Course: courseC
      Component: System
      Event name: Role assigned
      Description: The user with id '35' assigned the role with id '3' to the user with id '35'.

      11. Now check the participants page for that course.
      RESULT: The user test.user1 is now enrolled with Manual enrolment with two roles assigned": Teacher, Non-editing teacher

            Unassigned Unassigned
            jebarvia Joshua Ebarvia
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.