Lost Id's and navigation issues

Lost Id's and navigation issues

by Marc Roze -
Number of replies: 2

Hi everyone,

I'm having some trouble here with the SCORM module , regarding the treeview on the left. Apparently, there a situation when the items lost their id's resulting in a total freak out for the navigation menu (the one with the arrows, not the treeview).

What I do :

- I create a course with Opale 3.4 a derivative of Scenari, an editorial chain (not sure of the term...)

- I export my course in a SCORM package multi SCO (Opale provides it)

- I import it in Moodle 2.6, using the SCORM module everything seems fine, I've got my menu on the left, arrows ont the top and my course in the middle :

 capture1

- Now, when I navigate using the menu on the left, the blank squares from my left menu change to become some filled squares once I visited the page. BUT it's not only the icon that change : the id's of the <li> and <div> do as well. The arrow menu is then completly lost (I can understand it, do I change my id when someone click on me ?) and it self-deactivates.

 capture2

- If I navigate directly with the arrows after loading the SCORM package, it takes me to the second page and refuses to work afterwards.

Oh, and the javascript error of course : TypeError: node is undefined ... (node.children.length && typeof scoes_nav[launch_sco].nextscoid != 'undefined')... Module.js (ligne 416)

Ok I know I could just use the menu on the left and throw the arrows in hell, but hey, that's not fun. I tried some things on my own in Javascript and PHP, but it seems either I'm not that good I thought I was or I'm missing something...

 

Cheers anyway !

Average of ratings: -
In reply to Marc Roze

Re: Lost Id's and navigation issues

by Marc Roze -

For those interested, I looked deeper and found some answers.

Apparently, module.js lost some informations when trying to construct the navigation through the arrows. I just did the work for the "<" and ">" arrows but it's basically just adding a test to see if the object node is undefined when module.js load the arrow menu. It should'nt be undefined so we just grab the informations from the other menu (just concerning the current item in fact) and we can continue to use the arrow menu.See attached file.

Maybe a little rough, but I had also to run a true or false test somewhere to prevent the script to skip one item suring the navigation. Had to be because of my modifications but don't see why. Arf, can't be perfect.

It has to be tested with other SCORM imports, as I just needed the both navigation menu to work with my Scenari packages.