Skip to content
Browse files

Merge branch 'wip-mdl-27521-stable20' of git://github.com/phalacee/mo…

…odle into MOODLE_20_STABLE
  • Loading branch information...
2 parents 3fa3248 + 9fee025 commit ce8e5673027bee05aadc94312bdb8bdfe310b5ac @nebgor nebgor committed Nov 8, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 mod/assignment/type/upload/assignment.class.php
View
10 mod/assignment/type/upload/assignment.class.php
@@ -919,9 +919,14 @@ function is_finalized($submission) {
}
function can_unfinalize($submission) {
+ if(is_bool($submission)) {
+ return false;
+ }
+
if (!$this->drafts_tracked()) {
return false;
}
+
if (has_capability('mod/assignment:grade', $this->context)
and $this->isopen()
and $this->is_finalized($submission)) {
@@ -933,6 +938,11 @@ function can_unfinalize($submission) {
function can_finalize($submission) {
global $USER;
+
+ if(is_bool($submission)) {
+ return false;
+ }
+
if (!$this->drafts_tracked()) {
return false;
}

0 comments on commit ce8e567

Please sign in to comment.
Something went wrong with that request. Please try again.