Problem if chapter has no identifierref (but multiple subchapters)

Problem if chapter has no identifierref (but multiple subchapters)

by Hoshy Toshy -
Number of replies: 8

Hello Moodle Community!

I use Moodle 2.2 and a SCORM 1.2 package.
The Package is created by a Software called Docendo.

When i have a structure like this:

1. Chapter 1
2. Chapter 2
   2.1 Chapter 2.1
   2.2 Chapter 2.2
       2.2.1 Chapter 2.2.1
   2.3 Chapter 2.3
3. Chapter 3
...

Docendo creates a package where the imanifest.xml looks like this:

<organizations default="TOC1">
  <organization identifier="TOC1">
    <title>My Course Title</title>
    <item identifier="item1" identifierref="item1">
      <title>Chapter 1</title>
    </item>
    <item identifier="item2a"> <!-- chapter 2 has no identifierref -->
      <title>Chapter 2</title>
      <item identifier="item2b" identifierref="item2"> <!-- content of chapter 2 -->
        <title>Chapter 2</title>
      </item>
      <item identifier="item2-1" identifierref="item2-1">
        <title>Chapter 2.1</title>
      </item>
      <item identifier="item2-2a"> <!-- chapter 2.2 has no identifierref -->
        <title>Chapter 2.2</title>
        <item identifier="item2-2b" identifierref="item2-2"> <!-- content of chapter 2.2 -->
          <title>Chapter 2.2</title>
        </item>
        <item identifier="item2-2-1" identifierref="item2-2-1">
          <title>Chapter 2.2.1</title>
        </item>
      </item>
      <item identifier="item2-3" identifierref="item2-3">
        <title>Chapter 2.3</title>
      </item>
    </item>
    <item identifier="item3" identifierref="item3">
      <title>Chapter 3</title>
    </item>
    ...
  </organization>
</organizations>

This means whenever a chapter has subchapters it does not have an identifierref. Instead it creates a subitem for that chapter that refers to the content. In Moodle those chapters are not selectable in the SCORM navigation since the moodle SCORM player "thinks" there is no content for that item because of the missing identifierref.

Fortunately the subitems are selectable and displayed properly but the navigation buttons are disabled as soon as the player reaches one page before those chapters (in the given example the buttons would be already disabled when viewing the first chapter). This is confusing to the students. Sometimes it make them think "Course is over in the middle of the content".

In the preview SCORM player of Docendo those Chapters are somehow linked to the first child item. Is it possible to do this in Moodle SCORM player, too? Like some kind of a "redirect" or a direct link to the first subitem if an item itself does not have an identifierref?

I wonder if i would be the only one with this problem since the SCORM specifications allow items to have no identifierref. But unfortunately the Moodle SCORM player cannot handle this.

Any suggestions would be much apreciated.

I believe this is only possible by modifying the Moodle SCORM player. Since the package seems to be valid i would not modify the export script of Docendo. Especially because i am not good in Java. Anyway in Docendo a chapters content can be spread over several pages. So it seems to be more dificult than modifiyng the players behaviour. But i have advanced skills in php programming. So if anyone could give me a hint where to start in Moodle this might be very helpful.

Kind regards.

Average of ratings: -
In reply to Hoshy Toshy

Re: Problem if chapter has no identifierref (but multiple subchapters)

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

sounds weird - have you checked with Docendo to see if there is a newer version or a fix to generate valid packages?

If you submitted a patch agains the master/2.4 branch I'd consider including it in core but unfortunately for you we're in the process of rewriting the navigation code in SCORM to improve it for SCORM 2004 so any patch you write won't apply against the new work that is currently underway.

If you're just wanting to make changes to your local install you should look at the messy function scorm_get_toc() in locallib.php - (we're rewriting that heavily in 2.4) - you should also look at the way yui2-treeview is used in mod/scorm/module.js (which is also changing a bit in 2.4)

In reply to Dan Marsden

Re: Problem if chapter has no identifierref (but multiple subchapters)

by Hoshy Toshy -

Thanks for your quick reply.

Well, i contacted the author of Docendo explaining the problem and suggested to use the identifierref of the first subitem as reference for the chapter while the first subitem won't be exported. This should result in a package that can be read by any player.

But the thing is, actually the Docendo SCORM package is valid.
The point is Moodle cannot handle packages where an item in the imsmanifest.xml has no identifierref but subitems.

I dunno why someone would intentionally create a structure where there are "empty" items containg subitems but i just think the player should be prepared for that, since regarding the specifications of the xml schema of the imsmanifest.xml it is possible to do so. It would be nice if you think of that while rewriting the scorm module anyway.

