Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_quiz
2
Feature: Quiz with no calendar capabilites
3
  In order to allow work effectively
4
  As a teacher
5
  I need to be able to create quiz even when I cannot edit calendar events
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | category | groupmode |
10
      | Course 1 | C1 | 0 | 1 |
11
    And the following "users" exist:
12
      | username | firstname | lastname | email |
13
      | teacher1 | Teacher | 1 | teacher1@example.com |
14
    And the following "course enrolments" exist:
15
      | user | course | role |
16
      | teacher1 | C1 | editingteacher |
17
    And the following "activity" exists:
18
      | activity | quiz                  |
19
      | course   | C1                    |
20
      | idnumber | 00001                 |
21
      | name     | Test quiz name        |
22
      | intro    | Test quiz description |
23
      | section  | 1                     |
24
    And I log in as "admin"
25
    And I am on "Course 1" course homepage
26
    And I follow "Test quiz name"
27
    And I navigate to "Settings" in current page administration
28
    And I set the following fields to these values:
29
      | id_timeopen_enabled | 1 |
30
      | id_timeopen_day | 1 |
31
      | id_timeopen_month | 1 |
32
      | id_timeopen_year | 2017 |
33
      | id_timeclose_enabled | 1 |
34
      | id_timeclose_day | 1 |
35
      | id_timeclose_month | 2 |
36
      | id_timeclose_year | 2017 |
37
    And I press "Save and return to course"
38
    And I am on the "Course 1" "permissions" page
39
    And I override the system permissions of "Teacher" role with:
40
      | capability | permission |
41
      | moodle/calendar:manageentries | Prohibit |
42
    And I log out
43
 
44
  Scenario: Editing a quiz
45
    When I am on the "Test quiz name" "mod_quiz > View" page logged in as "teacher1"
46
    And I navigate to "Settings" in current page administration
47
    And I set the following fields to these values:
48
      | id_timeopen_year | 2018 |
49
      | id_timeclose_year | 2018 |
50
    And I press "Save and return to course"
51
    Then I should see "Test quiz name"