Permalink
Browse files

Merge branch 'wip-mdl-27521-master' of git://github.com/phalacee/moodle

  • Loading branch information...
nebgor committed Nov 8, 2011
2 parents 3a21e47 + 2388e7c commit 3730e077fc04f96dd64f1c93b95dd7bee05fd5cd
Showing with 10 additions and 0 deletions.
  1. +10 −0 mod/assignment/type/upload/assignment.class.php
@@ -918,9 +918,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)) {
@@ -932,6 +937,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 3730e07

Please sign in to comment.