mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
Merge branch 'MDL-29095' of git://github.com/timhunt/moodle
This commit is contained in:
commit
ab9dde2f97
@ -702,6 +702,16 @@ class question_type {
|
||||
$question->createdby = $questiondata->createdby;
|
||||
$question->modifiedby = $questiondata->modifiedby;
|
||||
|
||||
//Fill extra question fields values
|
||||
$extraquestionfields = $this->extra_question_fields();
|
||||
if (is_array($extraquestionfields)) {
|
||||
//omit table name
|
||||
array_shift($extraquestionfields);
|
||||
foreach($extraquestionfields as $field) {
|
||||
$question->$field = $questiondata->options->$field;
|
||||
}
|
||||
}
|
||||
|
||||
$this->initialise_question_hints($question, $questiondata);
|
||||
}
|
||||
|
||||
|
@ -59,10 +59,6 @@ class qtype_shortanswer_edit_form extends question_edit_form {
|
||||
$question = $this->data_preprocessing_answers($question);
|
||||
$question = $this->data_preprocessing_hints($question);
|
||||
|
||||
if (!empty($question->options)) {
|
||||
$question->usecase = $question->options->usecase;
|
||||
}
|
||||
|
||||
return $question;
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,6 @@ class qtype_shortanswer extends question_type {
|
||||
|
||||
protected function initialise_question_instance(question_definition $question, $questiondata) {
|
||||
parent::initialise_question_instance($question, $questiondata);
|
||||
$question->usecase = $questiondata->options->usecase;
|
||||
$this->initialise_question_answers($question, $questiondata);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user