Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed a bug in report counting

  • Loading branch information...
commit 9a62345785b48247a04b4bd80579b95270a84359 1 parent b361853
bobopinna authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  mod/scorm/view.php
View
3  mod/scorm/view.php
@@ -64,7 +64,8 @@
'', '', true, update_module_button($cm->id, $course->id, $strscorm), navmenu($course, $cm));
if (isteacher($course->id)) {
- if ($trackedusers = get_record('scorm_scoes_track', 'scormid', $scorm->id, '', '', '', '', 'count(distinct(userid)) as c')) {
+ $trackedusers = get_record('scorm_scoes_track', 'scormid', $scorm->id, '', '', '', '', 'count(distinct(userid)) as c');
+ if ($trackedusers->c > 0) {
echo "<div class=\"reportlink\"><a target=\"{$CFG->framename}\" href=\"report.php?id=$cm->id\">".get_string('viewallreports','scorm',$trackedusers->c).'</a></div>';
} else {
echo '<div class="reportlink">'.get_string('noreports','scorm').'</div>';
Please sign in to comment.
Something went wrong with that request. Please try again.