Skip to content
Browse files

Fixed a bug in report counting

  • Loading branch information...
1 parent 644b562 commit 79714e2af32a69ad334dfb298c2198c3f60672cd bobopinna committed Jul 3, 2005
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>';

0 comments on commit 79714e2

Please sign in to comment.
Something went wrong with that request. Please try again.