problem with insert_record from the Moodle API

Re: problem with insert_record from the Moodle API

by Richard Crawford -
Number of replies: 0
Silly me. Turns out I forgot to cast the form data to an object. I used:

$question = (object)$form;

and was able to pass $question to the insert_record() function and have the function work correctly.