Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@qtype @qtype_multianswer
2
Feature: Test creating a Multianswer (Cloze) question
3
  As a teacher
4
  In order to test my students
5
  I need to be able to create a Cloze 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 Cloze question
19
    When I am on the "Course 1" "core_question > course question bank" page logged in as teacher
20
    And I add a "Embedded answers (Cloze)" question filling the form with:
21
      | Question name        | multianswer-001                                     |
22
      | Question text        | {1:SHORTANSWER:=Berlin} is the capital of Germany.  |
23
      | General feedback     | The capital of Germany is Berlin.                   |
24
    Then I should see "multianswer-001" in the "categoryquestions" "table"
25
 
26
  Scenario: Create a broken Cloze question and correct it
27
    When I am on the "Course 1" "core_question > course question bank" page logged in as teacher
28
    And I press "Create a new question ..."
29
    And I set the field "Embedded answers (Cloze)" to "1"
30
    And I press "Add"
31
    And I set the field "Question name" to "multianswer-002"
32
    And I set the field "Question text" to "Please select the fruits {1:MULTICHOICE:=Apple#Correct}"
33
    And I set the field "General feedback" to "Apple are delicious."
34
    And I press "id_submitbutton"
35
    Then I should see "This type of question requires at least 2 choices"
36
    And I set the following fields to these values:
37
      | Question text | Please select the fruits {1:MULTICHOICE:=Apple#Correct~Banana#Wrong} |
38
    And I press "id_submitbutton"
39
    And I should see "multianswer-002" in the "categoryquestions" "table"
40
 
41
  Scenario: Try to create a Cloze question that has no answer
42
    When I am on the "Course 1" "core_question > course question bank" page logged in as teacher
43
    And I press "Create a new question ..."
44
    And I set the field "Embedded answers (Cloze)" to "1"
45
    And I press "Add"
46
    And I set the following fields to these values:
47
      | Question name | multianswer-003                                |
48
      | Question text | {1:SHORTANSWER:=  } is the capital of Germany. |
49
    And I press "id_submitbutton"
50
    Then I should see "This type of question requires at least 1 answers"