Interlinked nodes in SCROM

This topic contains 7 respuestas, has 3 voices, and was last updated by  Ignacio Gros Hace 8 años, 10 meses.

  • Author
    Entradas
  • #21089

    alrotem
    Member

    Hi,

    In a free-text iDevice, when I insert/edit link, I get an option to link to a specific node of the course (a different topic).

    This works when I preview the course as HTML, but when I export it to SCROM, those links get lost (in the generated index.html file, those links are completely stripped).

    Why is that? And is there a way to keep those links?

    Thank you!

    Alon.

  • #21093

    Anónimo

    Hi Alon:

    This post will be probably a little bit long… 🙁

    SCORM standard allows different ways to do the packages. A SCORM package is composed of one or many SCO-s and each SCO could have one or many pages. A SCO is the indivisible unit of the package, and a SCORM management software can do a rearrange of SCO-s from different SCORM packages. The aim of the standard was to allow the exchange of contents and remixing them as we would do in a mecano or a puzzle. That’s why when eXeLearning project faced the SCORM export, the developers decided to create a SCO for each page.

    This decision has some advantages:

    • The exported material can be rearranged outside eXeLearning in a SCORM management tool (i.e.: Agrega).
    • Each page has its own calification, and the overall calification method (average, maximum, …) can be decided in the LMS.

    But it has a disadvantage: the standard does not allow links to elements outside the SCO, because due to the nature of the standard, there is no guarantee that the element is still there. The only allowed links are inside the SCO (remember: in eXe each page is exported as a separated SCO). That’s why the links are removed from the content in both SCORM exports. In fact, if they where not removed they would cause problems (at least in Moodle) because each sco is encapsulated in a page in the SCORM viewer with a different URL (the real URL of the element is given when it is published)

    This problem could be solved creating a new option in SCORM export. The user could choose between two options: single sco or multiple scos. The single sco export needs many changes in the code and it affects other features of SCORM standard: the score and the interactions. These changes could be added to the roadmap, but it would be great if we could have more developers.

    Meanwhile, you could do some tests in your LMS. Have you published a test package with the links? I add to this message a sample .elp with two pages and links between them. I also add the SCORM generated by exe and a modified pakage with the links. You can publish the last one in your LMS and see how it behaves. Depending on that, we could think in some kind of trick to preserve the links.

  • #21098

    alrotem
    Member

    Hi José,

    First I must say, I am new to the world of LMS standards, new to eXeLearning and new to SCROM. This forum is awesome. Your replies are detailed and very well explained. I am learning a lot here. If I had the time, I would have loved to lend a hand and join the developers who are working on eXe.

    As for the packages:

    The LMS I’m testing is NetDimensions Talent Suite.

    • The first project (test_links.elp) and its exported package (test_links.zip) did not work, as their links were completely stripped.
    • The modified package (test_links_modified.zip) had the links and they did switch between pages.

    But there’s a catch:

    The LMS loads the topic pages in a frameset. Navigation is controlled by links in the top frame (< previus / next >) and in the left side frame (a tree).

    When I switch pages by clicking those built-in LMS links in the navigation frames, the entire top page reloads, and the LMS records the course progress according to SCROM API calls which were made.

    If I use the links in the pages you placed in the test_links_modified package, the page in the internal frame changes, but the LMS does not know that the frame has changed, thus the navigation tree does not reflect it, nor the LMS progress tracking.

    I am thinking about a hacky solution here:

    I think I will probably put something like <span class=”internalLink” refPageTitle=”Page 1″>link text</span>, where the internalLink CSS class obviously makes it look like a hyperlink, then when the page loads I can use one of 2 options:

    • Either I will look up the right href from the nav tree, and replace the element with a proper <a target=”_top”>…</a> 
    • Or will have the script handle the click on the .internalLink span and trigger a click on the proper treenode instead.

    This should be easy to automate, though it’s quite hacky, I am a great believe in hacks 🙂

    I wouldn’t mind sharing my (jQuery assisted) script either, if you’d like.

    Again, thank you for taking your time and giving such a helpful insightful answer every time!

    Alon Rotem.

  • #21099

    Anónimo

    Hi Alon:

    I think NetDimensions behaves very similar to Moodle. It would be great if share your trick. If you need to include the script in the content, may be the easiest way is to include the required .js files in your style and you can  include the script tag in the config.xml file of your style.

    I attach the other mentioned option: a maually generated single-sco version of the package. It is just a website export and a manifest with a sinlge node. All the links work fine (the links generated by exe in the navigation menu and the manually generated ones) but it does not have the SCORM API because it must be adaptd to a single-sco logic (interactions, grade, …).

    Good luck and please share your scripts. 🙂

  • #21104

    alrotem
    Member

    Hi José,

    Here’s my workaround, which did the trick pretty well.

    Step 1: Hinting the users

    I could have gone further than this, if I had the time to put into it, but the easiest way I thought of, to hint the users how to isert internal links, is by adding a hint on their HTML editor window (see attached Editor-hints.png).

    To achive this, I added the following lines to \scripts\tinymce_3.5.7\jscripts\tiny_mce\themes\advanced\skins\default\dialog.css: form[name="source"] .title:after {    content: "\A Hint: \A ■ Add <span class=\"internalLink\" refPageTitle=\"{page title}\">Link text</span> to create an internal link\A\A";    color: black;    font-weight: 100;    font-size: 10px; } #htmlSource {    height: 475px !important; }

    This way, in order to insert an internal link, you should use this element: <span class="internalLink" refPageTitle="{page title}">{Link text}</span> Where class=”internalLink” is a must and the {Link text} can be anything. If {Link text} matches a title of a lesson, it will get automatically resolved to that lesson. If {Link text} does not match a title of a lesson, the attribute refPageTitle=”{page title}” must be used and it should contain the title of the referred lesson.

    Step 2: Style changes

    I have already created my own style (don’t remember which style it was based on, but it had already the _em_js.js script in it, as well as content.css and nav.css. I have already customized it by adding yet another JS to it.

    In terms of design, in content.css I added the following styles: .exe-authoring-page .internalLink {    color: #0063dc;    cursor: pointer; } .exe-authoring-page .internalLink:hover {    text-decoration: underline; } #tinymce .internalLink {    color: #0063dc;    cursor: pointer; } .internalLink {    color: #0063dc;    cursor: pointer; } .internalLink:hover {    text-decoration: underline; }#tinymce .internalLink:hover {   text-decoration: underline; } This way, the fake links look like any other links (the color and no decoration – unless hovered – corresponds with the design of my other links). Adding the .exe-authoring-page and #tinymcs ensures that the fake links look like real ones also in the editor.

    Step 3: Links resolution

    This is the javascript function that handles the internal links. What it does:

    1. Tries to find the navigation tree in the left frame (perhaps this is different in moodle).
    2. Goes through each element in the lesson content with class internalLink
    3. If the internalLink element has the attribute refPageTitle, its value is used. Otherwise the element’s text is taken.
    4. A link with matching text is searched for in the navigation tree (if the navigation tree was found in the first place) and its href is retrieved.
    5. if a proper href was found, the current internalLink element is replaced with a real <a/> hyperlink
    6. If no proper href was found, the current element is removed the internalLink class, thus it renders as plain text.

    function handleInternalLinks() {  var treeLinks = null;  if(window.top.frames.length > 0) {    treeLinks = $("#tree", window.top.frames[0].document).find("li a");    if(treeLinks.length == 0)      treeLinks = null;  }  $(".internalLink").each(function() {     var linkText = $(this).text();    var linkRefPageTitle = $(this).attr("refPageTitle");    if(!linkRefPageTitle)      linkRefPageTitle = linkText;    var foundLink = (treeLinks != null);    if(treeLinks) {      var matchingTreeLinks = treeLinks.filter (function() { return $(this).text() == linkRefPageTitle });      if(matchingTreeLinks.length > 0) {        var href = $(matchingTreeLinks[0]).attr("href");        if(href) {          $(this).replaceWith("<a href=\"" + href + "\" target=\"_top\">" + linkText + "</a>");        }        else           foundLink = false;      }      else        foundLink = false;    }    if(!foundLink) {      $(this).removeClass("internalLink");    }  });} The above method is of course invoked from the load method, in the same js file: $(document).ready(function() {  $(window).load(function (){    handleInternalLinks();  });});

    I hope this helps 🙂 Let me know if you need more info. Again, thank you for all your help!

    Alon.

    Archivos adjuntos:
    You must be logged in to view attached files.
  • #21109

    Ignacio Gros
    Keymaster

    Hi, Alon.

    Thanks a lot for your code.

    That can work, but each LMS will have a different HTML, and the LMS should be the one in charge of the navigation. That’s why I think that It shouldn’t be part of eXe.

    Some suggestions:

    • You could add that code to your Style’s JS file (use the new EXTRA-HEAD or EXTRA-BODY options of the config.xml file).
    • Maybe you could use a real link instead of a SPAN that looks like a link to improve the accessibility (to allow keyboard navigation).

    Thanks again.

  • #21110

    alrotem
    Member

    Thanks for the tips, Ignacio!

    First, the JS was indeed added to my EXTRA-BODY xml of the eXe style. This is how I embedded it.

    In terms of navigation, the LMS is in charge of it. I just retieve the real links to the other lessons from the side bar (a frame, in the case of NetDimensions Talent Suite). I guess in other LMSs the navigation may be not in a frame. In any case, this is the solution that worked on mine, in terms of layout.

    Using real links is tricky, because eXe may want to strip them off when packing SCOs. That’s why I chose <span>. so that if I cannot resolve a link, all I do is remove the class, and it just becomes plain-text immediately.

    Alon.

  • #21111

    Ignacio Gros
    Keymaster

    OK. It’s good to know that those options are already being used.

    Thanks, Alon!

You must be logged in to reply to this topic.