MDL-40093: mod/assign: Remove count of drafts in offline assignment's grading summary...
authorRaymond Wijaya <raymond.wijaya@netspot.com.au>
Fri, 7 Jun 2013 05:32:47 +0000 (15:02 +0930)
committerMarina Glancy <marina@moodle.com>
Wed, 10 Jul 2013 01:18:28 +0000 (11:18 +1000)
mod/assign/renderer.php

index b1fc393..f3a0306 100644 (file)
@@ -262,8 +262,8 @@ class mod_assign_renderer extends plugin_renderer_base {
                                        $summary->participantcount);
         }
 
-        // Drafts.
-        if ($summary->submissiondraftsenabled) {
+        // Drafts count and dont show drafts count when using offline assignment.
+        if ($summary->submissiondraftsenabled && $summary->submissionsenabled) {
             $this->add_table_row_tuple($t, get_string('numberofdraftsubmissions', 'assign'),
                                        $summary->submissiondraftscount);
         }