mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-38359 assign: Add support for admin defaults for marking workflow settings
This commit is contained in:
parent
f8d107b3a8
commit
bb6471aa88
@ -179,14 +179,14 @@ class mod_assign_mod_form extends moodleform_mod {
|
||||
$mform->freeze('blindmarking');
|
||||
}
|
||||
|
||||
$mform->addElement('advcheckbox', 'markingworkflow', get_string('markingworkflow', 'assign'), '', null, array(0, 1));
|
||||
$name = get_string('markingworkflow', 'assign');
|
||||
$mform->addElement('selectyesno', 'markingworkflow', $name);
|
||||
$mform->addHelpButton('markingworkflow', 'markingworkflow', 'assign');
|
||||
$mform->setDefault('markingworkflow', 0);
|
||||
|
||||
$mform->addElement('advcheckbox', 'markingallocation', get_string('markingallocation', 'assign'), '', null, array(0, 1));
|
||||
$name = get_string('markingallocation', 'assign');
|
||||
$mform->addElement('selectyesno', 'markingallocation', $name);
|
||||
$mform->addHelpButton('markingallocation', 'markingallocation', 'assign');
|
||||
$mform->setDefault('markingallocation', 0);
|
||||
$mform->disabledIf('markingallocation', 'markingworkflow', 'notchecked');
|
||||
$mform->disabledIf('markingallocation', 'markingworkflow', 'eq', 0);
|
||||
|
||||
$this->standard_coursemodule_elements();
|
||||
$this->apply_admin_defaults();
|
||||
|
@ -224,4 +224,23 @@ if ($ADMIN->fulltree) {
|
||||
$setting->set_locked_flag_options(admin_setting_flag::ENABLED, false);
|
||||
$settings->add($setting);
|
||||
|
||||
$name = new lang_string('markingworkflow', 'mod_assign');
|
||||
$description = new lang_string('markingworkflow_help', 'mod_assign');
|
||||
$setting = new admin_setting_configcheckbox('assign/markingworkflow',
|
||||
$name,
|
||||
$description,
|
||||
0);
|
||||
$setting->set_advanced_flag_options(admin_setting_flag::ENABLED, false);
|
||||
$setting->set_locked_flag_options(admin_setting_flag::ENABLED, false);
|
||||
$settings->add($setting);
|
||||
|
||||
$name = new lang_string('markingallocation', 'mod_assign');
|
||||
$description = new lang_string('markingallocation_help', 'mod_assign');
|
||||
$setting = new admin_setting_configcheckbox('assign/markingallocation',
|
||||
$name,
|
||||
$description,
|
||||
0);
|
||||
$setting->set_advanced_flag_options(admin_setting_flag::ENABLED, false);
|
||||
$setting->set_locked_flag_options(admin_setting_flag::ENABLED, false);
|
||||
$settings->add($setting);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user