Moodle

Capability moodle/course:bulkmessaging controls more than bulk messaging

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.9
  • Fix Version/s: STABLE backlog
  • Component/s: Roles / Access
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE

Description

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) { $displaylist['addnote.php'] = get_string('addnewnote', 'notes'); $displaylist['groupaddnote.php'] = get_string('groupaddnewnote', 'notes'); }

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

Issue Links

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

I wouldn't add one extra capability, but will check for any of the individual conditions in order to draw the menu. Agree about 'moodle/course:bulkmessaging' like not a correct global switch.

Assigning to Petr....ciao

Show
Eloy Lafuente (stronk7) added a comment - I wouldn't add one extra capability, but will check for any of the individual conditions in order to draw the menu. Agree about 'moodle/course:bulkmessaging' like not a correct global switch. Assigning to Petr....ciao
Hide
Eloy Lafuente (stronk7) added a comment -

Assigning bug to one candidate release (can change).

Show
Eloy Lafuente (stronk7) added a comment - Assigning bug to one candidate release (can change).

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: