mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merge branch 'MDL-48451' of https://github.com/andrewhancox/moodle
This commit is contained in:
commit
b56a046175
@ -117,7 +117,7 @@ if ($uselegacyreader) {
|
||||
$sqllasttime = ", MAX(time) AS lasttime";
|
||||
}
|
||||
$logactionlike = $DB->sql_like('l.action', ':action');
|
||||
$sql = "SELECT cm.id, COUNT('x') AS numviews $sqllasttime
|
||||
$sql = "SELECT cm.id, COUNT('x') AS numviews, COUNT(DISTINCT userid) AS distinctusers $sqllasttime
|
||||
FROM {course_modules} cm
|
||||
JOIN {modules} m
|
||||
ON m.id = cm.module
|
||||
@ -141,7 +141,7 @@ if ($useinternalreader) {
|
||||
if ($showlastaccess) {
|
||||
$sqllasttime = ", MAX(timecreated) AS lasttime";
|
||||
}
|
||||
$sql = "SELECT contextinstanceid as cmid, COUNT('x') AS numviews $sqllasttime
|
||||
$sql = "SELECT contextinstanceid as cmid, COUNT('x') AS numviews, COUNT(DISTINCT userid) AS distinctusers $sqllasttime
|
||||
FROM {" . $logtable . "} l
|
||||
WHERE courseid = :courseid
|
||||
AND anonymous = 0
|
||||
@ -215,7 +215,7 @@ foreach ($modinfo->sections as $sectionnum=>$section) {
|
||||
$numviewscell->attributes['class'] = 'numviews';
|
||||
|
||||
if (!empty($views[$cm->id]->numviews)) {
|
||||
$numviewscell->text = $views[$cm->id]->numviews;
|
||||
$numviewscell->text = get_string('numviews', 'report_outline', $views[$cm->id]);
|
||||
} else {
|
||||
$numviewscell->text = '-';
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ $string['eventactivityreportviewed'] = 'Activity report viewed';
|
||||
$string['eventoutlinereportviewed'] = 'Outline report viewed';
|
||||
$string['neverseen'] = 'Never seen';
|
||||
$string['nologreaderenabled'] = 'No log reader enabled';
|
||||
$string['numviews'] = '{$a->numviews} by {$a->distinctusers} users';
|
||||
$string['outline:view'] = 'View activity report';
|
||||
$string['page-report-outline-x'] = 'Any outline report';
|
||||
$string['page-report-outline-index'] = 'Course outline report';
|
||||
|
Loading…
x
Reference in New Issue
Block a user