Permalink
Browse files

MDL-39365 scorm reports: Return correct track count

  • Loading branch information...
1 parent dd8e2dd commit e1aaddef666ec83bf49601b794dcc231e1844c74 @ankitagarwal ankitagarwal committed Apr 29, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/scorm/report/reportlib.php
@@ -69,14 +69,14 @@ function get_scorm_question_count($scormid) {
$rs = $DB->get_recordset_select("scorm_scoes_track", $select, $params, 'element');
$keywords = array("cmi.interactions_", ".id");
if ($rs->valid()) {
- // Done as interactions start at 0 (do only if we have something to report).
- $count++;
foreach ($rs as $record) {
$num = trim(str_ireplace($keywords, '', $record->element));
if (is_numeric($num) && $num > $count) {
$count = $num;
}
}
+ // Done as interactions start at 0 (do only if we have something to report).
+ $count++;
}
$rs->close(); // closing recordset
return $count;

0 comments on commit e1aadde

Please sign in to comment.