mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-62279 assign: Properly set the defaults
Before an assignment has been created, we need to use the site defaults, not the per instance defaults for the settings.
This commit is contained in:
parent
6e8235c7d3
commit
cc9384f121
@ -69,11 +69,13 @@ class assign_submission_file extends assign_submission_plugin {
|
||||
public function get_settings(MoodleQuickForm $mform) {
|
||||
global $CFG, $COURSE;
|
||||
|
||||
$defaultmaxfilesubmissions = $this->get_config('maxfilesubmissions');
|
||||
$defaultmaxsubmissionsizebytes = $this->get_config('maxsubmissionsizebytes');
|
||||
if ($this->assignment->has_instance()) {
|
||||
$defaultmaxfilesubmissions = $this->get_config('maxfilesubmissions');
|
||||
$defaultmaxsubmissionsizebytes = $this->get_config('maxsubmissionsizebytes');
|
||||
$defaultfiletypes = $this->get_config('filetypeslist');
|
||||
} else {
|
||||
$defaultmaxfilesubmissions = get_config('assignsubmission_file', 'maxfiles');
|
||||
$defaultmaxsubmissionsizebytes = get_config('assignsubmission_file', 'maxbytes');
|
||||
$defaultfiletypes = get_config('assignsubmission_file', 'filetypes');
|
||||
}
|
||||
$defaultfiletypes = (string)$defaultfiletypes;
|
||||
|
Loading…
x
Reference in New Issue
Block a user