Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_courseformat
2
Feature: Verify activity visibility interface.
3
  In order to edit the course activity visibility
4
  As a teacher
5
  I need to be able to see the updateds visibility information
6
 
7
  Background:
8
    Given the following "course" exists:
9
      | fullname         | Course 1 |
10
      | shortname        | C1       |
11
      | category         | 0        |
12
      | numsections      | 3        |
13
    And the following "activities" exist:
14
      | activity | name              | intro                       | course | idnumber | section | visible |
15
      | assign   | Activity sample 1 | Test assignment description | C1     | sample1  | 1       | 1       |
16
      | assign   | Activity sample 2 | Test assignment description | C1     | sample2  | 1       | 0       |
17
    And the following "users" exist:
18
      | username | firstname | lastname | email                |
19
      | teacher1 | Teacher   | 1        | teacher1@example.com |
20
    And the following "course enrolments" exist:
21
      | user     | course | role           |
22
      | teacher1 | C1     | editingteacher |
23
    Given I am on the "C1" "Course" page logged in as "teacher1"
24
    And I turn editing mode on
25
 
26
  @javascript
27
  Scenario: Teacher can hide an activity using the actions menu.
28
    Given I should not see "Hidden from students" in the "Activity sample 1" "activity"
29
    When I open "Activity sample 1" actions menu
30
    And I choose "Hide" in the open action menu
31
    Then I should see "Hidden from students" in the "Activity sample 1" "core_courseformat > Activity visibility"
32
 
33
  @javascript
34
  Scenario: Teacher can show an activity using the actions menu.
35
    Given I should see "Hidden from students" in the "Activity sample 2" "core_courseformat > Activity visibility"
36
    When I open "Activity sample 2" actions menu
37
    And I choose "Show" in the open action menu
38
    Then I should not see "Hidden from students" in the "Activity sample 2" "activity"
39
 
40
  @javascript
41
  Scenario: Teacher can make available but not shown an activity using the actions menu.
42
    Given the following config values are set as admin:
43
      | allowstealth | 1 |
44
    And I reload the page
45
    And I should see "Hidden from students" in the "Activity sample 2" "core_courseformat > Activity visibility"
46
    When I open "Activity sample 2" actions menu
47
    And I choose "Availability > Make available but don't show on course page" in the open action menu
48
    Then I should not see "Hidden from students" in the "Activity sample 2" "activity"
49
    And I should see "Available but not shown on course page" in the "Activity sample 2" "core_courseformat > Activity visibility"
50
 
51
  @javascript
52
  Scenario: Teacher can show an activity using the visibility badge.
53
    Given I should see "Hidden from students" in the "Activity sample 2" "core_courseformat > Activity visibility"
54
    When I click on "Hidden from students" "button" in the "Activity sample 2" "core_courseformat > Activity visibility"
55
    And I click on "Show on course page" "link" in the "Activity sample 2" "core_courseformat > Activity visibility"
56
    Then I should not see "Hidden from students" in the "Activity sample 2" "activity"
57
 
58
  @javascript
59
  Scenario: Teacher can make available but not shown an activity using the visibility badge.
60
    Given the following config values are set as admin:
61
      | allowstealth | 1 |
62
    And I reload the page
63
    When I click on "Hidden from students" "button" in the "Activity sample 2" "core_courseformat > Activity visibility"
64
    And I click on "Make available but don't show on course page" "link" in the "Activity sample 2" "core_courseformat > Activity visibility"
65
    Then I should not see "Hidden from students" in the "Activity sample 2" "activity"
66
    And I should see "Available but not shown on course page" in the "Activity sample 2" "core_courseformat > Activity visibility"
67
 
68
  @javascript
69
  Scenario: Make available but not shown is available only when stealth activities are enabled.
70
    Given I click on "Hidden from students" "button" in the "Activity sample 2" "core_courseformat > Activity visibility"
71
    And I should not see "Make available but don't show on course page" in the "Activity sample 2" "activity"
72
    When the following config values are set as admin:
73
      | allowstealth | 1 |
74
    And I reload the page
75
    And I click on "Hidden from students" "button" in the "Activity sample 2" "core_courseformat > Activity visibility"
76
    Then I should see "Make available but don't show on course page" in the "Activity sample 2" "core_courseformat > Activity visibility"