Commit a7571e93 authored by Eloy Lafuente's avatar Eloy Lafuente Committed by jun
Browse files

Merge branch 'MDL-73067-master' of https://github.com/lameze/moodle

parents e379b1d8 46e4130b
......@@ -59,10 +59,6 @@ class block_calendar_month extends block_base {
$renderer = $this->page->get_renderer('core_calendar');
$this->content->text .= $renderer->render_from_template($template, $data);
if ($this->page->course->id != SITEID) {
$this->content->text .= $renderer->event_filter();
}
$options = [
'showfullcalendarlink' => true
];
......
......@@ -38,25 +38,6 @@ Feature: Enable the calendar block in a course and test it's functionality
And I hover over today in the mini-calendar block
Then I should see "Site Event"
@javascript
Scenario: Filter site events in the calendar block
Given I log in as "admin"
And I create a calendar event with form data:
| id_eventtype | Site |
| id_name | Site Event |
And I log out
When I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add the "Calendar" block
And I create a calendar event with form data:
| id_eventtype | Course |
| id_name | Course Event |
And I am on "Course 1" course homepage
And I follow "Hide site events"
Then I should not see "Site Event"
And I hover over today in the mini-calendar block
And I should see "Course Event"
@javascript
Scenario: View a course event in the calendar block
Given I log in as "teacher1"
......@@ -69,24 +50,6 @@ Feature: Enable the calendar block in a course and test it's functionality
And I hover over today in the mini-calendar block
Then I should see "Course Event"
@javascript
Scenario: Filter course events in the calendar block
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add the "Calendar" block
And I create a calendar event with form data:
| id_eventtype | Course |
| id_name | Course Event |
And I am on "Course 1" course homepage
And I create a calendar event with form data:
| id_eventtype | User |
| id_name | User Event |
And I am on "Course 1" course homepage
And I follow "Hide course events"
Then I should not see "Course Event"
And I hover over today in the mini-calendar block
And I should see "User Event"
@javascript
Scenario: View a user event in the calendar block
Given I log in as "teacher1"
......@@ -99,24 +62,6 @@ Feature: Enable the calendar block in a course and test it's functionality
And I hover over today in the mini-calendar block
Then I should see "User Event"
@javascript
Scenario: Filter user events in the calendar block
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add the "Calendar" block
And I create a calendar event with form data:
| id_eventtype | Course |
| id_name | Course Event |
And I am on "Course 1" course homepage
And I create a calendar event with form data:
| id_eventtype | User |
| id_name | User Event |
When I am on "Course 1" course homepage
And I follow "Hide user events"
Then I should not see "User Event"
And I hover over today in the mini-calendar block
And I should see "Course Event"
@javascript
Scenario: View a group event in the calendar block
Given the following "groups" exist:
......@@ -153,42 +98,3 @@ Feature: Enable the calendar block in a course and test it's functionality
And I log in as "student2"
And I am on "Course 1" course homepage
And I should not see "Group Event"
@javascript
Scenario: Filter group events in the calendar block
Given the following "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
And the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G2 |
When I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| id_groupmode | Separate groups |
| id_groupmodeforce | Yes |
And I press "Save and display"
And I turn editing mode on
And I add the "Calendar" block
And I create a calendar event with form data:
| id_eventtype | Course |
| id_name | Course Event 1 |
And I am on "Course 1" course homepage
And I click on "Full calendar" "link"
And I click on "New event" "button"
And I set the following fields to these values:
| id_eventtype | Group |
| id_name | Group Event 1 |
And I set the following fields to these values:
| Group | Group 1 |
And I press "Save"
And I log out
Then I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Hide group events"
And I should not see "Group Event 1"
And I hover over today in the mini-calendar block
And I should see "Course Event 1"
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