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

tool_uploadcourse should check if enrolment method can be disabled/deleted

XMLWordPrintable

    • MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • MOODLE_310_STABLE
    • Hide

      Update existing courses

      1. Login as admin
      2. Create a new course with shortname "C1"
      3. Navigate to course participants
      4. From the Actions menu click on Enrolment methods
      5. Delete the Manual enrolments method
      6. Enable the Guest access method (click the eye icon)
      7. Navigate to Courses > Upload courses in site administration
      8. Upload MDL-48391-update-course.csv
      9. Set Upload mode to Only update existing courses
      10. Set Update mode to Update with CSV data only
      11. Press Preview
      12. Press Upload courses
      13. Navigate back to your course enrolment methods
      14. Confirm the Manual enrolment method has been created
      15. Confirm the Self enrolment method has been deleted
      16. Confirm the Guest access enrolment method has been disabled

      Create new courses

      1. Navigate to Courses > Upload courses in site administration
      2. Upload MDL-48391-create-course.csv
      3. Set Upload mode to Create new courses, skip existing ones
      4. Press Preview
      5. Press Upload courses
      6. Navigate to the new "Course Two" course
      7. Navigate to course participants
      8. From the Actions menu click on Enrolment methods
      9. Confirm the Manual enrolment method has been disabled
      10. Confirm the Guest access enrolment method has been deleted
      11. Edit the Self enrolment method
      12. Confirm Default assigned role is "Teacher"
      13. Confirm Start date is 1 "1 July 2023"

      Update existing courses without permission

      1. Login as admin
      2. Create a new user A
      3. Navigate to Users > Permissions > Assign system roles in site administration
      4. Assign user A the manager role
      5. Navigate to Users > Permissions > Define roles in site administration
      6. Click on Manager
      7. Press Edit
      8. At the bottom, filter by moodle/site:config
      9. Allow the permission
      10. Now filter by enrol/guest:config
      11. Disallow the permission and save
      12. Login as user A
      13. Repeat steps 7-11 of the Update existing courses scenario
      14. Confirm the Status column of the Upload courses preview table display a message like "Cannot disable enrolment method 'Guest access'".
      Show
      Update existing courses Login as admin Create a new course with shortname "C1" Navigate to course participants From the Actions menu click on Enrolment methods Delete the Manual enrolments method Enable the Guest access method (click the eye icon) Navigate to Courses > Upload courses in site administration Upload MDL-48391-update-course.csv Set Upload mode to Only update existing courses Set Update mode to Update with CSV data only Press Preview Press Upload courses Navigate back to your course enrolment methods Confirm the Manual enrolment method has been created Confirm the Self enrolment method has been deleted Confirm the Guest access enrolment method has been disabled Create new courses Navigate to Courses > Upload courses in site administration Upload MDL-48391-create-course.csv Set Upload mode to Create new courses, skip existing ones Press Preview Press Upload courses Navigate to the new "Course Two" course Navigate to course participants From the Actions menu click on Enrolment methods Confirm the Manual enrolment method has been disabled Confirm the Guest access enrolment method has been deleted Edit the Self enrolment method Confirm Default assigned role is "Teacher" Confirm Start date is 1 "1 July 2023" Update existing courses without permission Login as admin Create a new user A Navigate to Users > Permissions > Assign system roles in site administration Assign user A the manager role Navigate to Users > Permissions > Define roles in site administration Click on Manager Press Edit At the bottom, filter by  moodle/site:config Allow the permission Now filter by enrol/guest:config Disallow the permission and save Login as user A Repeat steps 7-11 of the Update existing courses scenario Confirm the Status column of the Upload courses preview table display a message like "Cannot disable enrolment method 'Guest access'".

      When processing the enrolment data from a course uploaded via CSV, the API should check if the method can be deleted or hidden in the course, see:

      • enrol_plugin::can_delete_instance()
      • enrol_plugin::can_hide_show_instance()

            pholden Paul Holden
            fred Frédéric Massart
            Ferran Recio Ferran Recio
            Victor Déniz Falcón Victor Déniz Falcón
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            4 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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