Browse Source

MDL-58265 replace I follow, editing mode steps

MOODLE_33_STABLE
Dan Marsden 8 years ago
parent
commit
492da49606
  1. 2
      classes/structure.php
  2. 1
      renderer.php
  3. 15
      tests/behat/attendance_mod.feature
  4. 7
      tests/behat/calendar_features.feature
  5. 3
      tests/behat/defaultstatus.feature
  6. 13
      tests/behat/extra_features.feature
  7. 3
      tests/behat/preferences.feature
  8. 15
      tests/behat/report.feature

2
classes/structure.php

@ -591,7 +591,7 @@ class mod_attendance_structure {
$extrafields = get_extra_user_fields($this->context, $fields); $extrafields = get_extra_user_fields($this->context, $fields);
$fields = array_merge($fields, $extrafields); $fields = array_merge($fields, $extrafields);
$userfields = user_picture::fields('u',$fields); $userfields = user_picture::fields('u', $fields);
if (empty($this->pageparams->sort)) { if (empty($this->pageparams->sort)) {
$this->pageparams->sort = ATT_SORT_DEFAULT; $this->pageparams->sort = ATT_SORT_DEFAULT;

1
renderer.php

@ -986,7 +986,6 @@ class mod_attendance_renderer extends plugin_renderer_base {
$rows[] = $row; $rows[] = $row;
foreach ($reportdata->users as $user) { foreach ($reportdata->users as $user) {
$row = new html_table_row(); $row = new html_table_row();
$row->cells[] = $this->build_data_cell($this->user_picture($user)); $row->cells[] = $this->build_data_cell($this->user_picture($user));

15
tests/behat/attendance_mod.feature

@ -26,21 +26,20 @@ Feature: Teachers and Students can record session attendance
| C1 | teacher1 | editingteacher | ##yesterday## | | C1 | teacher1 | editingteacher | ##yesterday## |
And I log in as "teacher1" And I log in as "teacher1"
And I follow "Course 1" And I am on "Course 1" course homepage with editing mode on
And I turn editing mode on
And I follow "Add a block" And I follow "Add a block"
And I follow "Administration" And I follow "Administration"
And I add a "Attendance" to section "1" and I fill the form with: And I add a "Attendance" to section "1" and I fill the form with:
| Name | Attendance | | Name | Attendance |
And I log out And I log out
And I log in as "student1" And I log in as "student1"
And I follow "Course 1" And I am on "Course 1" course homepage
And I should see "Attendance" And I should see "Attendance"
And I log out And I log out
Scenario: Students can mark their own attendance Scenario: Students can mark their own attendance
Given I log in as "teacher1" Given I log in as "teacher1"
And I follow "Course 1" And I am on "Course 1" course homepage
And I follow "Attendance" And I follow "Attendance"
And I follow "Add" And I follow "Add"
And I set the field "Allow students to record own attendance" to "1" And I set the field "Allow students to record own attendance" to "1"
@ -50,7 +49,7 @@ Feature: Teachers and Students can record session attendance
And I click on "id_submitbutton" "button" And I click on "id_submitbutton" "button"
And I log out And I log out
And I log in as "student1" And I log in as "student1"
And I follow "Course 1" And I am on "Course 1" course homepage
And I follow "Attendance" And I follow "Attendance"
And I follow "Submit attendance" And I follow "Submit attendance"
And I set the field "Present" to "1" And I set the field "Present" to "1"
@ -58,7 +57,7 @@ Feature: Teachers and Students can record session attendance
And I should see "Self-recorded" And I should see "Self-recorded"
And I log out And I log out
When I log in as "teacher1" When I log in as "teacher1"
And I follow "Course 1" And I am on "Course 1" course homepage
And I expand "Reports" node And I expand "Reports" node
And I follow "Logs" And I follow "Logs"
And I click on "Get these logs" "button" And I click on "Get these logs" "button"
@ -66,7 +65,7 @@ Feature: Teachers and Students can record session attendance
Scenario: Teachers can view low grade report and send a message Scenario: Teachers can view low grade report and send a message
Given I log in as "teacher1" Given I log in as "teacher1"
And I follow "Course 1" And I am on "Course 1" course homepage
And I follow "Attendance" And I follow "Attendance"
And I follow "Add" And I follow "Add"
And I set the following fields to these values: And I set the following fields to these values:
@ -87,7 +86,7 @@ Feature: Teachers and Students can record session attendance
Scenario: Export report includes id number, department and institution Scenario: Export report includes id number, department and institution
Given I log in as "teacher1" Given I log in as "teacher1"
And I follow "Course 1" And I am on "Course 1" course homepage
And I follow "Attendance" And I follow "Attendance"
And I follow "Add" And I follow "Add"
And I set the following fields to these values: And I set the following fields to these values:

7
tests/behat/calendar_features.feature

@ -15,8 +15,7 @@ Feature: Test the calendar related features in the attendance module
| C1 | teacher1 | editingteacher | ##yesterday## | | C1 | teacher1 | editingteacher | ##yesterday## |
And I log in as "teacher1" And I log in as "teacher1"
And I follow "Course 1" And I am on "Course 1" course homepage with editing mode on
And I turn editing mode on
And I add the "Upcoming events" block And I add the "Upcoming events" block
And I add a "Attendance" to section "1" and I fill the form with: And I add a "Attendance" to section "1" and I fill the form with:
| Name | Test attendance | | Name | Test attendance |
@ -24,14 +23,14 @@ Feature: Test the calendar related features in the attendance module
Scenario: Calendar events can be created automatically with sessions creation Scenario: Calendar events can be created automatically with sessions creation
Given I log in as "teacher1" Given I log in as "teacher1"
And I follow "Course 1" And I am on "Course 1" course homepage
And I follow "Test attendance" And I follow "Test attendance"
And I follow "Add session" And 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 | 01 | | id_sestime_starthour | 01 |
| id_sestime_endhour | 02 | | id_sestime_endhour | 02 |
And I click on "id_submitbutton" "button" And I click on "id_submitbutton" "button"
And I follow "Course 1" And I am on "Course 1" course homepage
And I follow "Go to calendar" And I follow "Go to calendar"
And I should see "Test attendance" And I should see "Test attendance"
And I log out And I log out

3
tests/behat/defaultstatus.feature

@ -22,8 +22,7 @@ Feature: Admin can set default status set for use in new attendance
@javascript @javascript
Scenario: Modified default status set added to new attendance Scenario: Modified default status set added to new attendance
Given I log in as "teacher1" Given I log in as "teacher1"
And I follow "Course 1" And I am on "Course 1" course homepage with editing mode on
And I turn editing mode on
And I add a "Attendance" to section "1" and I fill the form with: And I add a "Attendance" to section "1" and I fill the form with:
| Name | Attendance1 | | Name | Attendance1 |
And I follow "Attendance1" And I follow "Attendance1"

13
tests/behat/extra_features.feature

@ -21,15 +21,14 @@ Feature: Test the various new features in the attendance module
| C1 | student3 | student | ##yesterday## | | C1 | student3 | student | ##yesterday## |
And I log in as "teacher1" And I log in as "teacher1"
And I follow "Course 1" And I am on "Course 1" course homepage with editing mode on
And I turn editing mode on
And I add a "Attendance" to section "1" and I fill the form with: And I add a "Attendance" to section "1" and I fill the form with:
| Name | Test attendance | | Name | Test attendance |
And I log out And I log out
Scenario: A teacher can create and update temporary users Scenario: A teacher can create and update temporary users
Given I log in as "teacher1" Given I log in as "teacher1"
And I follow "Course 1" And I am on "Course 1" course homepage
And I follow "Test attendance" And I follow "Test attendance"
And I follow "Temporary users" And I follow "Temporary users"
@ -61,7 +60,7 @@ Feature: Test the various new features in the attendance module
Scenario: A teacher can take attendance for temporary users Scenario: A teacher can take attendance for temporary users
Given I log in as "teacher1" Given I log in as "teacher1"
And I follow "Course 1" And I am on "Course 1" course homepage
And I follow "Test attendance" And I follow "Test attendance"
And I follow "Temporary users" And I follow "Temporary users"
And I set the following fields to these values: And I set the following fields to these values:
@ -124,7 +123,7 @@ Feature: Test the various new features in the attendance module
| Group2 | student3 | | Group2 | student3 |
And I log in as "teacher1" And I log in as "teacher1"
And I follow "Course 1" And I am on "Course 1" course homepage
And I follow "Test attendance" And I follow "Test attendance"
And I follow "Add" And I follow "Add"
And I set the following fields to these values: And I set the following fields to these values:
@ -147,7 +146,7 @@ Feature: Test the various new features in the attendance module
Scenario: A teacher can create and use multiple status lists Scenario: A teacher can create and use multiple status lists
Given I log in as "teacher1" Given I log in as "teacher1"
And I follow "Course 1" And I am on "Course 1" course homepage
And I follow "Test attendance" And I follow "Test attendance"
And I follow "Status set" And I follow "Status set"
And I set the field "jump" to "New set of statuses" And I set the field "jump" to "New set of statuses"
@ -196,7 +195,7 @@ Feature: Test the various new features in the attendance module
Scenario: A teacher can use the radio buttons to set attendance values for all users Scenario: A teacher can use the radio buttons to set attendance values for all users
Given I log in as "teacher1" Given I log in as "teacher1"
And I follow "Course 1" And I am on "Course 1" course homepage
And I follow "Test attendance" And I follow "Test attendance"
And I follow "Add" And I follow "Add"
And I set the following fields to these values: And I set the following fields to these values:

3
tests/behat/preferences.feature

@ -18,8 +18,7 @@ Feature: Teachers can't change status variables to have empty acronyms or descri
| C1 | teacher1 | editingteacher | ##yesterday## | | C1 | teacher1 | editingteacher | ##yesterday## |
And I log in as "teacher1" And I log in as "teacher1"
And I follow "Course 1" And I am on "Course 1" course homepage with editing mode on
And I turn editing mode on
And I add a "Attendance" to section "1" and I fill the form with: And I add a "Attendance" to section "1" and I fill the form with:
| Name | Attendancepreftest | | Name | Attendancepreftest |
And I follow "Attendancepreftest" And I follow "Attendancepreftest"

15
tests/behat/report.feature

@ -16,8 +16,7 @@ Feature: Visiting reports
| C1 | teacher1 | editingteacher | ##yesterday## | | C1 | teacher1 | editingteacher | ##yesterday## |
And I log in as "teacher1" And I log in as "teacher1"
And I follow "Course 1" And I am on "Course 1" course homepage with editing mode on
And I turn editing mode on
And I add a "Attendance" to section "1" and I fill the form with: And I add a "Attendance" to section "1" and I fill the form with:
| Name | Attendance | | Name | Attendance |
And I follow "Attendance" And I follow "Attendance"
@ -33,7 +32,7 @@ Feature: Visiting reports
Scenario: Teacher takes attendance Scenario: Teacher takes attendance
Given I log in as "teacher1" Given I log in as "teacher1"
And I follow "Course 1" 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:
@ -67,7 +66,7 @@ Feature: Visiting reports
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 follow "Course 1" 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:
@ -107,7 +106,7 @@ Feature: Visiting reports
| Group1 | student1 | | Group1 | student1 |
When I log in as "teacher1" When I log in as "teacher1"
And I follow "Course 1" 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:
@ -149,7 +148,7 @@ Feature: Visiting reports
Scenario: Teacher visit summary report Scenario: Teacher visit summary report
Given I log in as "teacher1" Given I log in as "teacher1"
And I follow "Course 1" 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:
@ -193,7 +192,7 @@ Feature: Visiting reports
Scenario: Student visit user report Scenario: Student visit user report
Given I log in as "teacher1" Given I log in as "teacher1"
And I follow "Course 1" 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:
@ -226,7 +225,7 @@ Feature: Visiting reports
Then I log out Then I log out
When I log in as "student1" When I log in as "student1"
And I follow "Course 1" And I am on "Course 1" course homepage
And I follow "Attendance" And I follow "Attendance"
And I follow "All" And I follow "All"

Loading…
Cancel
Save