Admin setting for stats: ranked courses get userthreshold

This commit is contained in:
mjollnir_
2005-11-03 22:45:35 +00:00
parent ce4a0f541f
commit 7b89e1898f
3 changed files with 7 additions and 1 deletions
+3
View File
@@ -583,6 +583,9 @@ function stats_get_parameters($time,$report,$courseid,$mode) {
$param->fields = 'max(students+teachers) as line1,max(activestudents+activeteachers) AS line2,'
.'max(activestudents+activeteachers)'.$real.'/max(students+teachers)'.$real.' AS line3';
$param->extras = 'HAVING max(students+teachers) != 0';
if (!empty($CFG->statsuserthreshold) && is_numeric($CFG->statsuserthreshold)) {
$param->extras .= ' AND max(students+teachers) > '.$CFG->statsuserthreshold;
}
$param->orderby = 'line3 DESC';
$param->line1 = get_string('users');
$param->line2 = get_string('activeusers');