From 15b3db1236bbe7cb71c2727498778dfdf2ac0ea0 Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Fri, 25 Nov 2005 08:41:16 +0000 Subject: [PATCH] fix for bug 4067 --- mod/assignment/type/uploadsingle/assignment.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/assignment/type/uploadsingle/assignment.class.php b/mod/assignment/type/uploadsingle/assignment.class.php index efd98f442f737..4b74af959b3d2 100644 --- a/mod/assignment/type/uploadsingle/assignment.class.php +++ b/mod/assignment/type/uploadsingle/assignment.class.php @@ -64,7 +64,7 @@ function view() { } } - if ($this->isopen() && (!$filecount || $this->assignment->resubmit)) { + if ($this->isopen() && (!$filecount || $this->assignment->resubmit || !$submission->timemarked)) { $this->view_upload_form(); } @@ -100,8 +100,8 @@ function upload() { $this->view_header(get_string('upload')); $filecount = $this->count_user_files($USER->id); - - if ($this->isopen() && (!$filecount || $this->assignment->resubmit)) { + $submission = $this->get_submission($USER->id); + if ($this->isopen() && (!$filecount || $this->assignment->resubmit || !$submission->timemarked)) { if ($submission = $this->get_submission($USER->id)) { //TODO: change later to ">= 0", to prevent resubmission when graded 0 if (($submission->grade > 0) and !$this->assignment->resubmit) {