mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
Merge branch 'MDL-29846' of git://github.com/timhunt/moodle
This commit is contained in:
commit
22c3690b9d
1 changed files with 5 additions and 5 deletions
|
@ -52,16 +52,16 @@ foreach ($behaviours as $behaviour => $notused) {
|
||||||
if (!array_key_exists($behaviour, $counts)) {
|
if (!array_key_exists($behaviour, $counts)) {
|
||||||
$counts[$behaviour] = 0;
|
$counts[$behaviour] = 0;
|
||||||
}
|
}
|
||||||
$needed[$behaviour] = ($counts[$behaviour] > 0) &&
|
$needed[$behaviour] = ($counts[$behaviour] > 0) ||
|
||||||
$pluginmanager->other_plugins_that_require('qbehaviour_' . $behaviour);
|
$pluginmanager->other_plugins_that_require('qbehaviour_' . $behaviour);
|
||||||
$archetypal[$behaviour] = question_engine::is_behaviour_archetypal($behaviour);
|
$archetypal[$behaviour] = question_engine::is_behaviour_archetypal($behaviour);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($counts as $behaviour => $count) {
|
foreach ($counts as $behaviour => $count) {
|
||||||
if (!array_key_exists($behaviour, $behaviours)) {
|
if (!array_key_exists($behaviour, $behaviours)) {
|
||||||
$counts['missingtype'] += $count;
|
$counts['missing'] += $count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$needed['missing'] = true;
|
||||||
|
|
||||||
// Work of the correct sort order.
|
// Work of the correct sort order.
|
||||||
$config = get_config('question');
|
$config = get_config('question');
|
||||||
|
@ -179,7 +179,7 @@ if (($delete = optional_param('delete', '', PARAM_PLUGIN)) && confirm_sesskey())
|
||||||
unset($disabledbehaviours[$key]);
|
unset($disabledbehaviours[$key]);
|
||||||
set_config('disabledbehaviours', implode(',', $disabledbehaviours), 'question');
|
set_config('disabledbehaviours', implode(',', $disabledbehaviours), 'question');
|
||||||
}
|
}
|
||||||
$behaviourorder = explode(',', $config->behavioursortorder);
|
$behaviourorder = array_keys($sortedbehaviours);
|
||||||
if (($key = array_search($delete, $behaviourorder)) !== false) {
|
if (($key = array_search($delete, $behaviourorder)) !== false) {
|
||||||
unset($behaviourorder[$key]);
|
unset($behaviourorder[$key]);
|
||||||
set_config('behavioursortorder', implode(',', $behaviourorder), 'question');
|
set_config('behavioursortorder', implode(',', $behaviourorder), 'question');
|
||||||
|
@ -248,7 +248,7 @@ foreach ($sortedbehaviours as $behaviour => $behaviourname) {
|
||||||
$row[] = '';
|
$row[] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Are people allowed to create new questions of this type?
|
// Are people allowed to select this behaviour?
|
||||||
$rowclass = '';
|
$rowclass = '';
|
||||||
if ($archetypal[$behaviour]) {
|
if ($archetypal[$behaviour]) {
|
||||||
$enabled = array_search($behaviour, $disabledbehaviours) === false;
|
$enabled = array_search($behaviour, $disabledbehaviours) === false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue