Example #1
0
function local_enrolmentreminder_addform($data)
{
    $mform = new enrolmentreminderadd_form();
    if ($fromform = $mform->get_data()) {
        local_enrolmentreminder_add($fromform);
        $_REQUEST['courseid'] = $fromform->courseid;
        $result->submitbutton = 'Update again';
        $mform->display();
    } else {
        $mform->set_data($data);
        $mform->display();
    }
}
function local_enrolmentreminder_addform($data)
{
    $mform = new enrolmentreminderadd_form(null, (array) $data);
    $mform->set_data($data);
    $mform->display();
}