I tried to add
require_once($CFG->libdir. '/filestorage/file_storage.php');
but I am now getting:
{
"exception": "dml_missing_record_exception",
"errorcode": "invalidcoursemodule",
"message": "Invalid course module ID (SELECT id,course FROM {course_modules} WHERE id IS NULL\n[array (\n)])",
"debuginfo": "SELECT id,course FROM {course_modules} WHERE id IS NULL\n[array (\n)]"
}
The problem seems to be that in the get_context() function
get_fast_modinfo($this->courseid)->instances[$this->itemmodule][$this->iteminstance]
is failing because my module can't be found in the first [] lookup.
At this point I'm pretty stuck and putting the 3.6 upgrade investigation on hold.
Any advice?
Thank you.