mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
MDL-63578 assign: Better page titles
Use the context function get_context_name() to set the page title. This will change it from "Assignment" to "C1: Important foods to eat". The get_context_name() for activity modules is updated to include the course short name (not the name of the activity type).
- Loading branch information
Damyon Wiese
committed
Jan 31, 2019
1 parent
4c5b60a
commit ff9a0f8
Showing
4 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
@mod @mod_assign | ||
Feature: In an assignment, page titles are informative | ||
In order to know I am viewing the correct page | ||
The page titles need to reflect the current assignment and action | ||
|
||
Background: | ||
Given the following "courses" exist: | ||
| fullname | shortname | category | groupmode | | ||
| Course 1 | C1 | 0 | 1 | | ||
And the following "users" exist: | ||
| username | firstname | lastname | email | | ||
| teacher1 | Teacher | 1 | teacher1@example.com | | ||
| student1 | Student | 1 | student1@example.com | | ||
And the following "course enrolments" exist: | ||
| user | course | role | | ||
| teacher1 | C1 | editingteacher | | ||
| student1 | C1 | student | | ||
And the following "activities" exist: | ||
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | | ||
| assign | C1 | ants1 | History of ants | Tell me the history of ants | 1 | | ||
|
||
Scenario: I view an assignment as a student and take an action | ||
When I log in as "student1" | ||
And I am on "Course 1" course homepage | ||
Then I follow "History of ants" | ||
And "title[text() = 'C1: History of ants']" "xpath_element" should exist in the "head" "css_element" | ||
And I press "Add submission" | ||
And "title[text() = 'C1: History of ants - Edit submission']" "xpath_element" should exist in the "head" "css_element" | ||
|
||
Scenario: I view an assignment as a teacher and take an action | ||
When I log in as "teacher1" | ||
And I am on "Course 1" course homepage | ||
Then I follow "History of ants" | ||
And "title[text() = 'C1: History of ants']" "xpath_element" should exist in the "head" "css_element" | ||
And I navigate to "View all submissions" in current page administration | ||
And "title[text() = 'C1: History of ants - Grading']" "xpath_element" should exist in the "head" "css_element" | ||
And I click on "Grade" "link" in the "Student 1" "table_row" | ||
And "title[text() = 'C1: History of ants - Grading']" "xpath_element" should exist in the "head" "css_element" |