/** * Implementation of the function for printing the form elements that control * whether the course reset functionality affects the grouptool. * @param stdClass $mform form passed by reference */ function grouptool_reset_course_form_definition(&$mform) { $mform->addElement('header', 'grouptoolheader', get_string('modulenameplural', 'grouptool')); $mform->addElement('advcheckbox', 'reset_grouptool_agrps', get_string('reset_agrps', 'grouptool')); $mform->addHelpButton('reset_grouptool_agrps', 'reset_agrps', 'grouptool'); $mform->addElement('advcheckbox', 'reset_grouptool_registrations', get_string('reset_registrations', 'grouptool')); $mform->addHelpButton('reset_grouptool_registrations', 'reset_registrations', 'grouptool'); $mform->disabledif('reset_grouptool_registrations', 'reset_grouptool_agrps', 'checked'); $mform->addElement('advcheckbox', 'reset_grouptool_queues', get_string('reset_queues', 'grouptool')); $mform->addHelpButton('reset_grouptool_queues', 'reset_queues', 'grouptool'); $mform->disabledif('reset_grouptool_queues', 'reset_grouptool_agrps', 'checked'); $mform->addElement('advcheckbox', 'reset_grouptool_transparent_unreg', get_string('reset_transparent_unreg', 'grouptool')); $mform->addHelpButton('reset_grouptool_transparent_unreg', 'reset_transparent_unreg', 'grouptool'); }
/** * Implementation of the function for printing the form elements that control * whether the course reset functionality affects the pcast. * @param stdClass $mform form passed by reference */ function pcast_reset_course_form_definition(&$mform) { $mform->addElement('header', 'pcastheader', get_string('modulenameplural', 'pcast')); $mform->addElement('checkbox', 'reset_pcast_all', get_string('resetpcastsall', 'pcast')); $mform->addElement('checkbox', 'reset_pcast_notenrolled', get_string('deletenotenrolled', 'pcast')); $mform->disabledIf('reset_pcast_notenrolled', 'reset_pcast_all', 'checked'); $mform->addElement('checkbox', 'reset_pcast_ratings', get_string('deleteallratings')); $mform->disabledIf('reset_pcast_ratings', 'reset_pcast_all', 'checked'); $mform->addElement('checkbox', 'reset_pcast_comments', get_string('deleteallcomments')); $mform->disabledIf('reset_pcast_comments', 'reset_pcast_all', 'checked'); $mform->addElement('checkbox', 'reset_pcast_views', get_string('deleteallviews', 'pcast')); $mform->disabledIf('reset_pcast_views', 'reset_pcast_all', 'checked'); }