diff --git a/report/outline/index.php b/report/outline/index.php index 3ce928c7bc8..cd1340392d7 100644 --- a/report/outline/index.php +++ b/report/outline/index.php @@ -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 = '-'; } diff --git a/report/outline/lang/en/report_outline.php b/report/outline/lang/en/report_outline.php index 828e2d9e537..36e44fd8846 100644 --- a/report/outline/lang/en/report_outline.php +++ b/report/outline/lang/en/report_outline.php @@ -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';