mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 19:06:41 +02:00
MDL-79863 format_gift: Set ID & tags from comment
Previously, third party imports could not add tags or the self defined ID numbers. This is because if the plugin defines an import it just returns after completing skipping this non specific function.
This commit is contained in:
parent
3d68bd3fa7
commit
fbfbb7272a
1 changed files with 3 additions and 4 deletions
|
@ -281,6 +281,9 @@ class qformat_gift extends qformat_default {
|
|||
// Determine question type.
|
||||
$question->qtype = null;
|
||||
|
||||
// Extract any idnumber and tags from the comments.
|
||||
list($question->idnumber, $question->tags) = $this->extract_idnumber_and_tags_from_comment($comments);
|
||||
|
||||
// Give plugins first try.
|
||||
// Plugins must promise not to intercept standard qtypes
|
||||
// MDL-12346, this could be called from lesson mod which has its own base class =(.
|
||||
|
@ -325,10 +328,6 @@ class qformat_gift extends qformat_default {
|
|||
}
|
||||
}
|
||||
|
||||
// Extract any idnumber and tags from the comments.
|
||||
list($question->idnumber, $question->tags) =
|
||||
$this->extract_idnumber_and_tags_from_comment($comments);
|
||||
|
||||
if (!isset($question->qtype)) {
|
||||
$giftqtypenotset = get_string('giftqtypenotset', 'qformat_gift');
|
||||
$this->error($giftqtypenotset, $text);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue