Skip to content

Commit

Permalink
MDL-13741 Incorrect max size shown when using course upload limit; pa…
Browse files Browse the repository at this point in the history
…tch by Jason Meinzer; merged from MOODLE_19_STABLE
  • Loading branch information
skodak committed Mar 3, 2008
1 parent d747d41 commit ba9ad04
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion mod/assignment/type/upload/assignment.class.php
Expand Up @@ -140,7 +140,8 @@ function view_upload_form() {
$submission = $this->get_submission($USER->id);

$struploadafile = get_string('uploadafile');
$strmaxsize = get_string('maxsize', '', display_size($this->assignment->maxbytes));
$maxbytes = $this->assignment->maxbytes == 0 ? $this->course->maxbytes : $this->assignment->maxbytes;
$strmaxsize = get_string('maxsize', '', display_size($maxbytes));

if ($this->is_finalized($submission)) {
// no uploading
Expand Down
4 changes: 3 additions & 1 deletion mod/assignment/type/uploadsingle/assignment.class.php
Expand Up @@ -81,7 +81,9 @@ function view() {
function view_upload_form() {
global $CFG;
$struploadafile = get_string("uploadafile");
$strmaxsize = get_string("maxsize", "", display_size($this->assignment->maxbytes));

$maxbytes = $this->assignment->maxbytes == 0 ? $this->course->maxbytes : $this->assignment->maxbytes;
$strmaxsize = get_string('maxsize', '', display_size($maxbytes));

echo '<div style="text-align:center">';
echo '<form enctype="multipart/form-data" method="post" '.
Expand Down

0 comments on commit ba9ad04

Please sign in to comment.