-
Bug
-
Resolution: Won't Do
-
Minor
-
2.7
This bug appears the same as MDL-36855, but it is caused by a different problem, and a different SCORM package.
To reproduce:
- Create a SCORM activity with the attached SCORM package.
- Enter the SCORM in Normal mode.
- Click on "q2" and answer two of the three questions.
- Go to the SCORM's reports page and select Interactions report.
The errors look similar to this:
Notice: Undefined offset: 13 in /home/nathanl/sites/moodle/lib/tablelib.php on line 1057
I tracked down the problem. It is in mod/scorm/report/interactions/report.php -> scorm_interactions_report class -> display function. The column headers ($columns) are calculated as:
- Regular columns (everything down to and including "score").
- SCO grades (one per SCO where [$sco->launch != ''], the test SCORM contains 3).
- Question columns (for all questions in the SCORM?)
Each data row ($row) is calculated as follows: - Add regular columns (down to "score")
- For each SCO where [$sco->launch != '']:
- If "trackdata" exists then add one column for the SCO and one column for each question.
- Otherwise, add columns until the row has been filled.
The problem occurs when a SCO with no "trackdata" (which fills the row until full) is followed by one which has a value (which adds one or more columns, overflowing the row). There is also be a problem if two SCOs with "trackdata" exist, as both will add one column for each question (I think).