Skip to content

Commit

Permalink
Merge branch 'MDL-51214-master' of git://github.com/andrewnicols/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Feb 17, 2016
2 parents 7c5c803 + 5ddf81c commit 0b14d86
Show file tree
Hide file tree
Showing 13 changed files with 50 additions and 50 deletions.
6 changes: 3 additions & 3 deletions blocks/news_items/lang/en/block_news_items.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

$string['news_items:addinstance'] = 'Add a new latest news block';
$string['news_items:myaddinstance'] = 'Add a new latest news block to Dashboard';
$string['pluginname'] = 'Latest news';
$string['news_items:addinstance'] = 'Add a new latest announcements block';
$string['news_items:myaddinstance'] = 'Add a new latest announcements block to Dashboard';
$string['pluginname'] = 'Latest announcements';
28 changes: 14 additions & 14 deletions blocks/news_items/tests/behat/display_news.feature
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@block @block_news_items
Feature: Latest news block displays the course latest news
In order to be aware of the course news
Feature: Latest announcements block displays the course latest news
In order to be aware of the course announcements
As a user
I need to see the latest news in the main course page
I need to see the latest announcements block in the main course page

@javascript
Scenario: Latest course news are displayed and can be configured
Scenario: Latest course announcements are displayed and can be configured
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
Expand All @@ -18,28 +18,28 @@ Feature: Latest news block displays the course latest news
And I log out
And I log in as "teacher1"
And I follow "Course 1"
When I add a new topic to "News forum" forum with:
When I add a new topic to "Announcements" forum with:
| Subject | Discussion One |
| Message | Not important |
And I add a new topic to "News forum" forum with:
And I add a new topic to "Announcements" forum with:
| Subject | Discussion Two |
| Message | Not important |
And I add a new topic to "News forum" forum with:
And I add a new topic to "Announcements" forum with:
| Subject | Discussion Three |
| Message | Not important |
And I follow "Course 1"
Then I should see "Discussion One" in the "Latest news" "block"
And I should see "Discussion Two" in the "Latest news" "block"
And I should see "Discussion Three" in the "Latest news" "block"
Then I should see "Discussion One" in the "Latest announcements" "block"
And I should see "Discussion Two" in the "Latest announcements" "block"
And I should see "Discussion Three" in the "Latest announcements" "block"
And I follow "Edit settings"
And I set the following fields to these values:
| News items to show | 2 |
And I press "Save and display"
And I should not see "Discussion One" in the "Latest news" "block"
And I should see "Discussion Two" in the "Latest news" "block"
And I should see "Discussion Three" in the "Latest news" "block"
And I should not see "Discussion One" in the "Latest announcements" "block"
And I should see "Discussion Two" in the "Latest announcements" "block"
And I should see "Discussion Three" in the "Latest announcements" "block"
And I follow "Edit settings"
And I set the following fields to these values:
| News items to show | 0 |
And I press "Save and display"
And "Latest news" "block" should not exist
And "Latest announcements" "block" should not exist
6 changes: 3 additions & 3 deletions blocks/tests/behat/hidden_block_region.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Feature: Show hidden blocks in a docked block region when editing
And I set the following fields to these values:
| Visible | No |
And I click on "Save changes" "button"
And I configure the "Latest news" block
And I configure the "Latest announcements" block
And I set the following fields to these values:
| Visible | No |
And I click on "Save changes" "button"
Expand All @@ -33,13 +33,13 @@ Feature: Show hidden blocks in a docked block region when editing
When I click on "Save changes" "button"
# Editing is on so they should be visible
Then I should see "Search forums"
And I should see "Latest news"
And I should see "Latest announcements"
And I should see "Upcoming events"
And I should see "Recent activity"
And I turn editing mode off
# Editing is off, so they should no longer be visible
And I should not see "Search forums"
And I should not see "Latest news"
And I should not see "Latest announcements"
And I should not see "Upcoming events"
And I should not see "Recent activity"

