diff --git a/mod/assign/feedback/comments/locallib.php b/mod/assign/feedback/comments/locallib.php index e9dc83dc9b1..2b8e28bdec2 100644 --- a/mod/assign/feedback/comments/locallib.php +++ b/mod/assign/feedback/comments/locallib.php @@ -600,6 +600,14 @@ class assign_feedback_comments extends assign_feedback_plugin { return $this->view($grade) == ''; } + /** + * Get file areas returns a list of areas this plugin stores files + * @return array - An array of fileareas (keys) and descriptions (values) + */ + public function get_file_areas() { + return array(ASSIGNFEEDBACK_COMMENTS_FILEAREA => $this->get_name()); + } + /** * Return a description of external params suitable for uploading an feedback comment from a webservice. * diff --git a/mod/assign/tests/locallib_test.php b/mod/assign/tests/locallib_test.php index b62649b23a7..0c5c08704b5 100644 --- a/mod/assign/tests/locallib_test.php +++ b/mod/assign/tests/locallib_test.php @@ -3501,11 +3501,14 @@ Anchor link 2:Link text } else if ($type == 'file') { $this->assertEquals(array('feedback_files' => 'Feedback files'), $fileareas); $usingfilearea++; + } else if ($type == 'comments') { + $this->assertEquals(array('feedback' => 'Feedback comments'), $fileareas); + $usingfilearea++; } else { $this->assertEmpty($fileareas); } } - $this->assertEquals(2, $usingfilearea); + $this->assertEquals(3, $usingfilearea); } /**