-
Bug
-
Resolution: Fixed
-
Minor
-
3.11.7, 3.11.10, 4.0 regressions, 4.0.1, 4.0.4
-
MOODLE_311_STABLE, MOODLE_400_STABLE
-
MOODLE_400_STABLE, MOODLE_401_STABLE
-
MDL-74454-master -
Easy
-
Hi.
Bugs have been detected and fixed in SCORM module 1.2 (module.js). Tested in Moodle versions 3.9, 3.11, 4.0.1 and in Edge/Firefox/Chrome.
The problems were:
- the impossibility to navigate using the navigation buttons when the SCORM had three or more levels.
- As a consequence of the previous navigation problem, the scores of the activities located in the nodes involved were not stored correctly.
- The navigation menu disappeared when the SCORM was opened in an external window.
I speak in the past because we have already solved it. I attach the following files:
- Two test SCORM with 4 and 7 levels and scored quizzes
-Explanatory videos of the problem and the solution. - Solved module.JS file.
I would like the responsible to test it to start passing it to GIT.
Thanks in advance.
Pablo.
Â
_________________________________________________________________________________________
This is a more detailed description of the causes of those problems:
First problem: When clicking on navigation buttons, the tree collapses which makes some of its nodes, the ones higher than two level, disappear from the view but also from the DOM. As the navigation is based, in part, on checking the existence of these elements and their "relatives" in DOM and, in part, in checking the value of scoes_nav stored properties for these elements, when trying to access them, in one place they exist and in another they do not and an error is generated.
- Second problem: Some of the scoes_nav object properties that represent nodes that have siblings, do not have correctly assigned values for the prevsibling and nextsibling variables that store the previous and next sibling ID, respectively. Â As the navigation functions are designed, with two levels there is no problem, but when adding a third level, clicking on the navigation buttons evaluates these properties. As they are not defined, the same function is called again, entering an infinite loop.
- Third problem: The value of the variable that stores the active node, launch_sco is not updated when the functions scorm_next and scorm_next are called to define the state of the navigation buttons.
- Fourth problem: When the scorm resource is set to display in an external window, when clicking on the navigation tree or navigation buttons, the tree simply disappears and navigation fails. This happens because in the connectPrereqCallback success function, the pagecontent variable is assigned a DOM element (page-content or content) that is not defined in the external window. The tree is added to this element when the page is reloaded when browsing. As it does not exist, the tree disappears and the corresponding error is thrown.
Â