Function rewritten based on old_add_item() from Yannick Warnier. Due the fact that users can decide where the item should come, I had to overlook this function and I found it better to rewrite it. Old function is still available. Added also the possibility to add a description.
Generate a new prerequisites string for a given item. If this item was a sco and its prerequisites were strings (instead of IDs), then transform those strings into IDs, knowing that SCORM IDs are kept in the "ref" field of the lp_item table.
Open a resource = initialise all local variables relative to this resource. Depending on the child class, this might be redefined to allow several behaviours depending on the document type.
Exports the learning path as a SCORM package. This is the main function that gathers the content, transforms it, writes the imsmanifest.xml file, zips the whole thing and returns the zip.