return null if $cmid is null for helixmedia_get_preid() in lib.php.
Since Moodle 4.3 showing the "Default activity completion" for a course will trigger the definition() method in mod_form.php.
This will result in an error as $cmid is still null at that time and get_coursemodule_from_id() will fail to return a MUST_EXIST object.
return null if $cmid is null for helixmedia_get_preid() in lib.php.
Since Moodle 4.3 showing the "Default activity completion" for a course will trigger the definition() method in mod_form.php. This will result in an error as $cmid is still null at that time and get_coursemodule_from_id() will fail to return a MUST_EXIST object.
This will fix #15.