MDL-50483 gradereport_user: fix the fatal error of no enrolled users
This commit is contained in:
@@ -175,6 +175,7 @@ if (isset($report)) {
|
||||
);
|
||||
$event->trigger();
|
||||
} else {
|
||||
echo html_writer::tag('div', '', array('class' => 'clearfix'));
|
||||
echo $OUTPUT->notification(get_string('nostudentsyet'));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
.path-grade-report-user #graded_users_selector {
|
||||
float: right;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.path-grade-report-user #graded_users_selector .singleselect label {
|
||||
display: inline-block;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@core @core_grades @gradereport_user
|
||||
Feature: We can use the user report
|
||||
As a user
|
||||
I browse to the User report
|
||||
I browse the User report
|
||||
|
||||
Background:
|
||||
Given the following "courses" exist:
|
||||
@@ -9,12 +9,12 @@ Feature: We can use the user report
|
||||
| Course 1 | C1 | 0 |
|
||||
|
||||
Scenario: Verify we can view a user grade report with no users enrolled.
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I select "User report" from the "Grade report" singleselect
|
||||
And I press "Go"
|
||||
And I select "All users (0)" from the "Select all or one user" singleselect
|
||||
And I click on "Go" "button" in the "#choosegradeuser" "css_element"
|
||||
Then I should see "No students enrolled in this course yet"
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Grades" node in "Course administration"
|
||||
And I select "User report" from the "Grade report" singleselect
|
||||
And I press "Go"
|
||||
And I select "All users (0)" from the "Select all or one user" singleselect
|
||||
And I click on "Go" "button" in the "#choosegradeuser" "css_element"
|
||||
Then I should see "No students enrolled in this course yet"
|
||||
|
||||
Reference in New Issue
Block a user