mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 18:36:42 +02:00
MDL-25708 recordsets - fix admin dir uses
This commit is contained in:
parent
8cdc85ac62
commit
755d2c74f6
6 changed files with 63 additions and 69 deletions
|
@ -25,15 +25,14 @@ if (empty($CFG->messaging)) {
|
|||
|
||||
if ($confirm and !empty($msg) and confirm_sesskey()) {
|
||||
list($in, $params) = $DB->get_in_or_equal($SESSION->bulk_users);
|
||||
if ($rs = $DB->get_recordset_select('user', "id $in", $params)) {
|
||||
foreach ($rs as $user) {
|
||||
//TODO we should probably support all text formats here or only FORMAT_MOODLE
|
||||
//For now bulk messaging is still using the html editor and its supplying html
|
||||
//so we have to use html format for it to be displayed correctly
|
||||
message_post_message($USER, $user, $msg, FORMAT_HTML, 'direct');
|
||||
}
|
||||
$rs->close();
|
||||
$rs = $DB->get_recordset_select('user', "id $in", $params);
|
||||
foreach ($rs as $user) {
|
||||
//TODO we should probably support all text formats here or only FORMAT_MOODLE
|
||||
//For now bulk messaging is still using the html editor and its supplying html
|
||||
//so we have to use html format for it to be displayed correctly
|
||||
message_post_message($USER, $user, $msg, FORMAT_HTML, 'direct');
|
||||
}
|
||||
$rs->close();
|
||||
redirect($return);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue