mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Moved check for plugin import/export to the start rather than the end
Merged from STABLE_18
This commit is contained in:
parent
df6d3c66ae
commit
4433fff5a8
1 changed files with 6 additions and 4 deletions
|
@ -225,6 +225,12 @@ class qformat_gift extends qformat_default {
|
||||||
// determine QUESTION TYPE
|
// determine QUESTION TYPE
|
||||||
$question->qtype = NULL;
|
$question->qtype = NULL;
|
||||||
|
|
||||||
|
// give plugins first try
|
||||||
|
// plugins must promise not to intercept standard qtypes
|
||||||
|
if ($question = $this->try_importing_using_qtypes( $lines, $question, $answertext )) {
|
||||||
|
return $question;
|
||||||
|
}
|
||||||
|
|
||||||
if ($description) {
|
if ($description) {
|
||||||
$question->qtype = DESCRIPTION;
|
$question->qtype = DESCRIPTION;
|
||||||
}
|
}
|
||||||
|
@ -262,10 +268,6 @@ class qformat_gift extends qformat_default {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($question->qtype)) {
|
if (!isset($question->qtype)) {
|
||||||
// try for plugins
|
|
||||||
if ($question = $this->try_importing_using_qtypes( $lines, $question, $answertext )) {
|
|
||||||
return $question;
|
|
||||||
}
|
|
||||||
$giftqtypenotset = get_string('giftqtypenotset','quiz');
|
$giftqtypenotset = get_string('giftqtypenotset','quiz');
|
||||||
$this->error( $giftqtypenotset, $text );
|
$this->error( $giftqtypenotset, $text );
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue