General developer forum

Moodle 3.4. Quiz creation process in PHP

 
Picture of Alexis HF
Re: Moodle 3.4. Quiz creation process in PHP
 

Hi, I reply myself...


Finally I was able to do it! 

I created a quiz programmatically and I'm able to see it on Moodle.

You just need to use this function (Tim mentioned it) properly:

$quiz = add_moduleinfo($quiz, $course, null)
It is included in 

https://github.com/moodle/moodle/blob/master/course/modlib.php#L44


 
Average of ratings: Useful (1)