Commit 34a0ba32 authored by ilya's avatar ilya
Browse files

Merge branch 'MDL-71610-master' of git://github.com/bmbrands/moodle

parents 44f06edd 35079739
......@@ -75,7 +75,7 @@ if ($PAGE->user_allowed_editing() && $adminediting != -1) {
$USER->editing = $adminediting;
}
$buttons = null;
if ($PAGE->user_allowed_editing()) {
if ($PAGE->user_allowed_editing() && !$PAGE->theme->haseditswitch) {
$url = clone($PAGE->url);
if ($PAGE->user_is_editing()) {
$caption = get_string('blockseditoff');
......
......@@ -101,7 +101,7 @@ if (empty($SITE->fullname)) {
echo $OUTPUT->render_from_template('core_admin/settings', $context);
} else {
if ($PAGE->user_allowed_editing()) {
if ($PAGE->user_allowed_editing() && !$PAGE->theme->haseditswitch) {
$url = clone($PAGE->url);
if ($PAGE->user_is_editing()) {
$caption = get_string('blockseditoff');
......
......@@ -8,7 +8,7 @@ Feature: Manage availability conditions
Scenario: Display list of availability conditions
# Check the report doesn't show when not enabled.
Given I log in as "admin"
And I press "Customise this page"
And I turn editing mode on
And I add the "Administration" block if not present
And the following config values are set as admin:
| enableavailability | 0 |
......
......@@ -139,19 +139,19 @@ Feature: Set up contextual data for tests
| user5 | custom2 | System | |
When I log in as "user1"
And I am on site homepage
Then "Edit settings" "link" should exist in current page administration
Then I should see "Edit mode"
And I log out
And I log in as "user2"
And I am on "Course 1" course homepage
And "Turn editing on" "button" should exist
Then I should see "Edit mode"
And I log out
And I log in as "user3"
And I am on "Course 1" course homepage
And "Turn editing on" "button" should exist
Then I should see "Edit mode"
And I log out
And I log in as "user4"
And I am on "Course 1" course homepage
And "Turn editing on" "button" should exist
Then I should see "Edit mode"
And I log out
And I log in as "user5"
And I should see "You are logged in as"
......
......@@ -6,6 +6,7 @@ Feature: Basic OAuth2 functionality
Background:
Given I log in as "admin"
And I change window size to "large"
And I navigate to "Server > OAuth 2 services" in site administration
Scenario: Create, edit and delete standard service for Google
......
......@@ -10,7 +10,7 @@ Feature: Add badges to the system
@javascript
Scenario: Accessing the badges
And I press "Customise this page"
And I turn editing mode on
# TODO MDL-57120 site "Badges" link not accessible without navigation block.
And I add the "Navigation" block if not present
And I click on "Site pages" "list_item" in the "Navigation" "block"
......@@ -133,7 +133,7 @@ Feature: Add badges to the system
@javascript @_file_upload
Scenario: Add a badge from Site badges section
Given I press "Customise this page"
Given I turn editing mode on
# TODO MDL-57120 site "Badges" link not accessible without navigation block.
And I add the "Navigation" block if not present
When I click on "Site pages" "list_item" in the "Navigation" "block"
......
......@@ -83,7 +83,7 @@ Feature: Award badges
And I should see "Add a new badge"
# Teacher 1 should NOT have access to manage/create site badges in the Site badges section.
When I am on homepage
And I press "Customise this page"
And I turn editing mode on
# TODO MDL-57120 site "Badges" link not accessible without navigation block.
And I add the "Navigation" block if not present
And I click on "Site pages" "list_item" in the "Navigation" "block"
......
......@@ -31,7 +31,7 @@ Feature: Block activity modules
When I log in as "admin"
And I am on site homepage
And I follow "Turn editing on"
And I turn editing mode on
And I add the "Activities" block
And I click on "Assignments" "link" in the "Activities" "block"
Then I should see "Frontpage assignment name"
......
......@@ -36,7 +36,6 @@ Feature: The activity results block displays student scores
And I am on "Course 1" course homepage with editing mode on
And I should see "Test page name"
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment 1"
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment 1"
And I give the grade "70.00" to the user "Student 3" for the grade item "Test assignment 1"
......
......@@ -30,7 +30,6 @@ Feature: The activity results block displays student high scores
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 3" for the grade item "Test assignment"
......
......@@ -63,7 +63,6 @@ Feature: The activity results block displays student in group high scores as sca
And I press "Save and return to course"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "Very good" to the user "Student 3" for the grade item "Test assignment"
......
......@@ -53,7 +53,6 @@ Feature: The activity results block displays student in separate groups scores
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
......
......@@ -35,7 +35,6 @@ Feature: The activity results block displays student low scores
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 3" for the grade item "Test assignment"
......
......@@ -49,7 +49,6 @@ Feature: The activity results block displays student low scores as scales
And I press "Save and return to course"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "Good" to the user "Student 3" for the grade item "Test assignment"
......
......@@ -74,7 +74,7 @@ Feature: The activity results block displays students in groups low scores as sc
And I give the grade "Good" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "Average" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I am on "Course 1" course homepage with editing mode on
And I am on "Course 1" course homepage
Scenario: Try to configure the block on the course page to show 1 low score
Given I add the "Activity results" block
......
......@@ -47,7 +47,6 @@ Feature: The activity results block displays students in separate groups scores
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
......
......@@ -53,7 +53,6 @@ Feature: The activity results block displays student in visible groups low score
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
......
......@@ -16,7 +16,7 @@ Feature: Enable Block Badges on the frontpage and view awarded badges
| teacher1 | C1 | editingteacher |
And I log in as "admin"
And I am on site homepage
And I navigate to "Turn editing on" in current page administration
And I turn editing mode on
And I add the "Latest badges" block
And I log out
And I log in as "teacher1"
......
......@@ -10,7 +10,7 @@ Feature: Enable Block blog menu on the frontpage
| student1 | Student | 1 | student1@example.com | S1 |
And I log in as "admin"
And I am on site homepage
And I navigate to "Turn editing on" in current page administration
And I turn editing mode on
And I add the "Blog menu" block
And I log out
......
......@@ -10,7 +10,7 @@ Feature: Feature: Students can use the recent blog entries block to view recent
| student1 | Student | 1 | student1@example.com | S1 |
And I log in as "admin"
And I am on site homepage
And I navigate to "Turn editing on" in current page administration
And I turn editing mode on
And I add the "Recent blog entries" block
# TODO MDL-57120 site "Blogs" link not accessible without navigation block.
And I add the "Navigation" block if not present
......@@ -89,7 +89,7 @@ Feature: Feature: Students can use the recent blog entries block to view recent
Then I log out
And I log in as "admin"
And I am on site homepage
And I navigate to "Turn editing on" in current page administration
And I turn editing mode on
And I configure the "Recent blog entries" block
And I set the following fields to these values:
| id_config_numberofrecentblogentries | 2 |
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment