Skip to content

Commit

Permalink
Merge branch 'MDL-71209-master-fixup' of github.com:ferranrecio/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjona committed Aug 23, 2021
2 parents 19b1f2f + 0b18d47 commit d5faaf5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 20 deletions.
2 changes: 0 additions & 2 deletions course/format/tests/behat/course_courseindex.feature
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ Feature: Course index depending on role
Given I log in as "teacher1"
When I am on "Course 1" course homepage
Then I should see "Open course index drawer"
And I follow "Activity sample 1"
And I should see "Open course index drawer"

@javascript
Scenario: Course index as a teacher
Expand Down
4 changes: 2 additions & 2 deletions course/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -3860,8 +3860,8 @@ function core_course_core_calendar_get_valid_event_timestart_range(\calendar_eve
*/
function core_course_drawer(): string {
global $PAGE;
// Only course and mod pages are able to render course index.
if (!preg_match('/^(mod|course).*/', $PAGE->pagetype)) {
// Only course are able to render course index.
if (!preg_match('/^(course).*/', $PAGE->pagetype)) {
return '';
}

Expand Down
24 changes: 8 additions & 16 deletions mod/assign/tests/behat/bulk_release_anon_submissions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ Feature: Bulk released grades should not be sent to gradebook while submissions
| Anonymous submissions | Yes |
And I log out
# Add a submission.
And I log in as "student1"
And I am on "Course 1" course homepage
When I follow "Test assignment name"
And I am on the "Test assignment name" "assign activity" page logged in as "student1"
Then I should not see "Feedback"
And I should see "Not marked" in the "Grading status" "table_row"
And I press "Add submission"
Expand All @@ -42,9 +40,7 @@ Feature: Bulk released grades should not be sent to gradebook while submissions
And I press "Save changes"
And I log out
# Add another submission.
And I log in as "student2"
And I am on "Course 1" course homepage
When I follow "Test assignment name"
And I am on the "Test assignment name" "assign activity" page logged in as "student2"
Then I should not see "Feedback"
And I should see "Not marked" in the "Grading status" "table_row"
And I press "Add submission"
Expand All @@ -53,9 +49,7 @@ Feature: Bulk released grades should not be sent to gradebook while submissions
And I press "Save changes"
And I log out
# Mark the submissions.
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I am on the "Test assignment name" "assign activity" page logged in as "teacher1"
And I navigate to "View all submissions" in current page administration
Then I should see "Not marked" in the "I'm student1's submission" "table_row"
And I click on "Grade" "link" in the "I'm student1's submission" "table_row"
Expand All @@ -64,7 +58,7 @@ Feature: Bulk released grades should not be sent to gradebook while submissions
And I set the field "Feedback comments" to "Great job!"
And I set the field "Notify students" to "0"
And I press "Save changes"
And I follow "Test assignment name"
And I am on the "Test assignment name" "assign activity" page
And I navigate to "View all submissions" in current page administration
Then I should see "Not marked" in the "I'm student2's submission" "table_row"
And I click on "Grade" "link" in the "I'm student2's submission" "table_row"
Expand All @@ -73,7 +67,7 @@ Feature: Bulk released grades should not be sent to gradebook while submissions
And I set the field "Feedback comments" to "Great job!"
And I set the field "Notify students" to "0"
And I press "Save changes"
And I follow "Test assignment name"
And I am on the "Test assignment name" "assign activity" page
And I navigate to "View all submissions" in current page administration
Then I should see "In review" in the "I'm student1's submission" "table_row"
And I should see "In review" in the "I'm student2's submission" "table_row"
Expand All @@ -88,7 +82,7 @@ Feature: Bulk released grades should not be sent to gradebook while submissions
And I set the field "Marking workflow state" to "Released"
And I set the field "Notify students" to "No"
And I press "Save changes"
And I follow "Test assignment name"
And I am on the "Test assignment name" "assign activity" page
And I navigate to "View all submissions" in current page administration
Then I should see "Released" in the "I'm student1's submission" "table_row"
And I should see "Released" in the "I'm student2's submission" "table_row"
Expand All @@ -105,9 +99,7 @@ Feature: Bulk released grades should not be sent to gradebook while submissions
Then I should not see "50"
And I should not see "Great job!"
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I am on the "Test assignment name" "assign activity" page logged in as "teacher1"
And I navigate to "View all submissions" in current page administration
And I set the field "Grading action" to "Reveal student identities"
And I press "Continue"
Expand Down Expand Up @@ -138,7 +130,7 @@ Feature: Bulk released grades should not be sent to gradebook while submissions
And I set the field "Marking workflow state" to "Released"
And I set the field "Notify students" to "No"
And I press "Save changes"
And I follow "Test assignment name"
And I am on the "Test assignment name" "assign activity" page
And I navigate to "View all submissions" in current page administration
Then I should see "Released" in the "Student 1" "table_row"
And I should see "Released" in the "Student 2" "table_row"
Expand Down

0 comments on commit d5faaf5

Please sign in to comment.