Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@qtype @qtype_ordering
2
Feature: Preview an Ordering question
3
  As a teacher
4
  In order to check my Ordering questions will work for students
5
  I need to preview them
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email               |
10
      | teacher1 | T1        | Teacher1 | teacher1@moodle.com |
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
      | teacher1 | C1     | editingteacher |
17
    And the following "question categories" exist:
18
      | contextlevel | reference | name           |
19
      | Course       | C1        | Test questions |
20
    And the following "questions" exist:
21
      | questioncategory | qtype    | name         | template | layouttype |
22
      | Test questions   | ordering | ordering-001 | moodle   | 0          |
23
 
24
  @javascript
25
  Scenario: Preview an Ordering question and submit a correct response.
26
    When I am on the "ordering-001" "core_question > preview" page logged in as teacher1
27
    And I expand all fieldsets
28
    And I set the field "How questions behave" to "Immediate feedback"
29
    And I press "id_saverestart"
30
    And I drag "Modular" to space "1" in the ordering question
31
    And I drag "Object" to space "2" in the ordering question
32
    And I drag "Oriented" to space "3" in the ordering question
33
    And I drag "Dynamic" to space "4" in the ordering question
34
    And I drag "Learning" to space "5" in the ordering question
35
    And I drag "Environment" to space "6" in the ordering question
36
    And I press "Submit and finish"
37
    Then I should see "Well done!"
38
    And I should see "Mark 1.00 out of 1.00"
39
 
40
  @javascript
41
  Scenario: Preview an Ordering question with show number of correct option.
42
    When I am on the "ordering-001" "core_question > preview" page logged in as teacher1
43
    And I expand all fieldsets
44
    And I set the field "How questions behave" to "Immediate feedback"
45
    And I press "id_saverestart"
46
    And I drag "Modular" to space "1" in the ordering question
47
    And I drag "Object" to space "6" in the ordering question
48
    And I drag "Oriented" to space "4" in the ordering question
49
    And I drag "Dynamic" to space "3" in the ordering question
50
    And I drag "Learning" to space "5" in the ordering question
51
    And I drag "Environment" to space "2" in the ordering question
52
    And I press "Submit and finish"
53
    And I should see "Correct items: 1"
54
    And I should see "Partially correct items: 5"
55
 
56
  @javascript
57
  Scenario: Preview an Ordering question with no show number of correct option.
58
    When I am on the "ordering-001" "core_question > edit" page logged in as teacher1
59
    And I set the following fields to these values:
60
      | id_shownumcorrect | 0                    |
61
      | Question name     | Renamed ordering-001 |
62
    And I press "id_submitbutton"
63
    And I am on the "Renamed ordering-001" "core_question > preview" page
64
    And I expand all fieldsets
65
    And I set the field "How questions behave" to "Immediate feedback"
66
    And I press "id_saverestart"
67
    And I drag "Modular" to space "1" in the ordering question
68
    And I drag "Environment" to space "2" in the ordering question
69
    And I drag "Dynamic" to space "3" in the ordering question
70
    And I drag "Oriented" to space "4" in the ordering question
71
    And I drag "Learning" to space "5" in the ordering question
72
    And I drag "Object" to space "6" in the ordering question
73
    And I press "Submit and finish"
74
    And I should not see "You have 1 item correct."
75
    And I should not see "You have 5 items partially correct."