Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@qtype @qtype_calculatedmulti
2
Feature: Test creating a Calculated multichoice question
3
  As a teacher
4
  In order to test my students
5
  I need to be able to create Calculated multichoice 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
    And the following "question categories" exist:
18
      | contextlevel | reference | name           |
19
      | Course       | C1        | Test questions |
20
 
21
  Scenario: Create a Calculated question
22
    When I am on the "Course 1" "core_question > course question bank" page logged in as teacher
23
    And I press "Create a new question ..."
24
    And I set the field "Calculated multichoice" to "1"
25
    And I press "Add"
26
    And I set the following fields to these values:
27
      | Question name | calculatedmulti-001                               |
28
      | Question text | What is the sum of those two numbers: {a} and {b} |
29
      | Choice 1      | {a}+{b}                                           |
30
      | Grade         | 100%                                              |
31
      | Choice 2      | {a}*{b}                                           |
32
      | Choice 3      | {a}-{b}                                           |
33
    And I press "id_submitbutton"
34
    And I should see "Choose wildcards dataset properties"
35
    And I press "id_submitbutton"
36
    And I should see "Edit the wildcards datasets"
37
    And I press "id_addbutton"
38
    And I set the following fields to these values:
39
      | id_number_2       | 3.0 |
40
      | id_number_1       | 4.0 |
41
    And I press "id_savechanges"
42
    # Checking that the wildcard values are there
43
    And I am on the "calculatedmulti-001" "core_question > edit" page logged in as teacher
44
    And I press "id_submitbutton"
45
    And I should see "Choose wildcards dataset properties"
46
    And I press "id_submitbutton"
47
    Then I should see "3+4"