Expand Down
4 changes: 2 additions & 2 deletions blocks/tests/behat/hide_blocks.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Feature: Block visibility
Scenario: Hiding all blocks on the page should remove the column they're in
Given I open the "Search forums" blocks action menu
And I click on "Hide Search forums block" "link" in the "Search forums" "block"
And I open the "Latest news" blocks action menu
And I click on "Hide Latest news block" "link" in the "Latest news" "block"
And I open the "Latest announcements" blocks action menu
And I click on "Hide Latest announcements block" "link" in the "Latest announcements" "block"
And I open the "Upcoming events" blocks action menu
And I click on "Hide Upcoming events block" "link" in the "Upcoming events" "block"
And I open the "Recent activity" blocks action menu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
$string['orphanedwarning'] = 'These activities are unreachable by users!';
$string['pluginname'] = 'Single activity format';
$string['sectionname'] = '';
$string['warningchangeformat'] = 'When changing the existing course format to "Single activity" make sure that you removed all extra activities from the course including the "News forum". Note that sections structure may be modified.';
$string['warningchangeformat'] = 'When changing the existing course format to "Single activity" make sure that you removed all extra activities from the course including "Announcements". Note that sections structure may be modified.';
6 changes: 3 additions & 3 deletions course/tests/behat/course_creation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ Feature: Managers can create courses
And I log out
When I log in as "teacher1"
And I follow "Course 1"
Then "Latest news" "block" should exist
And I follow "News forum"
Then "Latest announcements" "block" should exist
And I follow "Announcements"
And "Add a new topic" "button" should exist
And "Forced subscription" "link" should not exist
And I log out
And I log in as "student1"
And I follow "Course 1"
And I follow "News forum"
And I follow "Announcements"
And "Add a new topic" "button" should not exist
And I should see "Forced subscription" in the "Administration" "block"

