Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_course
2
Feature: Allow teachers to edit the visibility of activity dates in a course
3
  In order to show students the activity dates in a course
4
  As a teacher
5
  I need to be able to edit activity dates settings
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email |
10
      | teacher1 | Teacher | 1 | teacher1@example.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 "activities" exist:
18
      | activity | course | idnumber | name          | intro                   | timeopen      | timeclose     |
19
      | choice   | C1     | choice1  | Test choice   | Test choice description | ##yesterday## | ##tomorrow##  |
20
 
21
  Scenario: Activity dates setting can be enabled to display activity dates in a course
22
    Given I log in as "teacher1"
23
    And I am on "Course 1" course homepage with editing mode on
24
    And I navigate to "Settings" in current page administration
25
    When I set the following fields to these values:
26
      | Show activity dates | Yes |
27
    And I click on "Save and display" "button"
28
    And I follow "Test choice"
29
    Then the activity date information in "Test choice" should exist
30
    And the activity date in "Test choice" should contain "Opened:"
31
    And the activity date in "Test choice" should contain "Closes:"
32
    And I am on "Course 1" course homepage
33
    # When showactivitydates is enabled, activity dates should be shown on the course homepage.
34
    And the activity date information in "Test choice" should exist
35
    And the activity date in "Test choice" should contain "Opened:"
36
    And the activity date in "Test choice" should contain "Closes:"
37
 
38
  Scenario: Activity dates setting can be disabled to hide activity dates in a course
39
    Given I log in as "teacher1"
40
    And I am on "Course 1" course homepage with editing mode on
41
    And I navigate to "Settings" in current page administration
42
    When I set the following fields to these values:
43
      | Show activity dates | No |
44
    And I click on "Save and display" "button"
45
    And I follow "Test choice"
46
    # Activity dates are always shown in the module's view page.
47
    Then the activity date information in "Test choice" should exist
48
    And the activity date in "Test choice" should contain "Opened:"
49
    And the activity date in "Test choice" should contain "Closes:"
50
    And I am on "Course 1" course homepage
51
    # When showactivitydates is disabled, activity dates should not be shown on the course homepage.
52
    And the activity date information in "Test choice" should not exist
53
 
54
  Scenario: Default activity dates setting default value can changed to No
55
    Given I log in as "admin"
56
    And I navigate to "Courses > Default settings > Course default settings" in site administration
57
    When I set the following fields to these values:
58
      | Show activity dates | No |
59
    And I click on "Save changes" "button"
60
    And I navigate to "Courses > Add a new course" in site administration
61
    Then the field "showactivitydates" matches value "No"
62
 
63
  Scenario: Default activity dates setting default value can changed to Yes
64
    Given I log in as "admin"
65
    And I navigate to "Courses > Default settings > Course default settings" in site administration
66
    When I set the following fields to these values:
67
      | Show activity dates | Yes |
68
    And I click on "Save changes" "button"
69
    And I navigate to "Courses > Add a new course" in site administration
70
    Then the field "showactivitydates" matches value "Yes"