Brandon Fredericksen
Brandon Fredericksen

Reputation: 1178

Using PHP within a SCORM course

I am creating an online course via SCORM for Moodle 1.9. I have decided that using SCORM is really the only way to design the course the way I want. It doesnt need to work in any other LMS, just one; so I am not worried about compatibility across the board.

What is the best way to use PHP files within a SCORM course?

I have tried linking directly to an outside PHP file, which does "work", but returning back to the SCORM files is kinda wierd. I have to add in this obscure path:

<a href="http://example.com/file.php/3/moddata/scorm/2/scormcontent/complete.html">complete course</a>

Although I have not done much testing, the above technically works. But, I would like to know what the best practices are when it comes to using anything other than HTML and javascript in SCORM. Please help!

Cheers

Upvotes: 0

Views: 1898

Answers (2)

periklis
periklis

Reputation: 10188

I agree 100% with pipwerks' answer above. However, if you were absolutely sure you want to do this kind of "hack" you are describing, I would suggest that you link your SCORM content with ajax requests to your php file, so that the experience is as transparent to the user as possible. Of course, you should also be able to upload and execute php files from inside the SCORM's folder (I'm not sure if moodle supports this).

Upvotes: 2

pipwerks
pipwerks

Reputation: 4581

I understand your goal, but one of the key points of SCORM is portability (the "S" stands for "Shareable"). As such, server-side code is specifically prohibited in SCORM courses, because you never know which server-side code an LMS will support.

SCORM requires a pure client-side solution, with JavaScript handling course-to-LMS communication. There is no 'best way' to use PHP (or any other server-side language) in a SCORM course, and by using PHP, your course will not be SCORM-conformant.

If you want to use server-side code, perhaps you should consider AICC instead of SCORM.

Upvotes: 3

Related Questions