/** * @see plugintype_base::load_other_required_plugins(). */ protected function load_other_required_plugins() { parent::load_other_required_plugins(); if (!empty($this->dependencies)) { return; } // Standard mechanism did not find anything, so try the legacy way. global $CFG; require_once $CFG->libdir . '/questionlib.php'; $required = question_engine::get_behaviour_required_behaviours($this->name); foreach ($required as $other) { $this->dependencies['qbehaviour_' . $other] = ANY_VERSION; } }
// Add a row for each question type. foreach ($sortedbehaviours as $behaviour => $behaviourname) { $row = array(); // Question icon and name. $row[] = $behaviourname; // Count $row[] = $counts[$behaviour]; // Question version number. $version = get_config('qbehaviour_' . $behaviour, 'version'); if ($version) { $row[] = $version; } else { $row[] = html_writer::tag('span', get_string('nodatabase', 'admin'), array('class' => 'disabled')); } // Other question types required by this one. $requiredbehaviours = question_engine::get_behaviour_required_behaviours($behaviour); if (!empty($requiredbehaviours)) { $strrequiredbehaviours = array(); foreach ($requiredbehaviours as $required) { $strrequiredbehaviours[] = $sortedbehaviours[$required]; } $row[] = implode(', ', $strrequiredbehaviours); } else { $row[] = ''; } // Are people allowed to create new questions of this type? $rowclass = ''; if ($archetypal[$behaviour]) { $enabled = array_search($behaviour, $disabledbehaviours) === false; $icons = question_behaviour_enable_disable_icons($behaviour, $enabled); if (!$enabled) {