-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
-
2.3
-
MOODLE_23_STABLE
(This is related to MDL-30577, the solution to which seems to have been to always set cmi.mode to "normal" to appease the test suite. The DMI test package mentioned there doesn't seem to work in Chrome)
When a student loads a completed attempt, the player page displays a "Review mode" header just above the SCO frame. The decision to switch to review mode is being made in player.php, separately from the logic used by loaddatamodel.php, so cmi.mode is still "normal".
To reproduce:
I've created a minimal SCORM 2004-4th object to demonstrate the problem at http://somethingorotherwhatever.com/cmi-mode-test.zip. It just initialises the SCORM API, displays the value of cmi.mode, then marks the attempt as completed.
Upload it to Moodle, using the default settings.
Enter the SCORM object once, and click "Exit activity".
Enter it again, with "start a new attempt" unchecked. A line saying "Review mode" is shown above the SCO iframe, but the SCO says "cmi.mode is set to normal". I expected it to say "cmi.mode is set to review".
The solution to this might involve changing player.php so it can't decide by fiat to change to review mode. The only consequence of it setting $mode = "review" seems to be that the div containing the string "Review mode" is displayed. Preferably, if a user tries to load player.php to open a completed attempt in normal mode, they should be shown an error message and directed back to the entry page. The decision to use review mode should be made in the entry page, so mode=normal is sent in the form data to player.php.
I've had a go at doing this myself, but the SCORM module is such a mess that I gave up.