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

Custom Roles: Not listed in Current Role drop-down on Participants list page, cannot put into Groups

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Testing prerequisites (admin user).

      1. Create a new role 'custom role' with no archetype, and allow teachers to assign this role at course context.
      2. Create a new role 'custom role 2' with no archetype and do not allow teachers to assign at course context.
      3. Create a course and enrol 4 users as student, teacher, and custom roles 1 and 2.
      4. Make sure the site policy 'profileroles' has only the teacher, student and nonediting teacher roles checked.
      5. Create a group but do not add any members yet.

      Testing for problems 1-3

      As a student:

      1. Log in and go to the course participants page.
      2. Under the current role filter (the look and feel will differ between master and 33, but the purpose is the same), confirm that:
        • You can see those roles which are assigned in the course or any parent context and set in the profileroles policy. i.e. Not the 'non-editing teacher' nor the 'custom role 1/2' you created earlier.

      As a teacher:

      1. Log in and go to the course participants page.
      2. Under the current role filter, confirm that:
        • You can see those roles which are assigned in the course or any parent context. You should see the 'custom role 1' and 'custom role 2' but not the 'non-editing teacher'
      3. Now, go to groups, select your group and click 'Add/remove users'
      4. In the potential members box on the right, confirm that
        • You see titles for 'Teacher', 'Student', 'Custom role 1' and 'Custom role 2'
      5. Go back to groups.
      6. Select the group and click 'Auto create groups'
      7. Now, look at the role select and Confirm that
        • You see the 'Teacher', 'Student', 'Custom role 1' and 'Custom role 2' roles

      Testing the course profile page for consistency

      1. As a teacher, go to the course participants page and click the profile of the user enrolled as 'Custom role 1' (i.e. a role they can assign).
      2. Confirm that you see a link to 'Custom role 1' on their profile page under 'Course details'.
      3. As a teacher, go to the course participants page and click the profile of the user enrolled as 'Custom role 2' (i.e a role which they can't assign but which is assigned).
      4. Confirm that you see a link to 'Custom role 2' on their profile page under 'Course details'.
      Show
      Testing prerequisites (admin user). Create a new role 'custom role' with no archetype, and allow teachers to assign this role at course context. Create a new role 'custom role 2' with no archetype and do not allow teachers to assign at course context. Create a course and enrol 4 users as student, teacher, and custom roles 1 and 2. Make sure the site policy 'profileroles' has only the teacher, student and nonediting teacher roles checked. Create a group but do not add any members yet. Testing for problems 1-3 As a student: Log in and go to the course participants page. Under the current role filter (the look and feel will differ between master and 33, but the purpose is the same), confirm that: You can see those roles which are assigned in the course or any parent context and set in the profileroles policy. i.e. Not the 'non-editing teacher' nor the 'custom role 1/2' you created earlier. As a teacher: Log in and go to the course participants page. Under the current role filter, confirm that: You can see those roles which are assigned in the course or any parent context. You should see the 'custom role 1' and 'custom role 2' but not the 'non-editing teacher' Now, go to groups, select your group and click 'Add/remove users' In the potential members box on the right, confirm that You see titles for 'Teacher', 'Student', 'Custom role 1' and 'Custom role 2' Go back to groups. Select the group and click 'Auto create groups' Now, look at the role select and Confirm that You see the 'Teacher', 'Student', 'Custom role 1' and 'Custom role 2' roles Testing the course profile page for consistency As a teacher, go to the course participants page and click the profile of the user enrolled as 'Custom role 1' (i.e. a role they can assign). Confirm that you see a link to 'Custom role 1' on their profile page under 'Course details'. As a teacher, go to the course participants page and click the profile of the user enrolled as 'Custom role 2' (i.e a role which they can't assign but which is assigned). Confirm that you see a link to 'Custom role 2' on their profile page under 'Course details'.
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_25_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-37810-master
    • Sprint:
      3.4 Sprint 5

      Description

      I am using Moodle 2.2.6 (Build: 20121112) and have three issues with custom roles. Our Moodle host provider (a Moodle partner) was able to recreate this issue on Moodle 2.3 (not sure which rev).

      I created a number of custom roles on my site according to http://docs.moodle.org/22/en/Creating_custom_roles. One role, "Facilitator" is a duplicate of the non-editing teacher role with further restrictions on the permissions of that role. I also created a "Participant" role that is a copy of the student role with permission changes. These custom roles are assigned in the Course and Activity module context only. The custom roles allowed me to maintain the default settings on the non-editing teacher and student roles for use in other courses.

      I added the Facilitator role to the Course Contact (Settings > Site administration > Appearance > Courses). Now users assigned to the Facilitator role in a course are listed as a contact in the course description just as expected.

      When I enroll users into a course - in either the Facilitator or Participant role - I've found that the Enrolled Users list (Settings > Course administration > Users > Enrolled users) shows the users correctly assigned in the custom roles. The permissions for both roles seem to be correct.

      Problem #1 - Participant list: Minor issue
      When looking at the participant list for a course (Navigation > My courses > Course name > Participants), I find that I can only change the filter listed under "Current Role" by the custom roles that I added to the Course Contacts (Settings > Site administration > Appearance > Courses). In this case, my only choices are "All participants" and "Facilitator" - none of my other custom role names appear in the drop down list. Note - users assigned to the Moodle core roles (i.e. Student, Teacher) do appear in the drop-down list as expected.

      Problem #2 - Add user in custom role to Group: Major issue
      In Groups (Settings > Course administration > Users > Groups), when I click on Add/remove users to a pre-existing group, the list of potential members appears with users assigned to my custom Facilitator role and the remaining users are shown as having “No roles”. Only the Facilitator role defined as a Course Contact (Settings > Site administration > Appearance > Courses) appears as a valid role. Users assigned to any other custom role are listed under "No Role". Note - users assigned to the Moodle core roles (i.e. Student, Teacher) are listed under the name of the Moodle core role heading as expected.

      Problem #3 – Select members from role in Auto-create groups: Major issue
      When I try to auto-create groups, the Select members from role drop down list is limited to "All participants" and "Facilitator" - none of my other custom role names appear. Note - users assigned to the Moodle core roles (i.e. Student, Teacher) are listed in the drop down list.

      Solution research:
      I found a discussion thread, https://moodle.org/mod/forum/discuss.php?d=134310#p900283, where Joseph Rézeau posts a similar problem. The answer provided by Andreas Panagiotopoulos requires customizing core code on admin/settings.php?section=sitepolicies. Is there any other way?

      I also read MDL-21133, https://tracker.moodle.org/browse/MDL-21133, that seems to document a similar issue in Moodle 1.9.7. That tracker issue was closed without a resolution.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                10 Vote for this issue
                Watchers:
                20 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Nov/17