|
@ -29,211 +29,211 @@ Feature: Visiting reports |
|
|
And I click on "id_submitbutton" "button" |
|
|
And I click on "id_submitbutton" "button" |
|
|
And I log out |
|
|
And I log out |
|
|
|
|
|
|
|
|
Scenario: Teacher takes attendance |
|
|
Scenario: Teacher takes attendance |
|
|
Given I log in as "teacher1" |
|
|
Given I log in as "teacher1" |
|
|
And I am on "Course 1" course homepage |
|
|
And I am on "Course 1" course homepage |
|
|
And I follow "Attendance" |
|
|
And I follow "Attendance" |
|
|
And I follow "Edit settings" |
|
|
And I follow "Edit settings" |
|
|
Then I set the following fields to these values: |
|
|
Then I set the following fields to these values: |
|
|
| id_grade_modgrade_type | Point | |
|
|
| id_grade_modgrade_type | Point | |
|
|
| id_grade_modgrade_point | 50 | |
|
|
| id_grade_modgrade_point | 50 | |
|
|
And I press "Save and display" |
|
|
And I press "Save and display" |
|
|
|
|
|
|
|
|
When I follow "Report" |
|
|
When I follow "Report" |
|
|
Then "0 / 0" "text" should exist in the "Student 1" "table_row" |
|
|
Then "0 / 0" "text" should exist in the "Student 1" "table_row" |
|
|
And "0.0%" "text" should exist in the "Student 1" "table_row" |
|
|
And "0.0%" "text" should exist in the "Student 1" "table_row" |
|
|
|
|
|
|
|
|
When I follow "Grades" in the user menu |
|
|
When I follow "Grades" in the user menu |
|
|
And I follow "Course 1" |
|
|
And I follow "Course 1" |
|
|
And "-" "text" should exist in the "Student 1" "table_row" |
|
|
And "-" "text" should exist in the "Student 1" "table_row" |
|
|
|
|
|
|
|
|
When I follow "Attendance" |
|
|
When I follow "Attendance" |
|
|
Then I click on "Take attendance" "link" in the "1am - 2am" "table_row" |
|
|
Then I click on "Take attendance" "link" in the "1am - 2am" "table_row" |
|
|
# Late |
|
|
# Late |
|
|
And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row" |
|
|
And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row" |
|
|
And I press "Save attendance" |
|
|
And I press "Save attendance" |
|
|
|
|
|
|
|
|
When I follow "Report" |
|
|
When I follow "Report" |
|
|
Then "1 / 2" "text" should exist in the "Student 1" "table_row" |
|
|
Then "1 / 2" "text" should exist in the "Student 1" "table_row" |
|
|
And "50.0%" "text" should exist in the "Student 1" "table_row" |
|
|
And "50.0%" "text" should exist in the "Student 1" "table_row" |
|
|
|
|
|
|
|
|
When I follow "Grades" in the user menu |
|
|
When I follow "Grades" in the user menu |
|
|
And I follow "Course 1" |
|
|
And I follow "Course 1" |
|
|
And "25.00" "text" should exist in the "Student 1" "table_row" |
|
|
And "25.00" "text" should exist in the "Student 1" "table_row" |
|
|
|
|
|
|
|
|
And I log out |
|
|
And I log out |
|
|
|
|
|
|
|
|
Scenario: Teacher changes the maximum points in the attendance settings |
|
|
Scenario: Teacher changes the maximum points in the attendance settings |
|
|
Given I log in as "teacher1" |
|
|
Given I log in as "teacher1" |
|
|
And I am on "Course 1" course homepage |
|
|
And I am on "Course 1" course homepage |
|
|
And I follow "Attendance" |
|
|
And I follow "Attendance" |
|
|
And I follow "Edit settings" |
|
|
And I follow "Edit settings" |
|
|
Then I set the following fields to these values: |
|
|
Then I set the following fields to these values: |
|
|
| id_grade_modgrade_type | Point | |
|
|
| id_grade_modgrade_type | Point | |
|
|
| id_grade_modgrade_point | 50 | |
|
|
| id_grade_modgrade_point | 50 | |
|
|
And I press "Save and display" |
|
|
And I press "Save and display" |
|
|
|
|
|
|
|
|
When I follow "Attendance" |
|
|
When I follow "Attendance" |
|
|
Then I click on "Take attendance" "link" in the "1am - 2am" "table_row" |
|
|
Then I click on "Take attendance" "link" in the "1am - 2am" "table_row" |
|
|
# Excused |
|
|
# Excused |
|
|
And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row" |
|
|
And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row" |
|
|
And I press "Save attendance" |
|
|
And I press "Save attendance" |
|
|
|
|
|
|
|
|
When I follow "Attendance" |
|
|
When I follow "Attendance" |
|
|
And I follow "Edit settings" |
|
|
And I follow "Edit settings" |
|
|
Then I set the following fields to these values: |
|
|
Then I set the following fields to these values: |
|
|
| id_grade_modgrade_type | Point | |
|
|
| id_grade_modgrade_type | Point | |
|
|
| id_grade_modgrade_point | 70 | |
|
|
| id_grade_modgrade_point | 70 | |
|
|
And I press "Save and display" |
|
|
And I press "Save and display" |
|
|
|
|
|
|
|
|
When I follow "Report" |
|
|
When I follow "Report" |
|
|
Then "1 / 2" "text" should exist in the "Student 1" "table_row" |
|
|
Then "1 / 2" "text" should exist in the "Student 1" "table_row" |
|
|
And "50.0%" "text" should exist in the "Student 1" "table_row" |
|
|
And "50.0%" "text" should exist in the "Student 1" "table_row" |
|
|
|
|
|
|
|
|
When I follow "Grades" in the user menu |
|
|
When I follow "Grades" in the user menu |
|
|
And I follow "Course 1" |
|
|
And I follow "Course 1" |
|
|
Then "35.00" "text" should exist in the "Student 1" "table_row" |
|
|
Then "35.00" "text" should exist in the "Student 1" "table_row" |
|
|
And I log out |
|
|
And I log out |
|
|
|
|
|
|
|
|
Scenario: Teacher take attendance of group session |
|
|
Scenario: Teacher take attendance of group session |
|
|
Given the following "groups" exist: |
|
|
Given the following "groups" exist: |
|
|
| course | name | idnumber | |
|
|
| course | name | idnumber | |
|
|
| C1 | Group1 | Group1 | |
|
|
| C1 | Group1 | Group1 | |
|
|
And the following "group members" exist: |
|
|
And the following "group members" exist: |
|
|
| group | user | |
|
|
| group | user | |
|
|
| Group1 | student1 | |
|
|
| Group1 | student1 | |
|
|
|
|
|
|
|
|
When I log in as "teacher1" |
|
|
When I log in as "teacher1" |
|
|
And I am on "Course 1" course homepage |
|
|
And I am on "Course 1" course homepage |
|
|
And I follow "Attendance" |
|
|
And I follow "Attendance" |
|
|
And I follow "Edit settings" |
|
|
And I follow "Edit settings" |
|
|
And I set the following fields to these values: |
|
|
And I set the following fields to these values: |
|
|
| id_grade_modgrade_type | Point | |
|
|
| id_grade_modgrade_type | Point | |
|
|
| id_grade_modgrade_point | 50 | |
|
|
| id_grade_modgrade_point | 50 | |
|
|
| id_groupmode | Visible groups | |
|
|
| id_groupmode | Visible groups | |
|
|
And I press "Save and display" |
|
|
And I press "Save and display" |
|
|
|
|
|
|
|
|
When I follow "Attendance" |
|
|
When I follow "Attendance" |
|
|
Then I click on "Take attendance" "link" in the "1am - 2am" "table_row" |
|
|
Then I click on "Take attendance" "link" in the "1am - 2am" "table_row" |
|
|
# Excused |
|
|
# Excused |
|
|
And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row" |
|
|
And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row" |
|
|
And I press "Save attendance" |
|
|
And I press "Save attendance" |
|
|
|
|
|
|
|
|
When I follow "Add session" |
|
|
When I follow "Add session" |
|
|
And I set the following fields to these values: |
|
|
And I set the following fields to these values: |
|
|
| id_sestime_starthour | 03 | |
|
|
| id_sestime_starthour | 03 | |
|
|
| id_sestime_endhour | 04 | |
|
|
| id_sestime_endhour | 04 | |
|
|
| id_sessiontype_1 | 1 | |
|
|
| id_sessiontype_1 | 1 | |
|
|
| id_groups | Group1 | |
|
|
| id_groups | Group1 | |
|
|
And I click on "id_submitbutton" "button" |
|
|
And I click on "id_submitbutton" "button" |
|
|
Then I should see "3am - 4am" |
|
|
Then I should see "3am - 4am" |
|
|
And "Group: Group1" "text" should exist in the "3am - 4am" "table_row" |
|
|
And "Group: Group1" "text" should exist in the "3am - 4am" "table_row" |
|
|
|
|
|
|
|
|
When I click on "Take attendance" "link" in the "3am - 4am" "table_row" |
|
|
When I click on "Take attendance" "link" in the "3am - 4am" "table_row" |
|
|
# Present |
|
|
# Present |
|
|
And I click on "td.cell.c3 input" "css_element" in the "Student 1" "table_row" |
|
|
And I click on "td.cell.c3 input" "css_element" in the "Student 1" "table_row" |
|
|
And I press "Save attendance" |
|
|
And I press "Save attendance" |
|
|
|
|
|
|
|
|
When I follow "Report" |
|
|
When I follow "Report" |
|
|
Then "3 / 4" "text" should exist in the "Student 1" "table_row" |
|
|
Then "3 / 4" "text" should exist in the "Student 1" "table_row" |
|
|
And "75.0%" "text" should exist in the "Student 1" "table_row" |
|
|
And "75.0%" "text" should exist in the "Student 1" "table_row" |
|
|
|
|
|
|
|
|
When I follow "Grades" in the user menu |
|
|
When I follow "Grades" in the user menu |
|
|
And I follow "Course 1" |
|
|
And I follow "Course 1" |
|
|
Then "37.50" "text" should exist in the "Student 1" "table_row" |
|
|
Then "37.50" "text" should exist in the "Student 1" "table_row" |
|
|
|
|
|
|
|
|
And I log out |
|
|
And I log out |
|
|
|
|
|
|
|
|
Scenario: Teacher visit summary report |
|
|
Scenario: Teacher visit summary report |
|
|
Given I log in as "teacher1" |
|
|
Given I log in as "teacher1" |
|
|
And I am on "Course 1" course homepage |
|
|
And I am on "Course 1" course homepage |
|
|
And I follow "Attendance" |
|
|
And I follow "Attendance" |
|
|
And I follow "Edit settings" |
|
|
And I follow "Edit settings" |
|
|
And I set the following fields to these values: |
|
|
And I set the following fields to these values: |
|
|
| id_grade_modgrade_type | Point | |
|
|
| id_grade_modgrade_type | Point | |
|
|
| id_grade_modgrade_point | 50 | |
|
|
| id_grade_modgrade_point | 50 | |
|
|
And I press "Save and display" |
|
|
And I press "Save and display" |
|
|
|
|
|
|
|
|
When I click on "Take attendance" "link" in the "1am - 2am" "table_row" |
|
|
When I click on "Take attendance" "link" in the "1am - 2am" "table_row" |
|
|
# Late |
|
|
# Late |
|
|
And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row" |
|
|
And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row" |
|
|
And I press "Save attendance" |
|
|
And I press "Save attendance" |
|
|
|
|
|
|
|
|
When I follow "Add session" |
|
|
When I follow "Add session" |
|
|
And I set the following fields to these values: |
|
|
And I set the following fields to these values: |
|
|
| id_sestime_starthour | 03 | |
|
|
| id_sestime_starthour | 03 | |
|
|
| id_sestime_endhour | 04 | |
|
|
| id_sestime_endhour | 04 | |
|
|
And I click on "id_submitbutton" "button" |
|
|
And I click on "id_submitbutton" "button" |
|
|
Then I should see "3am - 4am" |
|
|
Then I should see "3am - 4am" |
|
|
|
|
|
|
|
|
When I click on "Take attendance" "link" in the "3am - 4am" "table_row" |
|
|
When I click on "Take attendance" "link" in the "3am - 4am" "table_row" |
|
|
# Present |
|
|
# Present |
|
|
And I click on "td.cell.c3 input" "css_element" in the "Student 1" "table_row" |
|
|
And I click on "td.cell.c3 input" "css_element" in the "Student 1" "table_row" |
|
|
And I press "Save attendance" |
|
|
And I press "Save attendance" |
|
|
|
|
|
|
|
|
When I follow "Add session" |
|
|
When I follow "Add session" |
|
|
And I set the following fields to these values: |
|
|
And I set the following fields to these values: |
|
|
| id_sestime_starthour | 05 | |
|
|
| id_sestime_starthour | 05 | |
|
|
| id_sestime_endhour | 06 | |
|
|
| id_sestime_endhour | 06 | |
|
|
And I click on "id_submitbutton" "button" |
|
|
And I click on "id_submitbutton" "button" |
|
|
Then I should see "5am - 6am" |
|
|
Then I should see "5am - 6am" |
|
|
|
|
|
|
|
|
When I follow "Report" |
|
|
When I follow "Report" |
|
|
And I click on "Summary" "link" in the "All" "table_row" |
|
|
And I click on "Summary" "link" in the "All" "table_row" |
|
|
|
|
|
|
|
|
Then "3 / 6" "text" should exist in the "Student 1" "table_row" |
|
|
Then "3 / 6" "text" should exist in the "Student 1" "table_row" |
|
|
And "50.0%" "text" should exist in the "Student 1" "table_row" |
|
|
And "50.0%" "text" should exist in the "Student 1" "table_row" |
|
|
And "5 / 6" "text" should exist in the "Student 1" "table_row" |
|
|
And "5 / 6" "text" should exist in the "Student 1" "table_row" |
|
|
And "83.3%" "text" should exist in the "Student 1" "table_row" |
|
|
And "83.3%" "text" should exist in the "Student 1" "table_row" |
|
|
|
|
|
|
|
|
And I log out |
|
|
And I log out |
|
|
|
|
|
|
|
|
Scenario: Student visit user report |
|
|
Scenario: Student visit user report |
|
|
Given I log in as "teacher1" |
|
|
Given I log in as "teacher1" |
|
|
And I am on "Course 1" course homepage |
|
|
And I am on "Course 1" course homepage |
|
|
And I follow "Attendance" |
|
|
And I follow "Attendance" |
|
|
And I follow "Edit settings" |
|
|
And I follow "Edit settings" |
|
|
Then I set the following fields to these values: |
|
|
Then I set the following fields to these values: |
|
|
| id_grade_modgrade_type | Point | |
|
|
| id_grade_modgrade_type | Point | |
|
|
| id_grade_modgrade_point | 50 | |
|
|
| id_grade_modgrade_point | 50 | |
|
|
And I press "Save and display" |
|
|
And I press "Save and display" |
|
|
|
|
|
|
|
|
When I click on "Take attendance" "link" in the "1am - 2am" "table_row" |
|
|
When I click on "Take attendance" "link" in the "1am - 2am" "table_row" |
|
|
# Late |
|
|
# Late |
|
|
And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row" |
|
|
And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row" |
|
|
And I press "Save attendance" |
|
|
And I press "Save attendance" |
|
|
|
|
|
|
|
|
When I follow "Add session" |
|
|
When I follow "Add session" |
|
|
And I set the following fields to these values: |
|
|
And I set the following fields to these values: |
|
|
| id_sestime_starthour | 03 | |
|
|
| id_sestime_starthour | 03 | |
|
|
| id_sestime_endhour | 04 | |
|
|
| id_sestime_endhour | 04 | |
|
|
And I click on "id_submitbutton" "button" |
|
|
And I click on "id_submitbutton" "button" |
|
|
|
|
|
|
|
|
When I click on "Take attendance" "link" in the "3am - 4am" "table_row" |
|
|
When I click on "Take attendance" "link" in the "3am - 4am" "table_row" |
|
|
# Present |
|
|
# Present |
|
|
And I click on "td.cell.c3 input" "css_element" in the "Student 1" "table_row" |
|
|
And I click on "td.cell.c3 input" "css_element" in the "Student 1" "table_row" |
|
|
And I press "Save attendance" |
|
|
And I press "Save attendance" |
|
|
|
|
|
|
|
|
When I follow "Add session" |
|
|
When I follow "Add session" |
|
|
And I set the following fields to these values: |
|
|
And I set the following fields to these values: |
|
|
| id_sestime_starthour | 05 | |
|
|
| id_sestime_starthour | 05 | |
|
|
| id_sestime_endhour | 06 | |
|
|
| id_sestime_endhour | 06 | |
|
|
And I click on "id_submitbutton" "button" |
|
|
And I click on "id_submitbutton" "button" |
|
|
|
|
|
|
|
|
Then I log out |
|
|
Then I log out |
|
|
|
|
|
|
|
|
When I log in as "student1" |
|
|
When I log in as "student1" |
|
|
And I am on "Course 1" course homepage |
|
|
And I am on "Course 1" course homepage |
|
|
And I follow "Attendance" |
|
|
And I follow "Attendance" |
|
|
And I follow "All" |
|
|
And I follow "All" |
|
|
|
|
|
|
|
|
Then "2" "text" should exist in the "Taken sessions" "table_row" |
|
|
Then "2" "text" should exist in the "Taken sessions" "table_row" |
|
|
And "3 / 4" "text" should exist in the "Points over taken sessions:" "table_row" |
|
|
And "3 / 4" "text" should exist in the "Points over taken sessions:" "table_row" |
|
|
And "75.0%" "text" should exist in the "Percentage over taken sessions:" "table_row" |
|
|
And "75.0%" "text" should exist in the "Percentage over taken sessions:" "table_row" |
|
|
And "3" "text" should exist in the "Total number of sessions:" "table_row" |
|
|
And "3" "text" should exist in the "Total number of sessions:" "table_row" |
|
|
And "3 / 6" "text" should exist in the "Points over all sessions:" "table_row" |
|
|
And "3 / 6" "text" should exist in the "Points over all sessions:" "table_row" |
|
|
And "50.0%" "text" should exist in the "Percentage over all sessions:" "table_row" |
|
|
And "50.0%" "text" should exist in the "Percentage over all sessions:" "table_row" |
|
|
And "5 / 6" "text" should exist in the "Maximum possible points:" "table_row" |
|
|
And "5 / 6" "text" should exist in the "Maximum possible points:" "table_row" |
|
|
And "83.3%" "text" should exist in the "Maximum possible percentage:" "table_row" |
|
|
And "83.3%" "text" should exist in the "Maximum possible percentage:" "table_row" |
|
|
|
|
|
|
|
|
And I log out |
|
|
And I log out |