/** * 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'); }