Merge branch 'MDL-29095' of git://github.com/timhunt/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2011-11-23 12:05:36 +01:00
commit ab9dde2f97
3 changed files with 10 additions and 5 deletions

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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);
}