MDL-47835 block_recent_activity: Same entry keys order

insert_records() is sensitive to the order of the keys
assigned to the inserted objects (inserted as arrays in
this case). Now keys are assigned using the same order.
This commit is contained in:
David Monllao 2014-10-27 15:40:39 +08:00
parent 32a69a7d7a
commit 3c26a30799

View File

@ -294,12 +294,12 @@ class block_recent_activity extends block_base {
if (!isset($modinfo->instances[$modname][$instanceid])) {
continue;
}
$entry['cmid'] = $modinfo->instances[$modname][$instanceid]->id;
if ($log->action == 'add mod') {
$entry['action'] = 0;
} else {
$entry['action'] = 1;
}
$entry['cmid'] = $modinfo->instances[$modname][$instanceid]->id;
}
$entries[] = $entry;
}