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

New setting for enrolling admin as a teacher when adding a new course

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_400_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-72356-master
    • Testing Instructions:
      Hide

      New sites

      1. Create a new Moodle site based on the branch of this issue.
      2. Log in as admin
      3. Go to Site administration > Users > Permissions > User policies
      4. Confirm there is a 'Auto-enrol admin in new courses' setting and is Yes (checked) by default.
      5. Go to Site administration > Courses > Add a new course
      6. Fill required fields and click on 'Save and display'
      7. Confirm you are redirected to course main content page.
      8. Go to course 'Participants' page.
      9. Confirm you are enrolled as Teacher.
      10. Go to Site administration > Users > Permissions > User policies
      11. Uncheck 'Auto-enrol admin in new courses' setting to No and Save changes.
      12. Go to Site administration > Courses > Add a new course
      13. Fill required fields and click on 'Save and display'
      14. Go to course 'Participants' page (if you are not in Participants list page).
      15. Confirm you are not enrolled as Teacher.

      Upgrading sites

      1. Create a new 3.11 Moodle site
      2. Upgrade to 4.0 based on the branch of this issue.
      3. Log in as admin.
      4. Run the upgrading.
      5. Go to Site administration > Users > Permissions > User policies
      6. Confirm there is a 'Auto-enrol admin in new courses' setting and is No (unchecked) by default.
      7. Go to Site administration > Courses > Add a new course
      8. Fill required fields and click on 'Save and display'
      9. Go to course 'Participants' page (if you are not in Participants list page).
      10. Confirm you are not enrolled as Teacher.
      11. Go to Site administration > Users > Permissions > User policies
      12. Check 'Auto-enrol admin in new courses' setting to Yes and Save changes.
      13. Go to Site administration > Courses > Add a new course
      14. Fill required fields and click on 'Save and display'
      15. Confirm you are redirected to course main content page.
      16. Go to course 'Participants' page.
      17. Confirm you are enrolled as Teacher.

      Restored courses

      1. Log in as admin
      2. Create a new course and enrol some non-admin users to it.
      3. Unenrol the admin in case is enrolled.
      4. Create a backup of the course including enrolled users.
      5. Go to Site administration > Users > Permissions > User policies
      6. Check 'Auto-enrol admin in new courses' setting to Yes and Save changes.
      7. Restore the backup created at step 4 on a new course including enrolled users.
      8. Go to restored Participants page.
      9. Confirm admin is not enrolled.
      10. Confirm users enrolled at step 2 are enrolled. 

      Upload courses

      1. Log in as admin
      2. Go to Site administration > Courses > Upload courses
      3. Choose the attached upload_course.csv file
      4. Click on Preview
      5. Click on Upload courses
      6. Click on Continue
      7. Go to uploaded 'testing Upload' course's Participants list
      8. Confirm admin is not enrolled.

      Course request

      1. Log in as admin
      2. Go to Site administration > Users > Permissions > Define roles and edit 'Teacher' role.
      3. Set 'moodle/course:request' as Allow and Save changes.
      4. Create a new user and assign 'Teacher' system role.
      5. Go to Site administration > Users > Permissions > User policies
      6. Check 'Auto-enrol admin in new courses' setting to Yes and Save changes.
      7. Log out as admin
      8. Log in as Teacher.
      9. Customise dashboard to add 'Courses' block if it is not present.
      10. Follow 'All courses' link in 'Courses' block.
      11. Click on 'Request a course' button.
      12. Fill required fields and click on 'Request a course'.
      13. Confirm the request has been saved succesfully and click on Continue.
      14. Log out as Teacher.
      15. Log in as admin.
      16. Go to Site administration > Courses > Pending requests
      17. Approve course requested at step 12.
      18. Go to course Participants list.
      19. Confirm you are not enrolled as Teacher.

       

      Show
      New sites Create a new Moodle site based on the branch of this issue. Log in as admin Go to Site administration > Users > Permissions > User policies Confirm there is a 'Auto-enrol admin in new courses' setting and is Yes (checked) by default. Go to Site administration > Courses > Add a new course Fill required fields and click on 'Save and display' Confirm you are redirected to course main content page. Go to course 'Participants' page. Confirm you are enrolled as Teacher. Go to Site administration > Users > Permissions > User policies Uncheck 'Auto-enrol admin in new courses' setting to No and Save changes. Go to Site administration > Courses > Add a new course Fill required fields and click on 'Save and display' Go to course 'Participants' page (if you are not in Participants list page). Confirm you are not enrolled as Teacher. Upgrading sites Create a new 3.11 Moodle site Upgrade to 4.0 based on the branch of this issue. Log in as admin. Run the upgrading. Go to Site administration > Users > Permissions > User policies Confirm there is a 'Auto-enrol admin in new courses' setting and is No (unchecked) by default. Go to Site administration > Courses > Add a new course Fill required fields and click on 'Save and display' Go to course 'Participants' page (if you are not in Participants list page). Confirm you are not enrolled as Teacher. Go to Site administration > Users > Permissions > User policies Check 'Auto-enrol admin in new courses' setting to Yes and Save changes. Go to Site administration > Courses > Add a new course Fill required fields and click on 'Save and display' Confirm you are redirected to course main content page. Go to course 'Participants' page. Confirm you are enrolled as Teacher. Restored courses Log in as admin Create a new course and enrol some non-admin users to it. Unenrol the admin in case is enrolled. Create a backup of the course including enrolled users. Go to Site administration > Users > Permissions > User policies Check 'Auto-enrol admin in new courses' setting to Yes and Save changes. Restore the backup created at step 4 on a new course including enrolled users. Go to restored Participants page. Confirm admin is not enrolled. Confirm users enrolled at step 2 are enrolled.  Upload courses Log in as admin Go to Site administration > Courses > Upload courses Choose the attached upload_course.csv file Click on Preview Click on Upload courses Click on Continue Go to uploaded 'testing Upload' course's Participants list Confirm admin is not enrolled. Course request Log in as admin Go to Site administration > Users > Permissions > Define roles and edit 'Teacher' role. Set 'moodle/course:request' as Allow and Save changes. Create a new user and assign 'Teacher' system role. Go to Site administration > Users > Permissions > User policies Check 'Auto-enrol admin in new courses' setting to Yes and Save changes. Log out as admin Log in as Teacher. Customise dashboard to add 'Courses' block if it is not present. Follow 'All courses' link in 'Courses' block. Click on 'Request a course' button. Fill required fields and click on 'Request a course'. Confirm the request has been saved succesfully and click on Continue. Log out as Teacher. Log in as admin. Go to Site administration > Courses > Pending requests Approve course requested at step 12. Go to course Participants list. Confirm you are not enrolled as Teacher.  
    • Sprint:
      Moppies Kanban

      Description

      Currently when an admin of a new Moodle site adds a new course, they can't easily find the course when they next log in. If they are automatically enrolled as a teacher in the new course via a new setting 'Auto-enrol admin in new courses', then they can easily find the course as it will then be shown in My courses. They can always choose later to unenrol themselves from the course.

      As an admin
      I want to decide if I am enrolled in every course I create so it's one less thing for me to do when creating a course and also I can find the newly created course easily.

      Currently, based on "Creators' role in new courses" setting (Site administration > Users > Permissions > User policies) course creators are enrolled by default in every course they create. But admins are never enrolled by default.

      This new setting allows admins to decide if they want to be automatically enrolled and assigned the creators' role in new courses.

      Default value of this setting for new installations will be 'Yes' (for admins to be enrolled). For existing Moodle sites default value of the setting will be 'No' to keep the current behavior.

      Acceptance criteria:

      1. There is a new admin setting in Site administration > Users > Permissions > User policies called 'Auto-enrol admin in new courses' with description 'When an admin adds a new course, should they be automatically enrolled and assigned the creators' role in new courses?'
      2. In a new Moodle installation the default value for the setting is 'Yes'.
      3. When an existing Moodle site upgrades the default value of the setting is 'No'.
      4. When the setting is 'Yes' if an admin creates a new course, the admin will be enrolled in the course using the role selected in the "Creators' role in new courses" setting.
      5. When the setting is 'No' if an admin creates a new course, the admin won't be enrolled in the course.

        Attachments

          Activity

            People

            Assignee:
            amaia Amaia Anabitarte
            Reporter:
            amaia Amaia Anabitarte
            Peer reviewer:
            Carlos Escobedo Carlos Escobedo
            Integrator:
            Ilya Tregubov Ilya Tregubov
            Tester:
            Angelia Dela Cruz Angelia Dela Cruz
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 2 hours, 15 minutes
                1d 2h 15m