mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Merge branch 'MDL-36855-master' of git://github.com/ankitagarwal/moodle
This commit is contained in:
commit
5fc4ac8549
@ -68,14 +68,16 @@ function get_scorm_question_count($scormid) {
|
||||
$params[] = "cmi.interactions_%.id";
|
||||
$rs = $DB->get_recordset_select("scorm_scoes_track", $select, $params, 'element');
|
||||
$keywords = array("cmi.interactions_", ".id");
|
||||
foreach ($rs as $record) {
|
||||
$num = trim(str_ireplace($keywords, '', $record->element));
|
||||
if (is_numeric($num) && $num > $count) {
|
||||
$count = $num;
|
||||
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
|
||||
$count++;
|
||||
$rs->close(); // closing recordset
|
||||
return $count;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user