Permalink
Browse files

Fixed report counter

  • Loading branch information...
1 parent 8afadf9 commit 9c28a7c06eacccc86024d771e833987b01d1e90d bobopinna committed May 10, 2005
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/scorm/view.php
View
@@ -66,8 +66,8 @@
"", "", true, update_module_button($cm->id, $course->id, $strscorm), navmenu($course, $cm));
if (isteacher($course->id)) {
- if ($sco_users = count_records_select("scorm_scoes_track", "scormid='$scorm->id' GROUP BY userid", "COUNT(userid)")) {
- echo "<div class=\"reportlink\"><a target=\"{$CFG->framename}\" href=\"report.php?id=$cm->id\">".get_string("viewallreports","scorm",$sco_users)."</a></div>";
+ if ($trackedusers = get_record('scorm_scoes_track', 'scormid', $scorm->id, '', '', '', '', 'count(distinct(userid)) as c')) {
+ 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 9c28a7c

Please sign in to comment.