5

I have been asked to create an engine that will take a course(name, short-name, category) from our local database and add it to moodle.

I am thinking of using Moodle API for this.

I tried using the webservice with no luck.

I need something like :

moodle_create_course($name, $short-name, $description, $category, $type)

Does anyone has an input?

Amit Verma
  • 40,709
  • 21
  • 93
  • 115
Johnny Zghaib
  • 518
  • 1
  • 12
  • 30

1 Answers1

4

If you want to do it from PHP there is a function create_course() in course/lib.php

If you want to do it as a automatic sync tool, consider using CLI script in https://docs.moodle.org/en/Upload_courses tool

If you prefer REST, there is a web service for it called core_course_create_courses

Marina
  • 491
  • 3
  • 9