MDL-63773 assignsubmission_file: switch instance form to hideIf

This commit is contained in:
Davo Smith 2017-12-13 16:43:13 +00:00
parent f203fbf9b6
commit a029b9aff5

View File

@ -90,7 +90,7 @@ class assign_submission_file extends assign_submission_plugin {
'maxfilessubmission',
'assignsubmission_file');
$mform->setDefault('assignsubmission_file_maxfiles', $defaultmaxfilesubmissions);
$mform->disabledIf('assignsubmission_file_maxfiles', 'assignsubmission_file_enabled', 'notchecked');
$mform->hideIf('assignsubmission_file_maxfiles', 'assignsubmission_file_enabled', 'notchecked');
$choices = get_max_upload_sizes($CFG->maxbytes,
$COURSE->maxbytes,
@ -108,7 +108,7 @@ class assign_submission_file extends assign_submission_plugin {
'maximumsubmissionsize',
'assignsubmission_file');
$mform->setDefault('assignsubmission_file_maxsizebytes', $defaultmaxsubmissionsizebytes);
$mform->disabledIf('assignsubmission_file_maxsizebytes',
$mform->hideIf('assignsubmission_file_maxsizebytes',
'assignsubmission_file_enabled',
'notchecked');
@ -116,7 +116,7 @@ class assign_submission_file extends assign_submission_plugin {
$mform->addElement('filetypes', 'assignsubmission_file_filetypes', $name);
$mform->addHelpButton('assignsubmission_file_filetypes', 'acceptedfiletypes', 'assignsubmission_file');
$mform->setDefault('assignsubmission_file_filetypes', $defaultfiletypes);
$mform->disabledIf('assignsubmission_file_filetypes', 'assignsubmission_file_enabled', 'notchecked');
$mform->hideIf('assignsubmission_file_filetypes', 'assignsubmission_file_enabled', 'notchecked');
}
/**