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