Web Service for creation of courses and resources from XML

Web Service for creation of courses and resources from XML

by Gareth Morgan -
Number of replies: 1

Hello, everyone,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 

I am currently looking into developing a Web Service in order to set up courses on Moodle, and wanted to check whether what I’m doing resembles anything that anybody’s already doing.  Unfortunately the requirements differ somewhat from the Batch Course Upload/Update that Lee Asson has posted, also from previous threads on Bulk course and category creation and the Plugin to create user and course profiles by category.

 

The functionality will include creating the course, populating the sections on the course home page, and also creating resources from XML data which will then be linked to the home page.  The resources will mostly be HTML pages but will also include Audio-Visual files of various types.  In other words, it isn’t a simple case of creating empty courses for someone to populate. 

 

Furthermore, the source data will use a custom XML format and will be derived from a number of sources, so it differs from the requirements of, say, migrating courses from Blackboard to Moodle, or re-instating courses that were saved as backup files from another Moodle instance.  I’m OK with the XML side, but wondering whether I could benefit from anybody’s previous work to do the following Moodle actions:

 

  1. Create a new course with specified course settings, and specified format (probably topics), which will be held in a specified category.  

  2. To add variable numbers of sections to the generated courses.

  3. To create resources linked to these sections, from HTML, but in the generated web page format (i.e. by inserting the HTML into the Moodle resource table, the same result as would be achieved by “composing” a web page, rather than by uploading an HTML file).

  4. Also to create resources in the “label” format within the course sections, to explain what each linked page is about.

  5. To upload audio-visual resources such as sound files, Flash movies etc. and link them as resources to the course page.  (These will also vary from course to course). 

 

Thanks in advance for any help you can give,

 

Gareth Morgan.

 

Average of ratings: -
In reply to Gareth Morgan

Re: Web Service for creation of courses and resources from XML

by Alastair Hole -
Here is the details of current efforts:
Web Services in forthcoming Moodle
Web Services API

I also need this functionality but as no code is currently available I have resorted to hacking together my own custom php scripts to accept POST data from random ASP.NET pages in MS SharePoint.