MDL-27550 workshop: students do not see peer-assessment that are not graded yet
authorDavid Mudrak <david@moodle.com>
Thu, 28 Jul 2011 20:30:36 +0000 (22:30 +0200)
committerDavid Mudrak <david@moodle.com>
Tue, 2 Aug 2011 21:33:32 +0000 (23:33 +0200)
mod/workshop/submission.php

index cc79ed8..080cbf6 100644 (file)
@@ -323,6 +323,10 @@ if (has_capability('mod/workshop:viewallassessments', $workshop->context) or ($o
             // own assessment has been displayed already
             continue;
         }
+        if (is_null($assessment->grade) and !has_capability('mod/workshop:viewallassessments', $workshop->context)) {
+            // students do not see peer-assessment that are not graded yet
+            continue;
+        }
         $mform      = $strategy->get_assessment_form($PAGE->url, 'assessment', $assessment, false);
         $options    = array(
             'showreviewer'  => $showreviewer,