Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.8.2
-
None
-
MOODLE_18_STABLE
-
MOODLE_20_STABLE
Description
Three steps description:
Step 1.
As not unique admin, sometimes, I need to clean all roles of my colleagues because they are, at the same time, teachers and/or student, at category level and/or course level and/or site level and so on. I usually go to look for their name everywhere but... in the assign role of a course , when I select a role (to let you understand: moodle18/admin/roles/assign.php?contextid=xxx&roleid=2, for instance) I get a page with a drop down menu with ONLY list of roles.
Again, to let you understand, what I get is:
<select id="switchrole_jump" name="jump" onchange="self.location=document.getElementById('switchrole').jump.options[document.getElementById('switchrole').jump.selectedIndex].value;">
<option value="http://localhost:8888/moodle18/admin/roles/assign.php?userid=0&courseid=3&contextid=34&roleid=0">List all roles...</option>
<option value="http://localhost:8888/moodle18/admin/roles/assign.php?userid=0&courseid=3&contextid=34&roleid=1">Administrator</option>
<option value="http://localhost:8888/moodle18/admin/roles/assign.php?userid=0&courseid=3&contextid=34&roleid=2" selected="selected">Course creator</option>
<option value="http://localhost:8888/moodle18/admin/roles/assign.php?userid=0&courseid=3&contextid=34&roleid=3">Teacher</option>
<option value="http://localhost:8888/moodle18/admin/roles/assign.php?userid=0&courseid=3&contextid=34&roleid=4">Non-editing teacher</option>
<option value="http://localhost:8888/moodle18/admin/roles/assign.php?userid=0&courseid=3&contextid=34&roleid=5">Student</option>
<option value="http://localhost:8888/moodle18/admin/roles/assign.php?userid=0&courseid=3&contextid=34&roleid=6">Guest</option>
<option value="http://localhost:8888/moodle18/admin/roles/assign.php?userid=0&courseid=3&contextid=34&roleid=7">Authenticated user</option>
<option value="http://localhost:8888/moodle18/admin/roles/assign.php?userid=0&courseid=3&contextid=34&roleid=10">Ruolo dei produttori</option>
<option value="http://localhost:8888/moodle18/admin/roles/assign.php?userid=0&courseid=3&contextid=34&roleid=11">Ruolo dei CAV</option>
</select>
What I would point out is that in each item of the <select> I can only read the name of the role BUT NOT THE NUMEBER OF USER belonging to each role.
Step 2.
On the opposite
If I divide my students into "groups" in the page:
moodle18/group/index.php?id=xx, for instance
what I get is a select in which for each group I can also read the number of users belonging to each group.
To let you understand, what I get is:
<select name="group" id="groups" size="15" class="select" onchange="membersCombo.refreshMembers(this.options[this.selectedIndex].value);"
onclick="window.status=this.options[this.selectedIndex].title;" onmouseout="window.status='';">
<option value="1" title="produttori azienda A (1)">produttori azienda A (1)</option>
<option value="2" title="produttori azienda B (1)">produttori azienda B (1)</option>
</select>
Step 3.
What I ask is to have in the select of the step 1 the number of user belonging to each role.
This
<option value="http://localhost:8888/moodle18/admin/roles/assign.php?userid=0&courseid=3&contextid=34&roleid=2" selected="selected">Course creator (3)</option>
instead of
<option value="http://localhost:8888/moodle18/admin/roles/assign.php?userid=0&courseid=3&contextid=34&roleid=2" selected="selected">Course creator</option>
Sorry for a so long story for a so silly request.
Ciao.