/** * Updates an instance of the videofile in the database * * Given an object containing all the necessary data, * (defined by the form in mod_form.php) this function * will update an existing instance with new data. * * @param stdClass $data * @param mod_videofile_mod_form $form * @return boolean */ function videofile_update_instance(stdClass $data, mod_videofile_mod_form $form = null) { require_once dirname(__FILE__) . '/locallib.php'; $context = context_module::instance($data->coursemodule); $videofile = new videofile($context, null, null); return $videofile->update_instance($data); }