Send scorm package to database

Send scorm package to database

by Justin Darlet -
Number of replies: 3

Hi everyone,

I need to create a plugin very similar to the scorm package. So I wonder in which part of the code the package (.zip) is sent to the database and how (which functions), but I can't find it...

I'm using Moodle 3.0.3

Thanks in advance for your help.

Justin.


Average of ratings: -
In reply to Justin Darlet

Re: Send scorm package to database

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Take a look in the db folder within any of the modules under mod to see how code works with the database.

In reply to Marcus Green

Re: Send scorm package to database

by Justin Darlet -

Thank you for your help.

I found the function insert_record($table, $dataObject) in locallib.php, which is used in the function scorm_add_instance($scorm, $mform=null). This one appears in the db folder as you said, but i don't know if that's what i was looking for.

Justin.

In reply to Justin Darlet

Re: Send scorm package to database

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

I reccommend installing an IDE such as NetBeans that will allow you to view the structure of the objects in Moodle more easily so you can see what bits of code do.  Also take a look at the developer documentation on the database API.

Average of ratings: Useful (1)