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:40:55 +0000 (11:40 +1000)
mod/assign/renderer.php

index 0b95035..0a0efef 100644 (file)
@@ -246,11 +246,11 @@ class mod_assign_renderer extends plugin_renderer_base {
         $this->add_table_row_tuple($t, get_string('numberofparticipants', 'assign'),
                                    $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);
-       }
+        }
 
         // submitted for grading
         if ($summary->submissionsenabled) {