mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-33822 SCORM Interactions report - fix formatting of empty cells.
This commit is contained in:
parent
d71b79a406
commit
f007c032be
@ -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;
|
||||
@ -476,9 +477,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)) {
|
||||
@ -513,8 +512,6 @@ class scorm_interactions_report extends scorm_default_report {
|
||||
$row[] = ' ';
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
$element = 'cmi.interactions_'.$i.'.id';
|
||||
}
|
||||
//---end of interaction data*/
|
||||
} else {
|
||||
@ -525,6 +522,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