-
Improvement
-
Resolution: Fixed
-
Minor
-
1.9, 3.10.7, 3.11.3
-
MOODLE_19_STABLE, MOODLE_310_STABLE, MOODLE_311_STABLE
-
MOODLE_401_STABLE
-
According to MoodleDocs the capability moodle/course:bulkmessaging "allows a user to bulk send messages to people".
However, looking at the code in user/index.php, lines 640ff (Moodle19beta3):
if ($bulkoperations) {
echo '<br /><div class="buttons">';
echo '<input type="button" onclick="checkall()" value="'.get_string('selectall').'" /> ';
echo '<input type="button" onclick="checknone()" value="'.get_string('deselectall').'" /> ';
$displaylist = array();
$displaylist['messageselect.php'] = get_string('messageselectadd');
if (has_capability('moodle/notes:manage', $context) && $context->id != $frontpagectx->id)
if ($context->id != $frontpagectx->id)
{ $displaylist['extendenrol.php'] = get_string('extendenrol'); $displaylist['groupextendenrol.php'] = get_string('groupextendenrol'); } helpbutton("participantswithselectedusers", get_string("withselectedusers"));
choose_from_menu ($displaylist, "formaction", "", get_string("withselectedusers"), "if(checksubmit(this.form))this.form.submit();", "");
echo '<input type="hidden" name="id" value="'.$course->id.'" />';
echo '<input type="submit" value="' . get_string('ok') . '" />';
echo '</div>';
echo '</div>';
echo '</form>';
}
So if the capability moodle/course:bulkmessaging is set to allowed the drop-down menu "With selected users ..." appears, which contains not only the bulk messaging but also other entries.
So shouldn't it be a capability like "moodle/course:bulkoperations" which allows a user to do bulk operations like send a bulk message, add a note etc, and these operations being controlled by "subcapabilities" like "moodle/course:bulkmessaging", "moodle/notes:manage", ... - i.e. capabilities which control what can be selected in the drop-down menu?
Gisela