MDL-25316 quiz_get_extra_capabilities() does not need to fetch subcapabilities explicitly
authorDavid Mudrak <david.mudrak@gmail.com>
Thu, 2 Dec 2010 16:51:52 +0000 (16:51 +0000)
committerDavid Mudrak <david.mudrak@gmail.com>
Thu, 2 Dec 2010 16:51:52 +0000 (16:51 +0000)
mod/quiz/lib.php

index 38f799a..a3078e5 100644 (file)
@@ -1625,11 +1625,9 @@ function quiz_supports($feature) {
  * @return array all other caps used in module
  */
 function quiz_get_extra_capabilities() {
  * @return array all other caps used in module
  */
 function quiz_get_extra_capabilities() {
-    global $DB, $CFG;
+    global $CFG;
     require_once($CFG->libdir.'/questionlib.php');
     $caps = question_get_all_capabilities();
     require_once($CFG->libdir.'/questionlib.php');
     $caps = question_get_all_capabilities();
-    $reportcaps = $DB->get_records_select_menu('capabilities', 'name LIKE ?', array('quizreport/%'), 'id,name');
-    $caps = array_merge($caps, $reportcaps);
     $caps[] = 'moodle/site:accessallgroups';
     return $caps;
 }
     $caps[] = 'moodle/site:accessallgroups';
     return $caps;
 }