Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
@mod @mod_quiz @format @format_singleactivity
2
Feature: Teacher can build quiz in a single activity format course
3
  In order to build a quiz in a single activity course format
4
  As a teacher
5
  I should be able to change course format
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | student  | Student   | 1        | student1@example.com |
11
    And the following "courses" exist:
12
      | fullname | shortname | format         | activitytype |
13
      | Course 1 | C1        | singleactivity | quiz         |
14
    And the following "course enrolments" exist:
15
      | user    | course | role    |
16
      | student | C1     | student |
17
    # Create multiple question banks to have questions from different question banks.
18
    And the following "activities" exist:
19
      | activity | course | name            | idnumber |
20
      | quiz     | C1     | Quiz 1          | q1       |
21
      | qbank    | C1     | Question bank 1 | qbank1   |
22
      | qbank    | C1     | Question bank 2 | qbank2   |
23
    And the following "question categories" exist:
24
      | contextlevel    | reference | name              |
25
      | Activity module | q1        | Test questions    |
26
      | Activity module | qbank1    | Qbank questions 1 |
27
      | Activity module | qbank2    | Qbank questions 2 |
28
    And the following "questions" exist:
29
      | questioncategory  | qtype       | template    | name                    |
30
      | Test questions    | multichoice | one_of_four | MCQ1                    |
31
      | Test questions    | multichoice | one_of_four | MCQ2                    |
32
      | Qbank questions 1 | truefalse   |             | TFQ1                    |
33
      | Qbank questions 2 | truefalse   |             | TFQ2                    |
34
      | Test questions    | random      |             | Random (Test questions) |
35
    # Add questions from different question categories and question banks to the quiz.
36
    # Add at least 1 random question.
37
    And quiz "Quiz 1" contains the following questions:
38
      | question                | page |
39
      | MCQ1                    | 1    |
40
      | TFQ1                    | 1    |
41
      | TFQ2                    | 2    |
42
      | Random (Test questions) | 3    |
43
 
44
  @javascript
45
  Scenario: Student can preview and answer quiz in a single activity format course
46
    Given I am on the "Quiz 1" "quiz activity" page logged in as student
47
    # By attempting the quiz, it can be confirmed that the quiz questions have been added successfully.
48
    When I press "Attempt quiz"
49
    And I click on "One" "qtype_multichoice > Answer"
50
    And I set the following fields to these values:
51
      | False | 1 |
52
    And I press "Next page"
53
    And I set the following fields to these values:
54
      | True | 1 |
55
    And I press "Next page"
56
    And I click on "Three" "qtype_multichoice > Answer"
57
    And I press "Finish attempt ..."
58
    # Confirm that answers are successfully saved.
59
    And I should see "Answer saved"
60
    And I press "Submit all and finish"
61
    And I click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
62
    # Confirm that quiz is finished successfully.
63
    Then I should see "Finished" in the "Status" "table_row"