Expand Down
4 changes: 2 additions & 2 deletions mod/forum/lang/en/forum.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@
$string['myprofileownpost'] = 'My forum posts';
$string['myprofileowndis'] = 'My forum discussions';
$string['myprofileotherdis'] = 'Forum discussions';
$string['namenews'] = 'News forum';
$string['namenews_help'] = 'The news forum is a special forum for announcements that is automatically created when a course is created. A course can have only one news forum. Only teachers and administrators can post in the news forum. The "Latest news" block will display recent discussions from the news forum.';
$string['namenews'] = 'Announcements';
$string['namenews_help'] = 'The course announcements forum is a special forum for announcements and is automatically created when a course is created. A course can have only one announcements forum. Only teachers and administrators can post announcements. The "Latest announcements" block will display recent announcements.';
$string['namesocial'] = 'Social forum';
$string['nameteacher'] = 'Teacher forum';
$string['nextdiscussiona'] = 'Next discussion: {$a}';
Expand Down
2 changes: 1 addition & 1 deletion mod/forum/tests/behat/behat_mod_forum.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
class behat_mod_forum extends behat_base {

/**
* Adds a topic to the forum specified by it's name. Useful for the News forum and blog-style forums.
* Adds a topic to the forum specified by it's name. Useful for the Announcements and blog-style forums.
*
* @Given /^I add a new topic to "(?P<forum_name_string>(?:[^"]|\\")*)" forum with:$/
* @param string $forumname
Expand Down
4 changes: 2 additions & 2 deletions my/tests/behat/add_blocks.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Feature: Add blocks to dashboard page

Scenario: Add blocks to page
When I press "Customise this page"
And I add the "Latest news" block
Then I should see "Latest news" in the "Latest news" "block"
And I add the "Latest announcements" block
Then I should see "Latest announcements" in the "Latest announcements" "block"
And I should see "Latest badges" in the "Latest badges" "block"
And I should see "Calendar" in the "Calendar" "block"
And I should see "Upcoming events" in the "Upcoming events" "block"
24 changes: 12 additions & 12 deletions my/tests/behat/reset_all_pages.feature
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Feature: Reset all personalised pages to default
Given I log in as "admin"
And I navigate to "Default Dashboard page" node in "Site administration > Appearance"
And I press "Blocks editing on"
And I add the "Latest news" block
And I add the "Latest announcements" block
And I open the "Online users" blocks action menu
And I follow "Delete Online users"
And I press "Yes"
Expand All @@ -53,13 +53,13 @@ Feature: Reset all personalised pages to default

And I log in as "student1"
And I follow "Dashboard" in the user menu
And I should not see "Latest news"
And I should not see "Latest announcements"
And I should see "Online users"
And I log out

And I log in as "student3"
And I follow "Dashboard" in the user menu
And I should not see "Latest news"
And I should not see "Latest announcements"
And I should see "Online users"
And I log out

Expand All @@ -71,38 +71,38 @@ Feature: Reset all personalised pages to default

And I log in as "student1"
And I follow "Dashboard" in the user menu
Then I should see "Latest news"
Then I should see "Latest announcements"
And I should not see "Comments"
And I should not see "Online users"
And I log out

And I log in as "student3"
And I follow "Dashboard" in the user menu
And I should see "Latest news"
And I should see "Latest announcements"
And I should not see "Online users"
And I log out

# Check that this did not affect the customised profiles.
And I log in as "student2"
And I follow "Profile" in the user menu
And I should see "Logged in user"
And I should not see "Latest news"
And I should not see "Latest announcements"

Scenario: Reset profile for all users
Given I log in as "admin"
And I navigate to "Default profile page" node in "Site administration > Appearance"
And I press "Blocks editing on"
And I add the "Latest news" block
And I add the "Latest announcements" block
And I log out

And I log in as "student2"
And I follow "Profile" in the user menu
And I should not see "Latest news"
And I should not see "Latest announcements"
And I log out

And I log in as "student3"
And I follow "Profile" in the user menu
And I should not see "Latest news"
And I should not see "Latest announcements"
And I log out

And I log in as "admin"
Expand All @@ -113,17 +113,17 @@ Feature: Reset all personalised pages to default

And I log in as "student2"
And I follow "Profile" in the user menu
Then I should see "Latest news"
Then I should see "Latest announcements"
And I should not see "Logged in user"
And I log out

And I log in as "student3"
And I follow "Profile" in the user menu
And I should see "Latest news"
And I should see "Latest announcements"
And I log out

# Check that this did not affect the customised dashboards.
And I log in as "student1"
And I follow "Dashboard" in the user menu
And I should see "Comments"
And I should not see "Latest news"
And I should not see "Latest announcements"
4 changes: 2 additions & 2 deletions my/tests/behat/reset_page.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ Feature: Reset dashboard page to default

Scenario: Add blocks to page and reset
When I press "Customise this page"
And I add the "Latest news" block
And I add the "Latest announcements" block
And I add the "Comments" block
And I press "Reset page to default"
Then I should not see "Latest news"
Then I should not see "Latest announcements"
And I should see "Latest badges"
And I should see "Calendar"
And I should see "Upcoming events"
Expand Down
4 changes: 2 additions & 2 deletions user/tests/behat/add_blocks.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ Feature: Add blocks to my profile page

Scenario: Add blocks to page
When I press "Customise this page"
And I add the "Latest news" block
Then I should see "Latest news"
And I add the "Latest announcements" block
Then I should see "Latest announcements"
6 changes: 3 additions & 3 deletions user/tests/behat/reset_page.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Feature: Reset my profile page to default

Scenario: Add blocks to page and reset
When I press "Customise this page"
And I add the "Latest news" block
And I add the "Latest announcements" block
And I press "Reset page to default"
Then I should not see "Latest news"
And I should not see "Reset page to default"
Then I should not see "Latest announcements"
And I should not see "Reset page to default"

0 comments on commit 0b14d86

Please sign in to comment.