override / change scorm player page layout?

override / change scorm player page layout?

by tim st.clair -
Number of replies: 5
Picture of Plugin developers

here's the html markup of a scorm package page:

here's the markup I'd like:

reasoning:

we don't use scorm 2004 on Moodle, since a) it's not implemented properly and is basically dropped or permanently on hold, and b) since scorm 1.2 doesn't support multi scos, there's no point to having a navigation bar for a single item. so why is it there?

Is there a renderer that I can over-ride in my theme to ditch the pointless YUI split box / navigator altogether? I'm currently hiding a bunch of crap using CSS but I can't see the point of adding so much html weight to these pages, when my target audience is 3G-using tablet owners. Less = faster, and all that.

Average of ratings: -
In reply to tim st.clair

Re: override / change scorm player page layout?

by tim st.clair -
Picture of Plugin developers

Damn, i thought i had it licked. changed a single boolean inside /mod/scorm/module.js

M.mod_scorm.init = function(Y, hide_nav, hide_toc, toc_title, window_name, launch_sco, scoes_nav) {
var scorm_disable_toc = true; // default:false

But nope, still a truckton of useless layout garbage:

Looks like its time to trash module.js and write it from scratch. I'll keep my iframe fix code - no more bug-riddled <object> tag!

In reply to tim st.clair

Re: override / change scorm player page layout?

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Tim,
a couple of thoughts:

  1. SCORM 1.2 IS designed to support multiple SCOes as well as AICC: SCORM 2004 has added the so called "Simple Sequencing" derived from IMSSS and modified to address the use cases in the SCORM application profile; "simple" was the name but COMPLEX was the implementation/adoption and the ability to get full advantages from it. The real-life issues - i.e. adopting, the instructional designers, a simplified pedagogical model as well as lowering the "reusing-a-SCO" capabilities - for the common usage of SCORM 1.2 vs SCORM 1.3 (yes, 2004 is 1.3) is not in the packaging capabilities - SCORM 1.2 prerequisites seem to be enough for scoping the access to a SCO - but in the Data Model having the SCORM 2004 data types more room for content data;
  2. You can disable the TOC by means of the SCORM Activity settings even if it will not cleanup HTML things as per your wishes. Please note that if you change module.js - this is valid for any Moodle activity - you are required to perform the following two steps in order to let your ecosystem pick up the changes: purge the JS cache issueing e.g. rm $CFG->dataroot/cache/js/* AND clean up your browser cache, otherwise your browser will always use the old version of the minified module.js file, w/o your modifications.

Besides, FYI: http://docs.moodle.org/dev/GSOC/2013#SCORM_player_rewrite

HTH,
Matteo

P.S.: why not posting SCORM related questions into the related Forum? There you'll have the chance to get in touch with Developers with SCORM experience and we've always the chance to contact Moodle JS gurus in case of issues with JS too wink.

In reply to Matteo Scaramuccia

Re: override / change scorm player page layout?

by tim st.clair -
Picture of Plugin developers

Ok, well I just learned something new about 1.2.

Also, just tinkering with the module.js code now. Here's how I have it, and it's good enough for all the content we ever have produced.

M.mod_scorm.init = function(Y, hide_nav, hide_toc, toc_title, window_name, launch_sco, scoes_nav) {

scoes_nav = Y.JSON.parse(scoes_nav);

var title = scoes_nav[launch_sco].url;
var el_scorm_api = document.getElementById("external-scormapi");
var pel_scorm_api = document.getElementById('scormapi-parent');
var api_url = M.cfg.wwwroot + '/mod/scorm/loaddatamodel.php?' + title;
var obj = document.createElement('iframe');

el_scorm_api.parentNode.removeChild(el_scorm_api);
el_scorm_api = document.createElement('script');
el_scorm_api.setAttribute('id','external-scormapi');
el_scorm_api.setAttribute('type','text/javascript');
pel_scorm_api.appendChild(el_scorm_api);
document.getElementById('external-scormapi').src = api_url;

obj.setAttribute('id','scorm_object');
obj.setAttribute('src', M.cfg.wwwroot + '/mod/scorm/loadSCO.php?' + title);
obj.setAttribute('width','100%'); //
obj.setAttribute('height',scormplayerdata.cheight); // set as popup, store values, set back to embed; settable height!
obj.setAttribute('frameborder','false');
obj.setAttribute('allowtransparency','true');

document.getElementById("toctree").appendChild(obj);

}

In reply to tim st.clair

Re: override / change scorm player page layout?

by Jeff Coleman -

Hi Tim,

Will this allow me to remove the frame (the template border)?  I would like to get rid of that and display the SCORM content/player only as the frame takes up unnecessary space.

 

thanks

Jeff

Attachment frame shot.PNG
In reply to Jeff Coleman

Re: override / change scorm player page layout?

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

some of that might actually be coming from your custom theme - try switching to the standard theme to see the difference it makes.

part of the header there is semi-important - the bit that displays "preview mode" - if you enter the SCORM normally that part of the header should be removed too.