Permalink
Browse files

Fixed a bug in report counting

  • Loading branch information...
1 parent b361853 commit 9a62345785b48247a04b4bd80579b95270a84359 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 9a62345

Please sign in to comment.