mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Merge branch 'MDL-64286' of https://github.com/timhunt/moodle
This commit is contained in:
commit
41c8df2583
@ -225,8 +225,6 @@ class qtype_gapselect_edit_form_base extends question_edit_form {
|
||||
}
|
||||
|
||||
protected function data_preprocessing_choice($question, $answer, $key) {
|
||||
// See comment in data_preprocessing_answers.
|
||||
unset($this->_form->_defaultValues['choices[$key][choicegroup]']);
|
||||
$question->choices[$key]['answer'] = $answer->answer;
|
||||
$question->choices[$key]['choicegroup'] = $answer->feedback;
|
||||
return $question;
|
||||
|
@ -27,9 +27,12 @@ Feature: Test all the basic functionality of this question type
|
||||
| General feedback | The cat sat on the mat. |
|
||||
| id_choices_0_answer | cat |
|
||||
| id_choices_1_answer | sat |
|
||||
| id_choices_1_choicegroup | 2 |
|
||||
| id_choices_2_answer | mat |
|
||||
| id_choices_3_answer | dog |
|
||||
| id_choices_4_answer | table |
|
||||
| id_choices_5_answer | ran |
|
||||
| id_choices_5_choicegroup | 2 |
|
||||
| Hint 1 | First hint |
|
||||
| Hint 2 | Second hint |
|
||||
Then I should see "Select missing words 001"
|
||||
@ -48,8 +51,8 @@ Feature: Test all the basic functionality of this question type
|
||||
| How questions behave | Interactive with multiple tries |
|
||||
| Marked out of | 3 |
|
||||
| Marks | Show mark and max |
|
||||
| Specific feedback | Shown |
|
||||
| Right answer | Shown |
|
||||
| Specific feedback | Shown |
|
||||
| Right answer | Shown |
|
||||
And I press "Start again with these options"
|
||||
|
||||
# Answer question correctly
|
||||
@ -113,8 +116,8 @@ Feature: Test all the basic functionality of this question type
|
||||
|
||||
# Answer question incorrectly
|
||||
And I set space "1" to "mat" in the select missing words question
|
||||
And I set space "2" to "cat" in the select missing words question
|
||||
And I set space "3" to "sat" in the select missing words question
|
||||
And I set space "2" to "ran" in the select missing words question
|
||||
And I set space "3" to "table" in the select missing words question
|
||||
And I press "Check"
|
||||
Then I should see "Your answer is incorrect"
|
||||
And I should see "The cat sat on the mat"
|
||||
@ -140,9 +143,12 @@ Feature: Test all the basic functionality of this question type
|
||||
| General feedback | The cat sat on the mat. |
|
||||
| id_choices_0_answer | cat |
|
||||
| id_choices_1_answer | sat |
|
||||
| id_choices_1_choicegroup | 2 |
|
||||
| id_choices_2_answer | mat |
|
||||
| id_choices_3_answer | dog |
|
||||
| id_choices_4_answer | table |
|
||||
| id_choices_5_answer | ran |
|
||||
| id_choices_5_choicegroup | 2 |
|
||||
| Hint 1 | First hint |
|
||||
| Hint 2 | Second hint |
|
||||
And I set the following fields to these values:
|
||||
|
Loading…
x
Reference in New Issue
Block a user