mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-74941 qtype_calculated: Copy dataset from previous question version
This commit is contained in:
parent
27093b1893
commit
0e18ad33a1
1 changed files with 1 additions and 11 deletions
|
@ -640,7 +640,7 @@ class qtype_calculated extends question_type {
|
|||
if (isset($form->synchronize) && $form->synchronize == 2) {
|
||||
$this->addnamecategory($question);
|
||||
}
|
||||
} else if (!empty($form->makecopy)) {
|
||||
} else {
|
||||
$questionfromid = $form->id;
|
||||
$question = parent::save_question($question, $form);
|
||||
// Prepare the datasets.
|
||||
|
@ -650,16 +650,6 @@ class qtype_calculated extends question_type {
|
|||
if (isset($form->synchronize) && $form->synchronize == 2) {
|
||||
$this->addnamecategory($question);
|
||||
}
|
||||
} else {
|
||||
// Editing a question.
|
||||
$question = parent::save_question($question, $form);
|
||||
// Prepare the datasets.
|
||||
$this->preparedatasets($form, $question->id);
|
||||
$form->id = $question->id;
|
||||
$this->save_dataset_definitions($form);
|
||||
if (isset($form->synchronize) && $form->synchronize == 2) {
|
||||
$this->addnamecategory($question);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'datasetdefinitions':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue