1 |
efrain |
1 |
@report @report_log
|
|
|
2 |
Feature: User can view activity log.
|
|
|
3 |
In order to view user log
|
|
|
4 |
As an teacher
|
|
|
5 |
I need to view user today's and all report
|
|
|
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 | idnumber | middlename | alternatename | firstnamephonetic | lastnamephonetic |
|
|
|
13 |
| teacher1 | Teacher | One | teacher1@example.com | t1 | | fred | | |
|
|
|
14 |
| student1 | Grainne | Beauchamp | student1@example.com | s1 | Ann | Jill | Gronya | Beecham |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| teacher1 | C1 | editingteacher |
|
|
|
18 |
| student1 | C1 | student |
|
|
|
19 |
And the following "activity" exists:
|
|
|
20 |
| activity | assign |
|
|
|
21 |
| course | C1 |
|
|
|
22 |
| idnumber | 0001 |
|
|
|
23 |
| name | Test assignment name |
|
|
|
24 |
| intro | Submit your online text |
|
|
|
25 |
| section | 1 |
|
|
|
26 |
| assignsubmission_onlinetext_enabled | 1 |
|
|
|
27 |
| assignsubmission_file_enabled | 0 |
|
|
|
28 |
And the following config values are set as admin:
|
|
|
29 |
| fullnamedisplay | firstname |
|
|
|
30 |
| alternativefullnameformat | middlename, alternatename, firstname, lastname |
|
|
|
31 |
And I log in as "student1"
|
|
|
32 |
And I am on "Course 1" course homepage
|
|
|
33 |
And I follow "Test assignment name"
|
|
|
34 |
When I press "Add submission"
|
|
|
35 |
And I set the following fields to these values:
|
|
|
36 |
| Online text | I'm the student first submission |
|
|
|
37 |
And I press "Save changes"
|
|
|
38 |
And I log out
|
|
|
39 |
|
|
|
40 |
Scenario: View Todays' and all log report for user
|
|
|
41 |
Given I log in as "teacher1"
|
|
|
42 |
And I am on "Course 1" course homepage
|
|
|
43 |
And I navigate to course participants
|
|
|
44 |
And I follow "Ann, Jill, Grainne, Beauchamp"
|
|
|
45 |
When I follow "Today's logs"
|
|
|
46 |
And I should see "Assignment: Test assignment name"
|
|
|
47 |
And I follow "Ann, Jill, Grainne, Beauchamp"
|
|
|
48 |
And I follow "All logs"
|
|
|
49 |
Then I should see "Assignment: Test assignment name"
|
|
|
50 |
|
|
|
51 |
Scenario: No log reader enabled should be visible when no log store enabled.
|
|
|
52 |
Given I log in as "admin"
|
|
|
53 |
And I navigate to "Plugins > Logging > Manage log stores" in site administration
|
|
|
54 |
And I click on "Disable" "link" in the "Standard log" "table_row"
|
|
|
55 |
And I log out
|
|
|
56 |
And I log in as "teacher1"
|
|
|
57 |
And I am on "Course 1" course homepage
|
|
|
58 |
And I navigate to course participants
|
|
|
59 |
And I follow "Ann, Jill, Grainne, Beauchamp"
|
|
|
60 |
When I follow "Today's logs"
|
|
|
61 |
And I should see "No log reader enabled"
|
|
|
62 |
And I am on "Course 1" course homepage
|
|
|
63 |
And I navigate to course participants
|
|
|
64 |
And I follow "Ann, Jill, Grainne, Beauchamp"
|
|
|
65 |
And I follow "All logs"
|
|
|
66 |
Then I should see "No log reader enabled"
|
|
|
67 |
|
|
|
68 |
Scenario: View Todays' log report for user through Course log report
|
|
|
69 |
Given I log in as "teacher1"
|
|
|
70 |
And I am on "Course 1" course homepage
|
|
|
71 |
And I navigate to "Reports" in current page administration
|
|
|
72 |
And I click on "Logs" "link"
|
|
|
73 |
And I set the field with xpath "//select[@name='user']" to "Ann, Jill, Grainne, Beauchamp"
|
|
|
74 |
When I click on "Get these logs" "button"
|
|
|
75 |
Then I should see "Ann, Jill, Grainne, Beauchamp"
|