Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@qtype @qtype_multichoice
2
Feature: Test creating a Multiple choice question
3
  As a teacher
4
  In order to test my students
5
  I need to be able to create a Multiple choice question
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
  Scenario: Create a Multiple choice question with multiple response
19
    When I am on the "Course 1" "core_question > course question bank" page logged in as teacher
20
    And I add a "Multiple choice" question filling the form with:
21
      | Question name            | Multi-choice-001                   |
22
      | Question text            | Find the capital cities in Europe. |
23
      | General feedback         | Paris and London                   |
24
      | One or multiple answers? | Multiple answers allowed           |
25
      | Choice 1                 | Tokyo                              |
26
      | Choice 2                 | Spain                              |
27
      | Choice 3                 | London                             |
28
      | Choice 4                 | Barcelona                          |
29
      | Choice 5                 | Paris                              |
30
      | id_fraction_0            | None                               |
31
      | id_fraction_1            | None                               |
32
      | id_fraction_2            | 50%                                |
33
      | id_fraction_3            | None                               |
34
      | id_fraction_4            | 50%                                |
35
      | Hint 1                   | First hint                         |
36
      | Hint 2                   | Second hint                        |
37
    Then I should see "Multi-choice-001"
38
 
39
  @javascript
40
  Scenario: Create a Multiple choice question with single response
41
    When I am on the "Course 1" "core_question > course question bank" page logged in as teacher
42
    And I add a "Multiple choice" question filling the form with:
43
      | Question name              | Multi-choice-002                       |
44
      | Question text              | Find the capital city of England.      |
45
      | General feedback           | London is the capital city of England. |
46
      | Default mark               | 5                                      |
47
      | One or multiple answers?   | One answer only                        |
48
      | Shuffle the choices?       | 0                                      |
49
      | Number the choices?        | 1., 2., 3., ...                        |
50
      | Show standard instructions | Yes                                    |
51
      | Choice 1                   | Manchester                             |
52
      | Choice 2                   | Buckingham                             |
53
      | Choice 3                   | London                                 |
54
      | Choice 4                   | Barcelona                              |
55
      | Choice 5                   | Paris                                  |
56
      | id_fraction_0              | None                                   |
57
      | id_fraction_1              | None                                   |
58
      | id_fraction_2              | 100%                                   |
59
      | id_fraction_3              | None                                   |
60
      | id_fraction_4              | None                                   |
61
      | Hint 1                     | First hint                             |
62
      | Hint 2                     | Second hint                            |
63
    Then I should see "Multi-choice-002"
64
    # Checking that the next new question form displays user preferences settings.
65
    And I press "Create a new question ..."
66
    And I set the field "Multiple choice" to "1"
67
    And I click on "Add" "button" in the "Choose a question type to add" "dialogue"
68
    And the following fields match these values:
69
      | Default mark               | 5                 |
70
      | One or multiple answers?   | One answer only   |
71
      | Shuffle the choices?       | 0                 |
72
      | Number the choices?        | 1., 2., 3., ...   |
73
      | Show standard instructions | Yes               |