Пример #1
0
/**
 * Update an seplment instance
 *
 * This is done by calling the update_instance() method of the seplment type class
 * @param stdClass $data
 * @param stdClass $form - unused
 * @return object
 */
function sepl_update_instance(stdClass $data, $form)
{
    global $CFG;
    require_once $CFG->dirroot . '/mod/sepl/locallib.php';
    $context = context_module::instance($data->coursemodule);
    $seplment = new sepl($context, null, null);
    return $seplment->update_instance($data);
}