Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@qtype @qtype_gapselect
2
Feature: Test creating a Select missing words question
3
  As a teacher
4
  In order to test my students
5
  I need to be able to create Select missing words questions
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username |
10
      | teacher  |
11
    And the following "courses" exist:
12
      | fullname | shortname | category |
13
      | Course 1 | C1        | 0        |
14
    And the following "course enrolments" exist:
15
      | user    | course | role           |
16
      | teacher | C1     | editingteacher |
17
 
18
  @javascript
19
  Scenario: Create a Select missing words question
20
    When I am on the "Course 1" "core_question > course question bank" page logged in as teacher
21
    And I add a "Select missing words" question filling the form with:
22
      | Question name             | Select missing words 001   |
23
      | Question text             | The [[1]] [[2]] on the [[3]]. |
24
      | General feedback          | The cat sat on the mat.       |
25
      | id_shuffleanswers         | 1                             |
26
      | id_choices_0_answer       | cat                           |
27
      | id_choices_1_answer       | sat                           |
28
      | id_choices_2_answer       | mat                           |
29
      | id_choices_3_answer       | dog                           |
30
      | id_choices_4_answer       | table                         |
31
      | Hint 1                    | First hint                    |
32
      | Hint 2                    | Second hint                   |
33
    Then I should see "Select missing words 001"
34
    # Checking that the next new question form displays user preferences settings.
35
    And I press "Create a new question ..."
36
    And I set the field "item_qtype_gapselect" to "1"
37
    And I click on "Add" "button" in the "Choose a question type to add" "dialogue"
38
    And the following fields match these values:
39
      | id_shuffleanswers | 1 |
40
 
41
  Scenario: Edit a Select missing words question with 2 choice and should not have empty choice.
42
    Given I am on the "Course 1" "core_question > course question bank" page logged in as teacher
43
    And I add a "Select missing words" question filling the form with:
44
      | Question name            | Select missing words 002    |
45
      | Question text            | The [[1]] [[2]] on the mat. |
46
      | General feedback         | The cat sat on the mat.     |
47
      | id_shuffleanswers        | 1                           |
48
      | id_choices_0_answer      | cat                         |
49
      | id_choices_1_answer      | sat                         |
50
      | id_choices_2_answer      | dog                         |
51
      | id_choices_2_choicegroup | 2                           |
52
      | id_choices_3_answer      | stand                       |
53
      | id_choices_3_choicegroup | 2                           |
54
      | Hint 1                   | First hint                  |
55
      | Hint 2                   | Second hint                 |
56
    When I choose "Edit question" action for "Select missing words 002" in the question bank
57
    And the following fields match these values:
58
      | Question name            | Select missing words 002    |
59
      | Question text            | The [[1]] [[2]] on the mat. |
60
      | General feedback         | The cat sat on the mat.     |
61
      | id_shuffleanswers        | 1                           |
62
      | id_choices_0_answer      | cat                         |
63
      | id_choices_1_answer      | sat                         |
64
      | id_choices_2_answer      | dog                         |
65
      | id_choices_2_choicegroup | 2                           |
66
      | id_choices_3_answer      | stand                       |
67
      | id_choices_3_choicegroup | 2                           |
68
      | Hint 1                   | First hint                  |
69
      | Hint 2                   | Second hint                 |
70
    Then I should not see "Choice [[5]]"