mirror of
https://github.com/moodle/moodle.git
synced 2025-06-01 21:55:12 +02:00
MDL-29808 qbehaviours: update to use ->dependencies in version.php
This commit is contained in:
parent
828788f03b
commit
75a31c9039
@ -28,6 +28,7 @@
|
||||
require_once(dirname(__FILE__) . '/../config.php');
|
||||
require_once($CFG->libdir . '/questionlib.php');
|
||||
require_once($CFG->libdir . '/adminlib.php');
|
||||
require_once($CFG->libdir . '/pluginlib.php');
|
||||
require_once($CFG->libdir . '/tablelib.php');
|
||||
|
||||
// Check permissions.
|
||||
@ -39,6 +40,7 @@ admin_externalpage_setup('manageqbehaviours');
|
||||
$thispageurl = new moodle_url('/admin/qbehaviours.php');
|
||||
|
||||
$behaviours = get_plugin_list('qbehaviour');
|
||||
$pluginmanager = plugin_manager::instance();
|
||||
|
||||
// Get some data we will need - question counts and which types are needed.
|
||||
$counts = $DB->get_records_sql_menu("
|
||||
@ -50,15 +52,11 @@ foreach ($behaviours as $behaviour => $notused) {
|
||||
if (!array_key_exists($behaviour, $counts)) {
|
||||
$counts[$behaviour] = 0;
|
||||
}
|
||||
$needed[$behaviour] = $counts[$behaviour] > 0;
|
||||
$needed[$behaviour] = ($counts[$behaviour] > 0) &&
|
||||
$pluginmanager->other_plugins_that_require('qbehaviour_' . $behaviour);
|
||||
$archetypal[$behaviour] = question_engine::is_behaviour_archetypal($behaviour);
|
||||
}
|
||||
|
||||
foreach ($behaviours as $behaviour => $notused) {
|
||||
foreach (question_engine::get_behaviour_required_behaviours($behaviour) as $reqbehaviour) {
|
||||
$needed[$reqbehaviour] = true;
|
||||
}
|
||||
}
|
||||
foreach ($counts as $behaviour => $count) {
|
||||
if (!array_key_exists($behaviour, $behaviours)) {
|
||||
$counts['missingtype'] += $count;
|
||||
@ -238,13 +236,14 @@ foreach ($sortedbehaviours as $behaviour => $behaviourname) {
|
||||
}
|
||||
|
||||
// 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];
|
||||
$plugin = $pluginmanager->get_plugin_info('qbehaviour_' . $behaviour);
|
||||
$required = $plugin->get_other_required_plugins();
|
||||
if (!empty($required)) {
|
||||
$strrequired = array();
|
||||
foreach ($required as $component => $notused) {
|
||||
$strrequired[] = $pluginmanager->plugin_name($component);
|
||||
}
|
||||
$row[] = implode(', ', $strrequiredbehaviours);
|
||||
$row[] = implode(', ', $strrequired);
|
||||
} else {
|
||||
$row[] = '';
|
||||
}
|
||||
|
@ -1382,25 +1382,9 @@ class plugintype_mod extends plugintype_base implements plugin_information {
|
||||
* Class for question behaviours.
|
||||
*/
|
||||
class plugintype_qbehaviour extends plugintype_base implements plugin_information {
|
||||
|
||||
/**
|
||||
* @see plugintype_base::load_other_required_plugins().
|
||||
* @see plugin_information::get_uninstall_url()
|
||||
*/
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
public function get_uninstall_url() {
|
||||
return new moodle_url('/admin/qbehaviours.php',
|
||||
array('delete' => $this->name, 'sesskey' => sesskey()));
|
||||
|
33
question/behaviour/adaptive/version.php
Normal file
33
question/behaviour/adaptive/version.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Version information for the calculated question type.
|
||||
*
|
||||
* @package qbehaviour
|
||||
* @subpackage adaptive
|
||||
* @copyright 2011 The Open University
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'qbehaviour_adaptive';
|
||||
$plugin->version = 2011102700;
|
||||
|
||||
$plugin->requires = 2011102700;
|
||||
|
||||
$plugin->maturity = MATURITY_STABLE;
|
@ -40,10 +40,6 @@ require_once(dirname(__FILE__) . '/../adaptive/behaviour.php');
|
||||
class qbehaviour_adaptivenopenalty extends qbehaviour_adaptive {
|
||||
const IS_ARCHETYPAL = true;
|
||||
|
||||
public static function get_required_behaviours() {
|
||||
return array('adaptive');
|
||||
}
|
||||
|
||||
protected function adjusted_fraction($fraction, $prevtries) {
|
||||
return $fraction;
|
||||
}
|
||||
|
36
question/behaviour/adaptivenopenalty/version.php
Normal file
36
question/behaviour/adaptivenopenalty/version.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Version information for the calculated question type.
|
||||
*
|
||||
* @package qbehaviour
|
||||
* @subpackage adaptivenopenalty
|
||||
* @copyright 2011 The Open University
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'qbehaviour_adaptivenopenalty';
|
||||
$plugin->version = 2011102700;
|
||||
|
||||
$plugin->requires = 2011102700;
|
||||
$plugin->dependencies = array(
|
||||
'qbehaviour_adaptive' => 2011102700
|
||||
);
|
||||
|
||||
$plugin->maturity = MATURITY_STABLE;
|
@ -77,10 +77,6 @@ abstract class question_behaviour {
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_required_behaviours() {
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Most behaviours can only work with {@link question_definition}s
|
||||
* of a particular subtype, or that implement a particular interface.
|
||||
|
@ -45,10 +45,6 @@ require_once(dirname(__FILE__) . '/../deferredfeedback/behaviour.php');
|
||||
class qbehaviour_deferredcbm extends qbehaviour_deferredfeedback {
|
||||
const IS_ARCHETYPAL = true;
|
||||
|
||||
public static function get_required_behaviours() {
|
||||
return array('deferredfeedback');
|
||||
}
|
||||
|
||||
public static function get_unused_display_options() {
|
||||
return array('correctness', 'marks', 'specificfeedback', 'generalfeedback',
|
||||
'rightanswer');
|
||||
|
36
question/behaviour/deferredcbm/version.php
Normal file
36
question/behaviour/deferredcbm/version.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Version information for the calculated question type.
|
||||
*
|
||||
* @package qbehaviour
|
||||
* @subpackage deferredcbm
|
||||
* @copyright 2011 The Open University
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'qbehaviour_deferredcbm';
|
||||
$plugin->version = 2011102700;
|
||||
|
||||
$plugin->requires = 2011102700;
|
||||
$plugin->dependencies = array(
|
||||
'qbehaviour_deferredfeedback' => 2011102700
|
||||
);
|
||||
|
||||
$plugin->maturity = MATURITY_STABLE;
|
33
question/behaviour/deferredfeedback/version.php
Normal file
33
question/behaviour/deferredfeedback/version.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Version information for the calculated question type.
|
||||
*
|
||||
* @package qbehaviour
|
||||
* @subpackage deferredfeedback
|
||||
* @copyright 2011 The Open University
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'qbehaviour_deferredfeedback';
|
||||
$plugin->version = 2011102700;
|
||||
|
||||
$plugin->requires = 2011102700;
|
||||
|
||||
$plugin->maturity = MATURITY_STABLE;
|
@ -45,10 +45,6 @@ require_once(dirname(__FILE__) . '/../immediatefeedback/behaviour.php');
|
||||
class qbehaviour_immediatecbm extends qbehaviour_immediatefeedback {
|
||||
const IS_ARCHETYPAL = true;
|
||||
|
||||
public static function get_required_behaviours() {
|
||||
return array('immediatefeedback', 'deferredcbm');
|
||||
}
|
||||
|
||||
public function get_min_fraction() {
|
||||
return question_cbm::adjust_fraction(parent::get_min_fraction(), question_cbm::HIGH);
|
||||
}
|
||||
|
37
question/behaviour/immediatecbm/version.php
Normal file
37
question/behaviour/immediatecbm/version.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Version information for the calculated question type.
|
||||
*
|
||||
* @package qbehaviour
|
||||
* @subpackage immediatecbm
|
||||
* @copyright 2011 The Open University
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'qbehaviour_immediatecbm';
|
||||
$plugin->version = 2011102700;
|
||||
|
||||
$plugin->requires = 2011102700;
|
||||
$plugin->dependencies = array(
|
||||
'qbehaviour_immediatefeedback' => 2011102700,
|
||||
'qbehaviour_deferredcbm' => 2011102700
|
||||
);
|
||||
|
||||
$plugin->maturity = MATURITY_STABLE;
|
33
question/behaviour/immediatefeedback/version.php
Normal file
33
question/behaviour/immediatefeedback/version.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Version information for the calculated question type.
|
||||
*
|
||||
* @package qbehaviour
|
||||
* @subpackage immediatefeedback
|
||||
* @copyright 2011 The Open University
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'qbehaviour_immediatefeedback';
|
||||
$plugin->version = 2011102700;
|
||||
|
||||
$plugin->requires = 2011102700;
|
||||
|
||||
$plugin->maturity = MATURITY_STABLE;
|
33
question/behaviour/informationitem/version.php
Normal file
33
question/behaviour/informationitem/version.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Version information for the calculated question type.
|
||||
*
|
||||
* @package qbehaviour
|
||||
* @subpackage informationitem
|
||||
* @copyright 2011 The Open University
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'qbehaviour_informationitem';
|
||||
$plugin->version = 2011102700;
|
||||
|
||||
$plugin->requires = 2011102700;
|
||||
|
||||
$plugin->maturity = MATURITY_STABLE;
|
33
question/behaviour/interactive/version.php
Normal file
33
question/behaviour/interactive/version.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Version information for the calculated question type.
|
||||
*
|
||||
* @package qbehaviour
|
||||
* @subpackage interactive
|
||||
* @copyright 2011 The Open University
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'qbehaviour_interactive';
|
||||
$plugin->version = 2011102700;
|
||||
|
||||
$plugin->requires = 2011102700;
|
||||
|
||||
$plugin->maturity = MATURITY_STABLE;
|
@ -64,10 +64,6 @@ require_once(dirname(__FILE__) . '/../interactive/behaviour.php');
|
||||
class qbehaviour_interactivecountback extends qbehaviour_interactive {
|
||||
const IS_ARCHETYPAL = false;
|
||||
|
||||
public static function get_required_behaviours() {
|
||||
return array('interactive');
|
||||
}
|
||||
|
||||
public function required_question_definition_type() {
|
||||
return 'question_automatically_gradable_with_countback';
|
||||
}
|
||||
|
36
question/behaviour/interactivecountback/version.php
Normal file
36
question/behaviour/interactivecountback/version.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Version information for the calculated question type.
|
||||
*
|
||||
* @package qbehaviour
|
||||
* @subpackage interactivecountback
|
||||
* @copyright 2011 The Open University
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'qbehaviour_interactivecountback';
|
||||
$plugin->version = 2011102700;
|
||||
|
||||
$plugin->requires = 2011102700;
|
||||
$plugin->dependencies = array(
|
||||
'qbehaviour_interactive' => 2011102700
|
||||
);
|
||||
|
||||
$plugin->maturity = MATURITY_STABLE;
|
33
question/behaviour/manualgraded/version.php
Normal file
33
question/behaviour/manualgraded/version.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Version information for the calculated question type.
|
||||
*
|
||||
* @package qbehaviour
|
||||
* @subpackage manualgraded
|
||||
* @copyright 2011 The Open University
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'qbehaviour_manualgraded';
|
||||
$plugin->version = 2011102700;
|
||||
|
||||
$plugin->requires = 2011102700;
|
||||
|
||||
$plugin->maturity = MATURITY_STABLE;
|
33
question/behaviour/missing/version.php
Normal file
33
question/behaviour/missing/version.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Version information for the calculated question type.
|
||||
*
|
||||
* @package qbehaviour
|
||||
* @subpackage missing
|
||||
* @copyright 2011 The Open University
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'qbehaviour_missing';
|
||||
$plugin->version = 2011102700;
|
||||
|
||||
$plugin->requires = 2011102700;
|
||||
|
||||
$plugin->maturity = MATURITY_STABLE;
|
11
question/behaviour/upgrade.txt
Normal file
11
question/behaviour/upgrade.txt
Normal file
@ -0,0 +1,11 @@
|
||||
This files describes API changes for question behaviour plugins.
|
||||
|
||||
=== 2.2 ===
|
||||
|
||||
* The old
|
||||
public static function get_required_behaviours()
|
||||
method is no more. Instead use the ->dependencies facility in version.php. E.g.
|
||||
$plugin->dependencies = array(
|
||||
'qbehaviour_immediatefeedback' => 2011102700,
|
||||
'qbehaviour_deferredcbm' => 2011102700
|
||||
);
|
@ -328,17 +328,6 @@ abstract class question_engine {
|
||||
return get_string('pluginname', 'qbehaviour_' . $behaviour);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the translated name of an behaviour, for display in the UI.
|
||||
* @param string $behaviour the internal name of the model.
|
||||
* @return string name from the current language pack.
|
||||
*/
|
||||
public static function get_behaviour_required_behaviours($behaviour) {
|
||||
self::load_behaviour_class($behaviour);
|
||||
$class = 'qbehaviour_' . $behaviour;
|
||||
return $class::get_required_behaviours();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array all the file area names that may contain response files.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user