RusticiSoftware / SCORMCloud_PHPLibrary

A PHP library to aid in the integration of the SCORM Cloud web services into PHP applications.
http://scorm.com/scorm-solved/scorm-cloud/develop-a-scorm-cloud-app/
Other
43 stars 23 forks source link

Upload service returning empty string #3

Open gardon opened 12 years ago

gardon commented 12 years ago

I investigated a service call that was apparently successful but returned an empty location. Turns out the XML comes with CDATA so you need to add a parameter do simpleXML

gardon commented 12 years ago

Where can I post a patch? This line must be edited, or whichever simplexml_load_xxx calls are there:

<?php
$xml = simplexml_load_string($response, 'SimpleXMLElement', LIBXML_NOCDATA);
?>
troyef commented 12 years ago

Hi gardon, Note that the prescribed method for importing courses to SCORM Cloud is now to import directly to SCORM Cloud instead of doing an upload and then an import. The API listing is here: http://cloud.scorm.com/doc/web-services/api.html#rustici.course.importCourse The PHP lib use of that API call is to direct an file upload form to the URL returned from CourseService->GetImportCourseUrl. An example is in the samples/ImportSample.php.

That said, we don't want the upload functionalities to not work, so I'll note this to take a look at later. If you have gotten it to work, feel free to fork our repo and submit a pull request.

Thanks.