mirror of
https://github.com/moodle/moodle.git
synced 2025-04-16 14:02:32 +02:00
Merge branch 'master_MDL-33822' of git://github.com/danmarsden/moodle
This commit is contained in:
commit
357f4d8ed7
@ -185,6 +185,7 @@ class scorm_interactions_report extends scorm_default_report {
|
||||
$countsql .= $from.$where;
|
||||
$attempts = $DB->get_records_sql($select.$from.$where, $params);
|
||||
$questioncount = get_scorm_question_count($scorm->id);
|
||||
$nbmaincolumns = count($columns);
|
||||
for($id = 0; $id < $questioncount; $id++) {
|
||||
if ($displayoptions['qtext']) {
|
||||
$columns[] = 'question' . $id;
|
||||
@ -471,9 +472,7 @@ class scorm_interactions_report extends scorm_default_report {
|
||||
$row[] = $score;
|
||||
}
|
||||
// interaction data
|
||||
$i=0;
|
||||
$element='cmi.interactions_'.$i.'.id';
|
||||
while(isset($trackdata->$element)) {
|
||||
for ($i=0; $i < $questioncount; $i++) {
|
||||
if ($displayoptions['qtext']) {
|
||||
$element='cmi.interactions_'.$i.'.id';
|
||||
if (isset($trackdata->$element)) {
|
||||
@ -508,8 +507,6 @@ class scorm_interactions_report extends scorm_default_report {
|
||||
$row[] = ' ';
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
$element = 'cmi.interactions_'.$i.'.id';
|
||||
}
|
||||
//---end of interaction data*/
|
||||
} else {
|
||||
@ -520,6 +517,10 @@ class scorm_interactions_report extends scorm_default_report {
|
||||
} else {
|
||||
$row[] = $strstatus;
|
||||
}
|
||||
// complete the empty cells
|
||||
for ($i=0; $i < count($columns) - $nbmaincolumns; $i++) {
|
||||
$row[] = ' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user