mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-58919 assignsubmission_file: Add accepted file types default.
New setting "defaultacceptedfiletypes" to define default accepted file types in File submissions.
This commit is contained in:
parent
17fb1d84a2
commit
797a70c0ec
@ -29,6 +29,7 @@ $string['configmaxbytes'] = 'Maximum file size';
|
||||
$string['countfiles'] = '{$a} files';
|
||||
$string['default'] = 'Enabled by default';
|
||||
$string['default_help'] = 'If set, this submission method will be enabled by default for all new assignments.';
|
||||
$string['defaultacceptedfiletypes'] = 'Default accepted file types';
|
||||
$string['enabled'] = 'File submissions';
|
||||
$string['enabled_help'] = 'If enabled, students are able to upload one or more files as their submission.';
|
||||
$string['eventassessableuploaded'] = 'A file has been uploaded.';
|
||||
|
@ -72,6 +72,9 @@ class assign_submission_file extends assign_submission_plugin {
|
||||
$defaultmaxfilesubmissions = $this->get_config('maxfilesubmissions');
|
||||
$defaultmaxsubmissionsizebytes = $this->get_config('maxsubmissionsizebytes');
|
||||
$defaultfiletypes = (string)$this->get_config('filetypeslist');
|
||||
if ($defaultfiletypes == '') {
|
||||
$defaultfiletypes = (string)get_config('assignsubmission_file', 'filetypes');
|
||||
}
|
||||
|
||||
$settings = array();
|
||||
$options = array();
|
||||
|
@ -32,6 +32,10 @@ $settings->add(new admin_setting_configtext('assignsubmission_file/maxfiles',
|
||||
new lang_string('maxfiles', 'assignsubmission_file'),
|
||||
new lang_string('maxfiles_help', 'assignsubmission_file'), 20, PARAM_INT));
|
||||
|
||||
$settings->add(new admin_setting_configtext('assignsubmission_file/filetypes',
|
||||
new lang_string('defaultacceptedfiletypes', 'assignsubmission_file'),
|
||||
new lang_string('acceptedfiletypes_help', 'assignsubmission_file'), '', PARAM_TEXT));
|
||||
|
||||
if (isset($CFG->maxbytes)) {
|
||||
|
||||
$name = new lang_string('maximumsubmissionsize', 'assignsubmission_file');
|
||||
|
Loading…
x
Reference in New Issue
Block a user