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

Bulk assign roles in course categories when using Upload users

XMLWordPrintable

    • MOODLE_37_STABLE, MOODLE_401_STABLE
    • MOODLE_401_STABLE
    • Hide

      To test with the sample test file:

      1. Create MGMT category:
        1. Go to Site administration > Courses tab > Add a category. Set category name and id number to be 'MGMT', then click "Create category".
      2. Create course management1 under MGMT category:
        1. Go to Site administration > Courses tab >Add a new course. Enter course full name and course short name as management1. Then click "save and display".
      3. Upload users:
        1. Go to Site administration > Users tab > Upload users. Drop upload_users.csv to the file upload area and click "Upload users".
        2. In Upload users preview, see that users here have category MGMT and categoryrole management.
        3. Click "Upload users", verify that no error message is logged through Enrollment column. Verify that at the bottom of the page, it says "Users created: 2 Users skipped: 0 Errors: 0". Click "Continue".
      4. Verify category role:
        1. Go to Site administration > Courses tab > Manage courses and categories. Go to category MGMT > Assign roles (small gear next to it), verify that there are 2 users with role 'manager' and their other information match with upload_users.csv.
      5. Verify course role:
        1. Go to the course page for management1, click on Participant, verify that there are 2 users with role 'student'(category role) and 'manager'(specific course role) and their other information match with upload_users.csv.
      Show
      To test with the sample test file: Create MGMT category: Go to Site administration > Courses tab > Add a category. Set category name and id number to be 'MGMT', then click "Create category". Create course management1 under MGMT category: Go to Site administration > Courses tab >Add a new course. Enter course full name and course short name as management1. Then click "save and display". Upload users: Go to Site administration > Users tab > Upload users. Drop upload_users.csv to the file upload area and click "Upload users". In Upload users preview, see that users here have category MGMT and categoryrole management. Click "Upload users", verify that no error message is logged through Enrollment column. Verify that at the bottom of the page, it says "Users created: 2 Users skipped: 0 Errors: 0". Click "Continue". Verify category role: Go to Site administration > Courses tab > Manage courses and categories. Go to category MGMT > Assign roles (small gear next to it), verify that there are 2 users with role 'manager' and their other information match with upload_users.csv. Verify course role: Go to the course page for management1, click on Participant, verify that there are 2 users with role 'student'(category role) and 'manager'(specific course role) and their other information match with upload_users.csv.

      When using Upload users (https://docs.moodle.org/37/en/Upload_users), we would like to bulk assign roles (e.g. teacher) within a course category. For instance, if in the CSV file we have columns (username, category, role) and one row (MyUser, humanities, teacher), then after creating the user, MyUser should have been assigned teacher role to materials under humanities category.

      Test file upload_users.csv is attached below.

       

        1. MDL-66453_step 3_1.png
          MDL-66453_step 3_1.png
          92 kB
        2. MDL-66453_step 3_2.png
          MDL-66453_step 3_2.png
          88 kB
        3. MDL-66453_step 4.png
          MDL-66453_step 4.png
          55 kB
        4. MDL-66453_step 5.png
          MDL-66453_step 5.png
          114 kB
        5. screenshot-1.png
          screenshot-1.png
          53 kB
        6. upload_users.csv
          0.2 kB

            dmitriim Dmitrii Metelkin
            Aurora Jiang Aurora Jiang
            Mathew May Mathew May
            Andrew Lyons Andrew Lyons
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            11 Vote for this issue
            Watchers:
            21 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours, 29 minutes
                6h 29m

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