SCORM player rewrite

Jump to: navigation, search

Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on or use the page comments.

SCORM player rewrite
Project state Coding Period
Tracker issue MDL-39910
Discussion XXX
Assignee Mayank Gupta

GSOC '13


The project aims at rewriting the current implementation of the SCORM player which uses Yahoo! User Interface Library 2. This will be achieved by updating the YUI2 code of the SCORM player to YUI3. Additionally, this project will also develop a new HTML5 player to deliver SCORM contents. This would inherently help in delivering SCORM content not only on the Desktop/Laptop browser but also on Mobile devices like iPhone, Android devices and tablets like iPad, etc.

This project will add option in SCORM settings to deliver SCORM package through new HTML5 player. If time permits, code will be added to detect HTML5 support in browser and auto switch to the HTML5 player. This would also help in providing SCORM support in the HTML5 Moodle Mobile application.

Thus the benefits of the projects are two fold -

1. Improve the current SCORM player by updating the YUI2 to code to YUI3.

2. To add a new HTML5 SCORM player to SCORM module.

Implementation Details

The current SCORM player in Moodle makes use of YUI2. Yahoo has released a new version 3 of the Yahoo! User Interface Library. YUI2 use Connection Manager to make in-page HTTP requests through a simplified interface to the XMLHttpRequest object. This has been replaced by IO Utility in YUI3. The IO family of modules provide a simple API for requesting resources over HTTP and HTTPS. The current SCORM player also uses the following from the YUI2 library - yui2-resize, yui2-dragdrop, yui2-container, yui2-button, yui2-layout, yui2-treeview, yui2-json, yui2-event.

Of the above yui2-treeview is used to render the Table of Contents (TOC) of the SCORM content package. The TOC allows the users to navigate within the SCORM content. SCORM 2004 lays down standards for Sequencing Navigation that enables the content developers to control how a student can navigate within the SCORM content. The treeview implementation of YUI library thus also helps to enable/disable the particular nodes /leaves of the tree - the TOC. The rendering of the SCORM content and TOC object is computed using scorm/player.php. This file generates the HTML unordered list that is parsed by the YUI2 treeview code in scorm/module.js to generate the TOC. The project will involve rewriting this YUI2 code in module.js to YUI3 using the YUI3 treeview or better known as gallery-yui3 treeview as the major part.

Along with other parts of the YUI2 codes that need to be re-written are the navigation buttons that are enabled/disabled in accordance with the TOC of the SCORM content. After the YUI2 code has been written, some valuable amount of time in the project needs to be used in detect and fix any regression issues that would have creeped in during the rewrite. These regressions issues would be detected using the SCORM test harness. Also, this should also fix some of the SCORM 2004 Sequencing and Navigation bugs, which are currently not possible to fix because of the current YUI2 code. The second part of the project involves adding a new HTML5 player for SCORM module. This HTML5 player can be used to deliver SCORM content by users who prefer to use the HTML5 player or where the current players renders to be non-working at times - Mobile devices and tablets. This would be basically implemented as an optional player that would either be turned-on by the administrator or when Moodle is being accessed on a Mobile device or tablet. This would help increase the usability playability of SCORM content in Moodle on such devices. Thus, this would be a boon for the users who have complained about Moodle SCORM player unable to render SCORM content on a mobile device or tablet correctly.

1. In file mod/scorm/datamodels/aicc.js.php, there is code to make in-page HTTP requests using Connection manager. This has to be replaced by IO utility of YUI 3.

2. In mod/scorm/datamodels/module.js, various components of YUI 2 – Resize, Drag and drop, Container, Button, Layout, Treeview, JSON, Event will be replaced by their corresponding code in YUI 3. Container will be replaced by Overlay of YUI 3.

3. Similar to aicc.js.php, scorm_13.js.php also makes requests using Connection manager of YUI 2 which will be replaced by IO utility.


June 1 - June 9 : Get more familiar with YUI3 library in particular YUI3 treeview, YUI3 drag drop, YUI3 button, YUI3 layout, YUI3 event and YUI3 JSON

June 10 - June 16: Discuss with mentor in detail the implementation of the HTML5 player for SCORM content, essentially, the feature list (based on community feedback), implementation

[Coding Period]

June 17 - June 19: Create mockups for the new HTML5 player(UI). Post on Moodle community forums and ask for feedback.

June 20 - June 27: Make the required changes in scorm/player.php to facilitate the rewrite of YUI2 to YUI3.?June 21 - July 7 ~ 2 weeks: Rewrite the code for YUI2 treeview to YUI3 treeview and essentially change other components of YUI2 to YUI3

July 16 - July 27: Check for regression issues and fix issues if any.

[Midterm Evaluation] This will be the midterm evaluation target - Complete rewrite of SCORM player of YUI2 to YUI3, report regression issues if any.

July 29 - August 5: Fix regression issues and facilitate improvement for SCORM 2004 sequencing.

August 7 - Aug 14: Add option in SCORM administration for switching over to HTML5 player and/or detect support for HTML5 in mobile device and switch automatically.

August 15 - 30: Write code for the new HTML5 player in scorm/player.php which gets executed on the options set by the Administrator, also write/re-use code that would update SCORM progress as in current SCORM player.

August 31 - Sept 6: Implement navigation controls, TOC and other features for the HTML5 scorm player.

Sept 7 - 14: Thoroughly test the HTML5 player for SCORM 1.2 content playback and also if possible for SCORM 2004 using SCORM Test Harness.

Sept 15 - Sept 16: Write documentation for the new HTML5 player for SCORM.

Sept 17 - Sept 23: This is the buffer period, it will be used to resolve any unexpected issues, add/edit documentation, scrub code. Code ready for submitting.

Would be a nice task: If time permits the project can be extended to solve some Sequencing Navigation bugs for SCORM 2004 using the new YUI3 implementation.

[Firm Pencils Down]

See also