Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2361

No API to create an assignment/module

$
0
0

by Noora C.  

Using the webservices API I'm able to create course pages, edit topic titles, and do most other tasks I need remotely. But one essential thing I can't do is create a new lesson through the API, or any other module/assignment, for that matter.

I checked the MDL tracker and it's on the roadmap, but it's been on the roadmap since 2013 with only a few updates. Ref: MDL-40779.

It may be another several years before it's rolled out for production. In the meantime, I've tried calling the /mod/lesson/lib.php file directly to access the functions in there, but due to the autoloader and security restrictions, that gets stopped in it's tracks. I've also tried uploading a custom php file to the Moodle directory that takes a few GET parameters and calls the add_lesson_instance() function itself. I then tried calling that file through cURL remotely, but it's a no go. I'm playing whack-a-mole with an endless runaround of errors.

Has anyone found a solution for creating an assignment or module remotely, outside of Moodle?


EDIT: I've also been playing around with modifying the Joomdle plugin since it creates it's own custom API calls in Moodle, but if the developers of this plugin haven't been able to do it themselves, then I don't have much hope.


Viewing all articles
Browse latest Browse all 2361

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>