I'm currently building a new moodle plugin. I'm using add_moduleinfo
and update_moduleinfo
. To add a new attandance atictivity in a course and update it later on.
Sadly I'm facing the issue that update_moduleinfo
always throws an "invalid course module id" error. I already checked the cm entry in my database to ensure im using the right module instance.
I dont really know what to do.
$cm = get_coursemodule_from_instance($moduleName, $activityID, $course->id);
$moduleinfo = update_moduleinfo($cm, $moduleinfo, $course); <-- Error
Thats how I try to update the entry.
I also found that post. Didn't help anything. Moodle - Invalid course module ID