mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
Merge branch 'MDL-58520-master' of git://github.com/ryanwyllie/moodle
This commit is contained in:
commit
fedb00d4bb
@ -20,7 +20,7 @@ Feature: Add a new user tour
|
||||
| Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful |
|
||||
And I add steps to the "First tour" tour:
|
||||
| targettype | targetvalue_block | Title | Content |
|
||||
| Block | My overview | My overview | This area shows you what's happening in some of your courses |
|
||||
| Block | Course overview | Course overview | This area shows you what's happening in some of your courses |
|
||||
| Block | Calendar | Calendar | This is the Calendar. All of your assignments and due dates can be found here |
|
||||
And I add steps to the "First tour" tour:
|
||||
| targettype | targetvalue_selector | Title | Content |
|
||||
|
@ -25,8 +25,8 @@
|
||||
$string['future'] = 'Future';
|
||||
$string['inprogress'] = 'In progress';
|
||||
$string['morecourses'] = 'More courses';
|
||||
$string['myoverview:addinstance'] = 'Add a new my overview block';
|
||||
$string['myoverview:myaddinstance'] = 'Add a new my overview block to Dashboard';
|
||||
$string['myoverview:addinstance'] = 'Add a new course overview block';
|
||||
$string['myoverview:myaddinstance'] = 'Add a new course overview block to Dashboard';
|
||||
$string['nocourses'] = 'No courses';
|
||||
$string['nocoursesinprogress'] = 'No in progress courses';
|
||||
$string['nocoursesfuture'] = 'No future courses';
|
||||
@ -35,7 +35,7 @@ $string['noevents'] = 'No upcoming activities due';
|
||||
$string['next30days'] = 'Next 30 days';
|
||||
$string['next7days'] = 'Next 7 days';
|
||||
$string['past'] = 'Past';
|
||||
$string['pluginname'] = 'My overview';
|
||||
$string['pluginname'] = 'Course overview';
|
||||
$string['recentlyoverdue'] = 'Recently overdue';
|
||||
$string['sortbycourses'] = 'Sort by courses';
|
||||
$string['sortbydates'] = 'Sort by dates';
|
||||
|
@ -29,53 +29,53 @@ Feature: The my overview block allows users to easily access their courses and s
|
||||
|
||||
Scenario: View courses and upcoming activities on timeline view
|
||||
Given I log in as "student1"
|
||||
And I click on "Timeline" "link" in the "My overview" "block"
|
||||
When I click on "Sort by dates" "link" in the "My overview" "block"
|
||||
Then I should see "Next 7 days" in the "My overview" "block"
|
||||
And I should see "Choice Test choice 1 closes" in the "My overview" "block"
|
||||
And I should see "View choices" in the "My overview" "block"
|
||||
And I should see "Feedback Test feedback 1 closes" in the "My overview" "block"
|
||||
And I should see "Answer the questions" in the "My overview" "block"
|
||||
And I should see "##tomorrow##j M, H:i##" in the "My overview" "block"
|
||||
And I should see "Future" in the "My overview" "block"
|
||||
And I should see "Choice Test choice 3 closes" in the "My overview" "block"
|
||||
And I should see "Feedback Test feedback 3 closes" in the "My overview" "block"
|
||||
And I should see "##last day of next month##j M, H:i##" in the "My overview" "block"
|
||||
And I click on "Timeline" "link" in the "Course overview" "block"
|
||||
When I click on "Sort by dates" "link" in the "Course overview" "block"
|
||||
Then I should see "Next 7 days" in the "Course overview" "block"
|
||||
And I should see "Choice Test choice 1 closes" in the "Course overview" "block"
|
||||
And I should see "View choices" in the "Course overview" "block"
|
||||
And I should see "Feedback Test feedback 1 closes" in the "Course overview" "block"
|
||||
And I should see "Answer the questions" in the "Course overview" "block"
|
||||
And I should see "##tomorrow##j M, H:i##" in the "Course overview" "block"
|
||||
And I should see "Future" in the "Course overview" "block"
|
||||
And I should see "Choice Test choice 3 closes" in the "Course overview" "block"
|
||||
And I should see "Feedback Test feedback 3 closes" in the "Course overview" "block"
|
||||
And I should see "##last day of next month##j M, H:i##" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: Past activities should not be displayed on the timeline view
|
||||
Given I log in as "student1"
|
||||
And I click on "Timeline" "link" in the "My overview" "block"
|
||||
When I click on "Sort by dates" "link" in the "My overview" "block"
|
||||
And I should not see "Choice Test choice 2 closes" in the "My overview" "block"
|
||||
And I should not see "##1 month ago##j M, H:i##" in the "My overview" "block"
|
||||
And I click on "Timeline" "link" in the "Course overview" "block"
|
||||
When I click on "Sort by dates" "link" in the "Course overview" "block"
|
||||
And I should not see "Choice Test choice 2 closes" in the "Course overview" "block"
|
||||
And I should not see "##1 month ago##j M, H:i##" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: See the courses I am enrolled by their status on courses view
|
||||
Given I log in as "student1"
|
||||
And I click on "Courses" "link" in the "My overview" "block"
|
||||
And I click on "In progress" "link" in the "My overview" "block"
|
||||
And I should see "Course 2" in the "My overview" "block"
|
||||
And I should see "##yesterday##j F Y##" in the "My overview" "block"
|
||||
And I should see "##tomorrow##j F Y##" in the "My overview" "block"
|
||||
And I should not see "Course 1" in the "My overview" "block"
|
||||
And I click on "Future" "link" in the "My overview" "block"
|
||||
And I should see "Course 3" in the "My overview" "block"
|
||||
And I should see "##first day of next month##j F Y##" in the "My overview" "block"
|
||||
And I should see "##last day of next month##j F Y##" in the "My overview" "block"
|
||||
And I should not see "Course 1" in the "My overview" "block"
|
||||
When I click on "Past" "link" in the "My overview" "block"
|
||||
Then I should see "Course 1" in the "My overview" "block"
|
||||
And I should not see "Course 2" in the "My overview" "block"
|
||||
And I should not see "Course 3" in the "My overview" "block"
|
||||
And I should see "##1 month ago##j F Y##" in the "My overview" "block"
|
||||
And I should see "##15 days ago##j F Y##" in the "My overview" "block"
|
||||
And I click on "Courses" "link" in the "Course overview" "block"
|
||||
And I click on "In progress" "link" in the "Course overview" "block"
|
||||
And I should see "Course 2" in the "Course overview" "block"
|
||||
And I should see "##yesterday##j F Y##" in the "Course overview" "block"
|
||||
And I should see "##tomorrow##j F Y##" in the "Course overview" "block"
|
||||
And I should not see "Course 1" in the "Course overview" "block"
|
||||
And I click on "Future" "link" in the "Course overview" "block"
|
||||
And I should see "Course 3" in the "Course overview" "block"
|
||||
And I should see "##first day of next month##j F Y##" in the "Course overview" "block"
|
||||
And I should see "##last day of next month##j F Y##" in the "Course overview" "block"
|
||||
And I should not see "Course 1" in the "Course overview" "block"
|
||||
When I click on "Past" "link" in the "Course overview" "block"
|
||||
Then I should see "Course 1" in the "Course overview" "block"
|
||||
And I should not see "Course 2" in the "Course overview" "block"
|
||||
And I should not see "Course 3" in the "Course overview" "block"
|
||||
And I should see "##1 month ago##j F Y##" in the "Course overview" "block"
|
||||
And I should see "##15 days ago##j F Y##" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: No activities should be displayed if the user is not enrolled
|
||||
Given I log in as "student2"
|
||||
And I click on "Timeline" "link" in the "My overview" "block"
|
||||
And I should see "No upcoming activities" in the "My overview" "block"
|
||||
When I click on "Courses" "link" in the "My overview" "block"
|
||||
Then I should see "No courses" in the "My overview" "block"
|
||||
And I click on "Timeline" "link" in the "Course overview" "block"
|
||||
And I should see "No upcoming activities" in the "Course overview" "block"
|
||||
When I click on "Courses" "link" in the "Course overview" "block"
|
||||
Then I should see "No courses" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
@ -1,5 +1,5 @@
|
||||
@block @block_myoverview @javascript
|
||||
Feature: My overview block show users their progress on courses
|
||||
Feature: Course overview block show users their progress on courses
|
||||
In order to enable the my overview block in a course
|
||||
As a student
|
||||
I can see the progress percentage of the courses I am enrolled in
|
||||
@ -22,14 +22,14 @@ Feature: My overview block show users their progress on courses
|
||||
|
||||
Scenario: Course progress percentage should not be displayed if completion is not enabled
|
||||
Given I log in as "student1"
|
||||
And I click on "Timeline" "link" in the "My overview" "block"
|
||||
When I click on "Sort by courses" "link" in the "My overview" "block"
|
||||
Then I should see "Choice Test choice 1 closes" in the "My overview" "block"
|
||||
And I should not see "0%" in the "My overview" "block"
|
||||
And I click on "Courses" "link" in the "My overview" "block"
|
||||
And I click on "In progress" "link" in the "My overview" "block"
|
||||
And I should see "Course 1" in the "My overview" "block"
|
||||
And I should not see "0%" in the "My overview" "block"
|
||||
And I click on "Timeline" "link" in the "Course overview" "block"
|
||||
When I click on "Sort by courses" "link" in the "Course overview" "block"
|
||||
Then I should see "Choice Test choice 1 closes" in the "Course overview" "block"
|
||||
And I should not see "0%" in the "Course overview" "block"
|
||||
And I click on "Courses" "link" in the "Course overview" "block"
|
||||
And I click on "In progress" "link" in the "Course overview" "block"
|
||||
And I should see "Course 1" in the "Course overview" "block"
|
||||
And I should not see "0%" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
||||
Scenario: User complete activity and verify his progress
|
||||
@ -43,20 +43,20 @@ Feature: My overview block show users their progress on courses
|
||||
And I press "Save and return to course"
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I click on "Sort by courses" "link" in the "My overview" "block"
|
||||
And I should see "Choice Test choice 1 closes" in the "My overview" "block"
|
||||
And I should see "0%" in the "My overview" "block"
|
||||
And I click on "Courses" "link" in the "My overview" "block"
|
||||
When I click on "In progress" "link" in the "My overview" "block"
|
||||
Then I should see "Course 1" in the "My overview" "block"
|
||||
And I should see "0%" in the "My overview" "block"
|
||||
And I click on "Sort by courses" "link" in the "Course overview" "block"
|
||||
And I should see "Choice Test choice 1 closes" in the "Course overview" "block"
|
||||
And I should see "0%" in the "Course overview" "block"
|
||||
And I click on "Courses" "link" in the "Course overview" "block"
|
||||
When I click on "In progress" "link" in the "Course overview" "block"
|
||||
Then I should see "Course 1" in the "Course overview" "block"
|
||||
And I should see "0%" in the "Course overview" "block"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test choice 1"
|
||||
And I follow "Dashboard" in the user menu
|
||||
And I click on "Sort by courses" "link" in the "My overview" "block"
|
||||
And I should see "100%" in the "My overview" "block"
|
||||
And I click on "Courses" "link" in the "My overview" "block"
|
||||
And I click on "In progress" "link" in the "My overview" "block"
|
||||
And I should see "Course 1" in the "My overview" "block"
|
||||
And I should see "100%" in the "My overview" "block"
|
||||
And I click on "Sort by courses" "link" in the "Course overview" "block"
|
||||
And I should see "100%" in the "Course overview" "block"
|
||||
And I click on "Courses" "link" in the "Course overview" "block"
|
||||
And I click on "In progress" "link" in the "Course overview" "block"
|
||||
And I should see "Course 1" in the "Course overview" "block"
|
||||
And I should see "100%" in the "Course overview" "block"
|
||||
And I log out
|
||||
|
@ -70,4 +70,4 @@ Feature: Add and configure blocks throughout the site
|
||||
| Block title | Foo " onload="document.getElementsByTagName('body')[0].remove()" alt=" |
|
||||
| Content | Example |
|
||||
When I press "Save changes"
|
||||
Then I should see "My overview"
|
||||
Then I should see "Course overview"
|
||||
|
@ -4,9 +4,9 @@ information provided here is intended especially for developers.
|
||||
=== 3.3 ===
|
||||
|
||||
* block_manager::get_required_by_theme_block_types() is no longer static.
|
||||
* The 'Course overview' block has been removed from core as it is being replaced by the 'My overview' block.
|
||||
During the upgrade process the 'Course overview' block will be uninstalled and all its settings will be deleted.
|
||||
If you wish to keep the 'Course overview' block and its settings, download it from moodle.org and put it back in
|
||||
* The plugin block_course_overview has been removed from core and is being replaced by block_myoverview.
|
||||
During the upgrade process the block_course_overview block will be uninstalled and all its settings will be deleted.
|
||||
If you wish to keep the block_course_overview block and its settings, download it from moodle.org and put it back in
|
||||
the blocks/ directory BEFORE UPGRADING.
|
||||
|
||||
=== 3.1 ===
|
||||
|
@ -2613,7 +2613,7 @@ function xmldb_main_upgrade($oldversion) {
|
||||
|
||||
if ($oldversion < 2017040400.00) {
|
||||
|
||||
// If the 'Course overview' block is no longer present, replace with the 'My overview' block.
|
||||
// If block_course_overview is no longer present, replace with block_myoverview.
|
||||
if (!file_exists($CFG->dirroot . '/blocks/course_overview/block_course_overview.php')) {
|
||||
$DB->set_field('block_instances', 'blockname', 'myoverview', array('blockname' => 'course_overview'));
|
||||
}
|
||||
@ -2623,10 +2623,10 @@ function xmldb_main_upgrade($oldversion) {
|
||||
|
||||
if ($oldversion < 2017040401.00) {
|
||||
|
||||
// If the 'Course overview' block is no longer present, remove it.
|
||||
// If block_course_overview is no longer present, remove it.
|
||||
// Note - we do not need to completely remove the block context etc because we
|
||||
// have replaced all occurrences of the 'Course overview' block with the 'My overview'
|
||||
// block in the upgrade step above.
|
||||
// have replaced all occurrences of block_course_overview with block_myoverview
|
||||
// in the upgrade step above.
|
||||
if (!file_exists($CFG->dirroot . '/blocks/course_overview/block_course_overview.php')) {
|
||||
// Delete the block from the block table.
|
||||
$DB->delete_records('block', array('name' => 'course_overview'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user