Merge branch 'MDL-39365-master' of git://github.com/ankitagarwal/moodle

This commit is contained in:
Sam Hemelryk
2013-04-30 09:36:50 +12:00
+2 -2
View File
@@ -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;