Just my 2 cents.

Meanwhile i will have a look in the mentioned files.

Cheers.

In reply to Hoshy Toshy

Re: Problem if chapter has no identifierref (but multiple subchapters)

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

sorry - I read your post a bit quickly and misunderstood.

The issue you're having is with the Moodle navigation buttons right? - you might want to take a look at the patch on MDL-33106 as it might improve it for you. The rewrite of the navigation stuff that is underway should improve this a lot more too.

In reply to Dan Marsden

Re: Problem if chapter has no identifierref (but multiple subchapters)

by Hoshy Toshy -

Thanks for the link. Sounds exactly what i'm looking for.

Unfortunately it doesn't work properly. First of all this patch seems to require Moodle 2.2.4 minimum to work. (not really a problem, upgrade from 2.2.3 went smoothly smile - unfortunately if have an undefined problem with upgrading to 2.3; some error with reading the database ... that's all i get mixed . anyway, will search in the forums for it)

But this patch fixes my problem only partially. You can jump from item 1 to item 2.1 if item 2 is just some kind of "folder" - wich is exactly what i wanted - but you cannot jump from 2.1 to item 3 sad
The buttons are disabled then.

Anyway, interesting approach to fix this in the javascript instead in the php files. I will have a deeper look into the javascript to find why it is not working for me.

Cheers.

In reply to Hoshy Toshy

Re: Problem if chapter has no identifierref (but multiple subchapters)

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

If you have a SCORM package that you can share that allow us to reproduce your problems - please add it to the Tracker issue I mentioned above - thanks.

In reply to Dan Marsden

Re: Problem if chapter has no identifierref (but multiple subchapters)

by Hoshy Toshy -

I fixed my problems by modifying the javascript (module.js) of the the SCORM player with the help of the patch you mentioned. There were still some issues if a node has no title (wich indicates that there is no content to display) but it works fine now. Except updating of the toc tree after answering questions. But this seems to be another issue and maybe a normal behaviour of the browser since you completely replace the tree in the dom wich means you might lose some references or something else. Couldn't figure it out so i just disabled the lines 237 and 238 in the file datamodels/scorm_12.js.php where the toc tree is reloaded. (problem seems to be somewhere in the /datamodels/callback.js.php)

Until now i had no time to check out the latest changes in moodle 1.4 (couldn't even try 1.3). So i cannot say if these modifications are still neccessary and valueable to anyone else but me.

As soon as i have some time to check out moodle 1.3/1.4 i will (if needed) post some more detailed information about my issues/changes in the tracker.

Cheers.

In reply to Hoshy Toshy

Re: Problem if chapter has no identifierref (but multiple subchapters)

by Ivica Matotek -
Picture of Testers

Hi!


I have the similar problem. In my Moodle 2.3.1 subchapters in SCORM are not working, they are displayed on the navigation but I cannot access to this chapters. Only first chapter us accessable others are not. Navigation buttons are also not working.
English

In Moodle 1.9.17 everything is working without problems. In imsmanifest.xml there are identifierref field in every chapter and subchapter:

<title>Lesson 1 People and places</title>
          <imsss:sequencing>
            <imsss:controlMode flow="true"/>
          </imsss:sequencing>
          <adlnav:presentation>
            <adlnav:navigationInterface>
              <adlnav:hideLMSUI>continue</adlnav:hideLMSUI>
              <adlnav:hideLMSUI>previous</adlnav:hideLMSUI>
            </adlnav:navigationInterface>
          </adlnav:presentation>
        </item>
        <item identifierref="sco_a13" identifier="I_sco_a13">
          <title>Lesson 2 In the family</title>
          <imsss:sequencing>
            <imsss:controlMode flow="true"/>
          </imsss:sequencing>
          <adlnav:presentation>
            <adlnav:navigationInterface>
              <adlnav:hideLMSUI>continue</adlnav:hideLMSUI>
              <adlnav:hideLMSUI>previous</adlnav:hideLMSUI>
            </adlnav:navigationInterface>
          </adlnav:presentation>
        </item>

 

Ivica

In reply to Ivica Matotek

Re: Problem if chapter has no identifierref (but multiple subchapters)

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

SCORM 2004 support is not complete - as we slowly implement certain parts of the SCORM 2004 spec in Moodle your SCORM 2004 packages may interact in different ways. Seq/nav improvements are planned for Moodle 2.4 however SCORM 2004 will still not be completely supported. Only SCORM 1.2 packages are officially supported in Moodle at this stage.

http://docs.moodle.org/23/en/SCORM_FAQ#Supported_Versions