MDL-39077 maxbytes - fix warnings for cli install

This commit is contained in:
Damyon Wiese 2013-05-02 12:10:05 +08:00
parent e7ff753cab
commit c9c01f75b1
5 changed files with 19 additions and 7 deletions

View file

@ -6,8 +6,12 @@ if ($ADMIN->fulltree) {
require_once($CFG->dirroot.'/mod/assignment/lib.php');
if (isset($CFG->maxbytes)) {
$maxbytes = 0;
if (isset($CFG->assignment_maxbytes)) {
$maxbytes = $CFG->assignment_maxbytes;
}
$settings->add(new admin_setting_configselect('assignment_maxbytes', get_string('maximumsize', 'assignment'),
get_string('configmaxbytes', 'assignment'), 1048576, get_max_upload_sizes($CFG->maxbytes, 0, 0, $CFG->assignment_maxbytes)));
get_string('configmaxbytes', 'assignment'), 1048576, get_max_upload_sizes($CFG->maxbytes, 0, 0, $maxbytes)));
}
$options = array(ASSIGNMENT_COUNT_WORDS => trim(get_string('numwords', '', '?')),