Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_chat @javascript
2
Feature: View past chat sessions
3
  In order for students to view past chat sessions
4
  As a teacher
5
  I need to be able to change the mod/chat:readlog permission for students
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | teacher1 | Teacher   | One      | teacher1@example.com |
11
      | student1 | Student   | One      | student1@example.com |
12
    And the following "course" exist:
13
      | fullname | shortname |
14
      | Course 1 | C1        |
15
    And the following "course enrolments" exist:
16
      | user     | course | role           |
17
      | teacher1 | C1     | editingteacher |
18
      | student1 | C1     | student        |
19
    And I enable "chat" "mod" plugin
20
 
21
  Scenario Outline: View past chat sessions
22
    # Display or hide past chat session based on example data
23
    Given the following "activities" exist:
24
      | activity | course | name   | studentlogs       |
25
      | chat     | C1     | Chat 1 | <studentlogvalue> |
26
    And I am on the "Chat 1" "chat activity" page logged in as teacher1
27
    # Display or hide past chat session by default based on mod/chat:readlog setting
28
    And the following "role capability" exists:
29
      | role             | student          |
30
      | mod/chat:readlog | <readpermission> |
31
    # Enter chat activity to create a session
32
    And I click on "Enter the chat" "link"
33
    # Close chat window
34
    When I close all opened windows
35
    And I reload the page
36
    # Confirm that past chat sessions is always visible for teacher
37
    Then I should see "Past sessions"
38
    # Confirm past chat sessions visibility for student based on settings
39
    And I am on the "Chat 1" "chat activity" page logged in as student1
40
    And I <sessionvisibility> see "Past sessions"
41
 
42
    # Regardless of studentlogvalue value if readpermission is allowed, then Past sessions will be visible for students
43
    Examples:
44
      | studentlogvalue | readpermission | sessionvisibility |
45
      | 0               | allow          | should            |
46
      | 1               | allow          | should            |
47
      | 0               | prohibit       | should not        |
48
      | 1               | prohibit       | should            |