Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed report counter

  • Loading branch information...
commit 9c28a7c06eacccc86024d771e833987b01d1e90d 1 parent 8afadf9
bobopinna authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/scorm/view.php
4 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>";
}
Please sign in to comment.
Something went wrong with that request. Please try again.