From 3c26a3079967a489bc310386aaaf904bfee045e6 Mon Sep 17 00:00:00 2001 From: David Monllao Date: Mon, 27 Oct 2014 15:40:39 +0800 Subject: [PATCH] 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. --- blocks/recent_activity/block_recent_activity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks/recent_activity/block_recent_activity.php b/blocks/recent_activity/block_recent_activity.php index ce9760288e9..6a46c366fa9 100644 --- a/blocks/recent_activity/block_recent_activity.php +++ b/blocks/recent_activity/block_recent_activity.php @@ -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; }