]> git.mjollnir.org Git - moodle.git/commitdiff
added acapability
authortoyomoyo <toyomoyo>
Tue, 29 Aug 2006 06:02:29 +0000 (06:02 +0000)
committertoyomoyo <toyomoyo>
Tue, 29 Aug 2006 06:02:29 +0000 (06:02 +0000)
mod/assignment/type/upload/assignment.class.php

index 6b776ebed31b997191ef3b167431a3dac8afa04b..729e038efa8477b7ed5fa529576493c3e4ce2d6d 100644 (file)
@@ -1032,7 +1032,7 @@ class assignment_upload extends assignment_base {
                     } else {
                         $ffurl = "$CFG->wwwroot/file.php?file=/$filearea/$file";
                     } 
-                    if (isteacher($this->course->id)) {
+                    if (has_capability('mod/assignment:grade', get_context_instance(CONTEXT_MODULE, $this->course->id))) {
                                $output .= '<img align="middle" src="'.$CFG->pixpath.'/f/'.$icon.'" height="16" width="16" alt="'.$icon.'" />'.
                                           '<a href="'.$ffurl.'" >'.$file.'</a> ['.$filesize.'] <br />';
                            } else {