Moodle Webservices API SCORM functionality

Moodle Webservices API SCORM functionality

by Phil Nichols -
Number of replies: 15

Hi Everyone, hopefully a simple question? Can I store /retrieve SCORM data via the Moodle Webservices API?

If so where is this documented.

Thanks for any help,

Phil

Average of ratings: -
In reply to Phil Nichols

Re: Moodle Webservices API SCORM functionality

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

There is no existing webservice that allows you to do this - but I'm not sure why/how it would work if you created one either - your other post suggests you want to create a Mobile SCORM app which would be an immense amount of work. You couldn't easily combine the Moodle SCORM code and your Mobile app like this easily. If you had to design it this way you would be better off creating a new module in moodle that had some tables that allowed you to pass back a score/tracking information if required.

If you wanted to use Moodle It would be a lot better to modify the Moodle SCORM player to display nicely in the phones browser - using html5 or similar.

In reply to Dan Marsden

Re: Moodle Webservices API SCORM functionality

by Phil Nichols -

OK thanks, I think modifying the SCORM player might be the best option.

Is there any documentation on this and / or any working examples that might get me started?

FYI all I am really trying to do is create a SCORM course that runs on Moodle  for users to view from a mobile app using their existing Moodle log in.

In reply to Phil Nichols

Re: Moodle Webservices API SCORM functionality

by Phil Nichols -

Do you know how will I be able to log in the user using their existing account so we can save SCORM data to their account?

I presume you can remotely log in users via the Moodle webservice API and then use the SCORM player from then on to render the content? 

In reply to Phil Nichols

Re: Moodle Webservices API SCORM functionality

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

Wishful thinking there! - The SCORM code is a bit of a mess in some parts, I'd suggest you start by looking at mod/scorm/player.php - the player was rewritten in Moodle 2 to use some YUI Treeview stuff so it's a lot better than it was but it could still do with a lot more work - the main work is done in player.php and it loads the content from the SCORM package in an iframe/object within the player.php window.

One of the barriers you might run into is that a lot of SCORM packages are authored/exported in flash - there's not much you can do about that inside moodle - you can't convert the flash package to an html5 one - many SCORM authoring tools now allow export using html5 though.

good luck - let us know how you go!

In reply to Dan Marsden

Re: Moodle Webservices API SCORM functionality

by Phil Nichols -

Hi, I will have total control over my SCORM package, I am building it in HTML5 and exporting as a mobile app using PhoneGap so there will be no Flash. I simply wish to communicate with an existing Moodle instance remotely from a purpose built smartphone app? 

All I wish to do is log the user in and then save and retrieve SCORM data as easily as possible? Can I log users in using the Moodle webservices API?

In reply to Phil Nichols

Re: Moodle Webservices API SCORM functionality

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

you should really look at some of the existing webservices code and documentation.

SCORM in Moodle is designed to be managed from within Moodle - not managed externally - you can't have an external SCORM player and then try to communicate with the Moodle SCORM API - the SCORM package must sit within Moodle.

Exporting your package as html5 and then exporting that package as a mobile app is unlikely to result in a SCORM package at all - you're likely to end up with some form of "static content" - you can't then get your external phonegap "package" to communicate with Moodle - at least not without modifying core code.

Good luck with your project.

In reply to Phil Nichols

Re: Moodle Webservices API SCORM functionality

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

I wouldn't re-invent the wheel either - HQ are working on an HTML5 app for Moodle already:

http://moodle.org/mod/forum/discuss.php?d=206758

I'd just work on making the SCORM player work in HTML5 so that the official app works ok.

In reply to Dan Marsden

Re: Moodle Webservices API SCORM functionality

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

Hi Phil,
following Dan's approach, a big improvement for the SCORM activity in Moodle would be the implementation of Tin Can API, "a web service that allows for statements of experience (typically learning experiences, but they could be anything) to be delivered to and stored securely in a Learning Record Store"... just what you're searching for wink.

This approach will improve the SCORM activity with a standard Web Service, missing just the creation of the activity itself which consists of the package upload plus the activity creation (see the DnD feature for an example of the process).

It's some time (few months) that I'm thinking at it (upload too) but lacking of spare time gives me no opportunity to start at least evaluating the effort for coding it.

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: Moodle Webservices API SCORM functionality

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

Thanks Matteo - I'd actually prefer to see Tin Can as a separate module rather than trying to build it into the mess that is the SCORM module... I'd like to see a clean/tidy module dedicated to providing Tin Can support - I've been bouncing it round a few of our clients to see if anyone is keen on funding the work too but if anyone wants to volunteer their time to get started on it that would be great!

In reply to Dan Marsden

Re: Moodle Webservices API SCORM functionality

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

Hi Dan,
OK: if you'll open a Tracker task/improvement about it please add me as watcher to let me be aligned with the roadmap, you know I'll try to do my best in my spare time wink.

BTW, it is actually a nice feature to be implemented: not sure about decoupling it from SCORM since though open to any data model it will requires kind of data validation as well as reporting, something that could be at least shared with the SCORM activity, with a "<bit of>/<big>" refactoring. Need time to focus&analyze pro and cons: the first con is that Tin Can is more open than SCORM to a generic Learning Experience and a specific activity will help Teachers in distinguish between delivering a generic Learning Experience vs a specific Learning Package - and Dev too, in coding.

Matteo

In reply to Matteo Scaramuccia

Re: Moodle Webservices API SCORM functionality

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

Just created MDL-35433 as the tracker issue

The reporting needs for Tin Can are quite different to SCORM as the data reported from a Tin Can package is quite different from normal SCORM. and the SCORM code isn't the greatest example of Moodle code - I'd consider bolting it onto the SCORM module but only if we managed to clean it up really well!

In reply to Phil Nichols

Re: Moodle Webservices API SCORM functionality

by Amir Elion -

I am a not as technical as you guys, but wouldn't you be able to use the external tool approach:

http://docs.moodle.org/23/en/External_tool

Then place your content somewhere else for mobile access and repoting back to moodle on completion.

In reply to Amir Elion

Re: Moodle Webservices API SCORM functionality

by Mark Aberdour -

There is some overlap between LTI and Tin Can API, but each was built for a different purpose and therefore have a different focus, as I understand it.

LTI is more concerned with authentication /single sign on than with tracking. An external LTI tool can only send a score back to Moodle.

Tin Can API is more concerned with tracking than with authentication. An external Tin Can API tool (using OAuth for authentication) can send a whole stream of data about what the learner did in that system.

In reply to Phil Nichols

Re: Moodle Webservices API SCORM functionality

by pratik patel -

Hello Phil...

Have you got any solution for your question??

I also want to access SCORM content course using web service on my PHP Web application using REST/SOAP.

Please let me know if any body have anything related to it.

Thanks,