Merge branch 'MDL-58756_32-statslib-roles-multilang' of https://github.com/lucaboesch/moodle into MOODLE_32_STABLE

This commit is contained in:
Andrew Nicols
2017-05-16 13:53:23 +08:00
+2 -1
View File
@@ -1156,7 +1156,8 @@ function stats_get_parameters($time,$report,$courseid,$mode,$roleid=0) {
case STATS_REPORT_ACTIVITYBYROLE;
$param->fields = 'stat1 AS line1, stat2 AS line2';
$param->stattype = 'activity';
$rolename = $DB->get_field('role','name', array('id'=>$roleid));
$role = $DB->get_record('role', array('id' => $roleid));
$rolename = role_get_name($role, context_course::instance($courseid));
$param->line1 = $rolename . get_string('statsreads');
$param->line2 = $rolename . get_string('statswrites');
if ($courseid == SITEID) {