mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-72594 timeline: Display same-day overdue events in overdue filter
Now that events due on the current date are indicated in the timeline block, for consistency, the overdue filter has been updated to also display those items.
This commit is contained in:
parent
1a6f9467b0
commit
780e19ae5e
7 changed files with 95 additions and 27 deletions
2
blocks/timeline/amd/build/event_list.min.js
vendored
2
blocks/timeline/amd/build/event_list.min.js
vendored
|
@ -1,2 +1,2 @@
|
||||||
define ("block_timeline/event_list",["jquery","core/notification","core/templates","core/paged_content_factory","core/str","core/user_date","block_timeline/calendar_events_repository"],function(a,b,c,d,e,f,g){var h=!1,i={EMPTY_MESSAGE:"[data-region=\"empty-message\"]",ROOT:"[data-region=\"event-list-container\"]",EVENT_LIST_CONTENT:"[data-region=\"event-list-content\"]",EVENT_LIST_LOADING_PLACEHOLDER:"[data-region=\"event-list-loading-placeholder\"]",TIMELINE_BLOCK:"[data-region=\"timeline\"]",TIMELINE_SEARCH:"[data-region=\"search-input\"]"},j={EVENT_LIST_CONTENT:"block_timeline/event-list-content"},k={ignoreControlWhileLoading:!0,controlPlacementBottom:!0,ariaLabels:{itemsperpagecomponents:"ariaeventlistpagelimit, block_timeline"}},l=function(a){a.find(i.EVENT_LIST_CONTENT).addClass("hidden");a.find(i.EMPTY_MESSAGE).removeClass("hidden")},m=function(a){a.find(i.EVENT_LIST_CONTENT).removeClass("hidden");a.find(i.EMPTY_MESSAGE).addClass("hidden")},n=function(a){a.find(i.EVENT_LIST_CONTENT).empty()},o=function(a){var b={},c={courseview:h,eventsbyday:[]};a.forEach(function(a){var c=a.timeusermidnight;if(b[c]){b[c].push(a)}else{b[c]=[a]}});Object.keys(b).forEach(function(a){var d=b[a];c.eventsbyday.push({dayTimestamp:a,events:d})});return c},p=function(a){var b=o(a),d=j.EVENT_LIST_CONTENT;return c.render(d,b)},q=function(a,b,c,d,e,f,h){var i=d!=void 0?a+d*86400:!1,j={starttime:a+c*86400,limit:b};if(e){j.aftereventid=e}if(i){j.endtime=i}if(h){j.searchvalue=h}if(f){j.courseid=f;return g.queryByCourse(j)}else{return g.queryByTime(j)}},r=function(a,b,c,d,e,g,h,i,j){var k=a.pageNumber,l=a.limit,m=k;while(!d.hasOwnProperty(m)){m--}var n=d[m],o=null;if(e&&e.hasOwnProperty(k)){o=e[k]}else{o=q(c,l+1,h,i,n,g,j)}return o.then(function(a){if(!a.events.length){b.allItemsLoaded(k);return[]}var d=a.events.filter(function(a){if("open"==a.eventtype||"opensubmission"==a.eventtype){var b=f.getUserMidnightForTimestamp(a.timesort,c);return b>c}return!0}),e=d.length<=l;if(e){b.allItemsLoaded(k)}else{d.pop()}return d})},s=function(c,f,g,h,i,j,l,m,n,o){var q={1:0},s=!1,t=a.extend({},k,n);return e.get_string("ariaeventlistpagelimit","block_timeline",a.isArray(c)?c[0].value:c).then(function(a){t.ariaLabels.itemsperpage=a;t.ariaLabels.paginationnav=m;return a}).then(function(){return d.createWithLimit(c,function(c,d){var e=[];c.forEach(function(a){var c=a.pageNumber,h=r(a,d,g,q,f,i,j,l,o).then(function(a){if(a.length){s=!0;var b=a[a.length-1].id;q[c+1]=b;return p(a)}else{return a}}).catch(b.exception);e.push(h)});a.when.apply(a,e).then(function(){h.resolve(s)}).catch(function(){h.resolve(s)});return e},t)})};return{init:function init(d,e,f,g){var j=4<arguments.length&&arguments[4]!==void 0?arguments[4]:{};d=a(d);h=!!j.courseview;var k=a.Deferred(),o=d.find(i.EVENT_LIST_CONTENT),p=d.find(i.EVENT_LIST_LOADING_PLACEHOLDER),q=d.attr("data-course-id"),r=parseInt(d.attr("data-days-offset"),10),t=d.attr("data-days-limit"),u=parseInt(d.attr("data-midnight"),10),v=d.closest(i.TIMELINE_BLOCK).find(i.TIMELINE_SEARCH).val();n(d);m(d);p.removeClass("hidden");if(t!=void 0){t=parseInt(t,10)}return s(e,f,u,k,q,r,t,g,j,v).then(function(b,e){b=a(b);b.addClass("hidden");c.replaceNodeContents(o,b,e);k.then(function(a){b.removeClass("hidden");p.addClass("hidden");if(!a){l(d)}return a}).catch(function(){return!1});return b}).catch(b.exception)},rootSelector:i.ROOT}});
|
define ("block_timeline/event_list",["jquery","core/notification","core/templates","core/paged_content_factory","core/str","core/user_date","block_timeline/calendar_events_repository"],function(a,b,c,d,e,f,g){var h=!1,i={EMPTY_MESSAGE:"[data-region=\"empty-message\"]",ROOT:"[data-region=\"event-list-container\"]",EVENT_LIST_CONTENT:"[data-region=\"event-list-content\"]",EVENT_LIST_LOADING_PLACEHOLDER:"[data-region=\"event-list-loading-placeholder\"]",TIMELINE_BLOCK:"[data-region=\"timeline\"]",TIMELINE_SEARCH:"[data-region=\"search-input\"]"},j={EVENT_LIST_CONTENT:"block_timeline/event-list-content"},k={ignoreControlWhileLoading:!0,controlPlacementBottom:!0,ariaLabels:{itemsperpagecomponents:"ariaeventlistpagelimit, block_timeline"}},l=function(a){a.find(i.EVENT_LIST_CONTENT).addClass("hidden");a.find(i.EMPTY_MESSAGE).removeClass("hidden")},m=function(a){a.find(i.EVENT_LIST_CONTENT).removeClass("hidden");a.find(i.EMPTY_MESSAGE).addClass("hidden")},n=function(a){a.find(i.EVENT_LIST_CONTENT).empty()},o=function(a){var b={},c={courseview:h,eventsbyday:[]};a.forEach(function(a){var c=a.timeusermidnight;if(b[c]){b[c].push(a)}else{b[c]=[a]}});Object.keys(b).forEach(function(a){var d=b[a];c.eventsbyday.push({dayTimestamp:a,events:d})});return c},p=function(a){var b=o(a),d=j.EVENT_LIST_CONTENT;return c.render(d,b)},q=function(a,b,c,d,e,f,h){var i=d!=void 0?a+d*86400:!1,j={starttime:a+c*86400,limit:b};if(e){j.aftereventid=e}if(i){j.endtime=i}if(h){j.searchvalue=h}if(f){j.courseid=f;return g.queryByCourse(j)}else{return g.queryByTime(j)}},r=function(a,b,c,d,e,g,h,i,j){var k=a.pageNumber,l=a.limit,m=k;while(!d.hasOwnProperty(m)){m--}var n=d[m],o=null;if(e&&e.hasOwnProperty(k)){o=e[k]}else{o=q(c,l+1,h,i,n,g,j)}return o.then(function(a){if(!a.events.length){b.allItemsLoaded(k);return[]}var d=document.querySelector("[data-filtername='overdue']"),e=d&&d.getAttribute("aria-current"),g=a.events.filter(function(a){if("open"==a.eventtype||"opensubmission"==a.eventtype){var b=f.getUserMidnightForTimestamp(a.timesort,c);return b>c}return!e||a.overdue}),h=g.length<=l;if(h){b.allItemsLoaded(k)}else{g.pop()}return g})},s=function(c,f,g,h,i,j,l,m,n,o){var q={1:0},s=!1,t=a.extend({},k,n);return e.get_string("ariaeventlistpagelimit","block_timeline",a.isArray(c)?c[0].value:c).then(function(a){t.ariaLabels.itemsperpage=a;t.ariaLabels.paginationnav=m;return a}).then(function(){return d.createWithLimit(c,function(c,d){var e=[];c.forEach(function(a){var c=a.pageNumber,h=r(a,d,g,q,f,i,j,l,o).then(function(a){if(a.length){s=!0;var b=a[a.length-1].id;q[c+1]=b;return p(a)}else{return a}}).catch(b.exception);e.push(h)});a.when.apply(a,e).then(function(){h.resolve(s)}).catch(function(){h.resolve(s)});return e},t)})};return{init:function init(d,e,f,g){var j=4<arguments.length&&arguments[4]!==void 0?arguments[4]:{};d=a(d);h=!!j.courseview;var k=a.Deferred(),o=d.find(i.EVENT_LIST_CONTENT),p=d.find(i.EVENT_LIST_LOADING_PLACEHOLDER),q=d.attr("data-course-id"),r=parseInt(d.attr("data-days-offset"),10),t=d.attr("data-days-limit"),u=parseInt(d.attr("data-midnight"),10),v=d.closest(i.TIMELINE_BLOCK).find(i.TIMELINE_SEARCH).val();n(d);m(d);p.removeClass("hidden");if(t!=void 0){t=parseInt(t,10)}return s(e,f,u,k,q,r,t,g,j,v).then(function(b,e){b=a(b);b.addClass("hidden");c.replaceNodeContents(o,b,e);k.then(function(a){b.removeClass("hidden");p.addClass("hidden");if(!a){l(d)}return a}).catch(function(){return!1});return b}).catch(b.exception)},rootSelector:i.ROOT}});
|
||||||
//# sourceMappingURL=event_list.min.js.map
|
//# sourceMappingURL=event_list.min.js.map
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -272,12 +272,19 @@ function(
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Determine if the overdue filter is applied.
|
||||||
|
const overdueFilter = document.querySelector("[data-filtername='overdue']");
|
||||||
|
const filterByOverdue = (overdueFilter && overdueFilter.getAttribute('aria-current'));
|
||||||
|
|
||||||
var calendarEvents = result.events.filter(function(event) {
|
var calendarEvents = result.events.filter(function(event) {
|
||||||
if (event.eventtype == "open" || event.eventtype == "opensubmission") {
|
if (event.eventtype == "open" || event.eventtype == "opensubmission") {
|
||||||
var dayTimestamp = UserDate.getUserMidnightForTimestamp(event.timesort, midnight);
|
var dayTimestamp = UserDate.getUserMidnightForTimestamp(event.timesort, midnight);
|
||||||
return dayTimestamp > midnight;
|
return dayTimestamp > midnight;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
|
// When filtering by overdue, we fetch all events due today, in case any have elapsed already and are overdue.
|
||||||
|
// This means if filtering by overdue, some events fetched might not be required (eg if due later today).
|
||||||
|
return (!filterByOverdue || event.overdue);
|
||||||
});
|
});
|
||||||
// We expect to receive limit + 1 events back from the server.
|
// We expect to receive limit + 1 events back from the server.
|
||||||
// Any less means there are no more events to load.
|
// Any less means there are no more events to load.
|
||||||
|
|
|
@ -106,7 +106,7 @@ class main implements renderable, templatable {
|
||||||
if (in_array($this->filter, [BLOCK_TIMELINE_FILTER_BY_NONE, BLOCK_TIMELINE_FILTER_BY_OVERDUE])) {
|
if (in_array($this->filter, [BLOCK_TIMELINE_FILTER_BY_NONE, BLOCK_TIMELINE_FILTER_BY_OVERDUE])) {
|
||||||
$offset = -14;
|
$offset = -14;
|
||||||
if ($this->filter == BLOCK_TIMELINE_FILTER_BY_OVERDUE) {
|
if ($this->filter == BLOCK_TIMELINE_FILTER_BY_OVERDUE) {
|
||||||
$limit = 0;
|
$limit = 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
class="dropdown-item"
|
class="dropdown-item"
|
||||||
href="#"
|
href="#"
|
||||||
data-from="-14"
|
data-from="-14"
|
||||||
data-to="0"
|
data-to="1"
|
||||||
data-filtername="overdue"
|
data-filtername="overdue"
|
||||||
{{#overdue}}aria-current="true"{{/overdue}}
|
{{#overdue}}aria-current="true"{{/overdue}}
|
||||||
aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} overdue, block_timeline {{/str}}{{/str}}"
|
aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} overdue, block_timeline {{/str}}{{/str}}"
|
||||||
|
|
|
@ -24,9 +24,11 @@ Feature: The timeline block allows users to see upcoming courses
|
||||||
| feedback | C1 | feedback2 | Test feedback 2 | Test feedback description | ##first day of +10 months## | ##last day of +10 months## |
|
| feedback | C1 | feedback2 | Test feedback 2 | Test feedback description | ##first day of +10 months## | ##last day of +10 months## |
|
||||||
| feedback | C3 | feedback3 | Test feedback 3 | Test feedback description | ##first day of +5 months## | ##last day of +5 months## |
|
| feedback | C3 | feedback3 | Test feedback 3 | Test feedback description | ##first day of +5 months## | ##last day of +5 months## |
|
||||||
| feedback | C4 | feedback4 | Test feedback 4 | Test feedback description | ##yesterday## | ##tomorrow## |
|
| feedback | C4 | feedback4 | Test feedback 4 | Test feedback description | ##yesterday## | ##tomorrow## |
|
||||||
|
| feedback | C1 | feedback5 | Test feedback 5 | Test feedback description | ##yesterday## | ##now +1 minute## |
|
||||||
And the following "activities" exist:
|
And the following "activities" exist:
|
||||||
| activity | course | idnumber | name | intro | timeopen | duedate |
|
| activity | course | idnumber | name | intro | timeopen | duedate |
|
||||||
| assign | C1 | assign1 | Test assign 1 | Test assign description | ##1 month ago## | ##yesterday## |
|
| assign | C1 | assign1 | Test assign 1 | Test assign description | ##1 month ago## | ##yesterday## |
|
||||||
|
| assign | C2 | assign2 | Test assign 2 | Test assign description | ##yesterday## | ##now -1 minute## |
|
||||||
And the following "course enrolments" exist:
|
And the following "course enrolments" exist:
|
||||||
| user | course | role |
|
| user | course | role |
|
||||||
| student1 | C1 | student |
|
| student1 | C1 | student |
|
||||||
|
@ -36,6 +38,8 @@ Feature: The timeline block allows users to see upcoming courses
|
||||||
|
|
||||||
Scenario: Next 30 days in course view
|
Scenario: Next 30 days in course view
|
||||||
Given I log in as "student1"
|
Given I log in as "student1"
|
||||||
|
And I click on "Filter timeline by date" "button" in the "Timeline" "block"
|
||||||
|
And I click on "Next 30 days" "link" in the "Timeline" "block"
|
||||||
And I click on "Sort timeline items" "button" in the "Timeline" "block"
|
And I click on "Sort timeline items" "button" in the "Timeline" "block"
|
||||||
When I click on "Sort by courses" "link" in the "Timeline" "block"
|
When I click on "Sort by courses" "link" in the "Timeline" "block"
|
||||||
Then I should see "Course 1" in the "Timeline" "block"
|
Then I should see "Course 1" in the "Timeline" "block"
|
||||||
|
@ -45,13 +49,14 @@ Feature: The timeline block allows users to see upcoming courses
|
||||||
And I should see "Choice closes" in the "Timeline" "block"
|
And I should see "Choice closes" in the "Timeline" "block"
|
||||||
And "Test feedback 1" "link" should exist in the "Timeline" "block"
|
And "Test feedback 1" "link" should exist in the "Timeline" "block"
|
||||||
And I should see "Feedback closes" in the "Timeline" "block"
|
And I should see "Feedback closes" in the "Timeline" "block"
|
||||||
|
And "Test feedback 5" "link" should exist in the "Timeline" "block"
|
||||||
|
And "Test assign 2" "link" should exist in the "Timeline" "block"
|
||||||
And I should not see "Course 3" in the "Timeline" "block"
|
And I should not see "Course 3" in the "Timeline" "block"
|
||||||
And "Test choice 2" "link" should not exist in the "Timeline" "block"
|
And "Test choice 2" "link" should not exist in the "Timeline" "block"
|
||||||
And "Test choice 3" "link" should not exist in the "Timeline" "block"
|
And "Test choice 3" "link" should not exist in the "Timeline" "block"
|
||||||
And "Test feedback 2" "link" should not exist in the "Timeline" "block"
|
And "Test feedback 2" "link" should not exist in the "Timeline" "block"
|
||||||
And "Test feedback 3" "link" should not exist in the "Timeline" "block"
|
And "Test feedback 3" "link" should not exist in the "Timeline" "block"
|
||||||
And "Test assign 1" "link" should not exist in the "Timeline" "block"
|
And "Test assign 1" "link" should not exist in the "Timeline" "block"
|
||||||
And I should not see "Assignment is due" in the "Timeline" "block"
|
|
||||||
|
|
||||||
Scenario: All in course view
|
Scenario: All in course view
|
||||||
Given I log in as "student1"
|
Given I log in as "student1"
|
||||||
|
@ -68,7 +73,9 @@ Feature: The timeline block allows users to see upcoming courses
|
||||||
And "Test feedback 1" "link" should exist in the "Timeline" "block"
|
And "Test feedback 1" "link" should exist in the "Timeline" "block"
|
||||||
And "Test feedback 2" "link" should exist in the "Timeline" "block"
|
And "Test feedback 2" "link" should exist in the "Timeline" "block"
|
||||||
And "Test feedback 3" "link" should exist in the "Timeline" "block"
|
And "Test feedback 3" "link" should exist in the "Timeline" "block"
|
||||||
|
And "Test feedback 5" "link" should exist in the "Timeline" "block"
|
||||||
And "Test assign 1" "link" should exist in the "Timeline" "block"
|
And "Test assign 1" "link" should exist in the "Timeline" "block"
|
||||||
|
And "Test assign 2" "link" should exist in the "Timeline" "block"
|
||||||
And I should see "Assignment is due" in the "Timeline" "block"
|
And I should see "Assignment is due" in the "Timeline" "block"
|
||||||
And I should see "Choice closes" in the "Timeline" "block"
|
And I should see "Choice closes" in the "Timeline" "block"
|
||||||
And I should not see "More courses" in the "Timeline" "block"
|
And I should not see "More courses" in the "Timeline" "block"
|
||||||
|
@ -88,6 +95,8 @@ Feature: The timeline block allows users to see upcoming courses
|
||||||
And I should see "More courses" in the "Timeline" "block"
|
And I should see "More courses" in the "Timeline" "block"
|
||||||
And "Test choice 1" "link" should exist in the "Timeline" "block"
|
And "Test choice 1" "link" should exist in the "Timeline" "block"
|
||||||
And "Test feedback 1" "link" should exist in the "Timeline" "block"
|
And "Test feedback 1" "link" should exist in the "Timeline" "block"
|
||||||
|
And "Test feedback 5" "link" should exist in the "Timeline" "block"
|
||||||
|
And "Test assign 2" "link" should exist in the "Timeline" "block"
|
||||||
And I should not see "Course 3" in the "Timeline" "block"
|
And I should not see "Course 3" in the "Timeline" "block"
|
||||||
And "Test choice 2" "link" should not exist in the "Timeline" "block"
|
And "Test choice 2" "link" should not exist in the "Timeline" "block"
|
||||||
And "Test choice 3" "link" should not exist in the "Timeline" "block"
|
And "Test choice 3" "link" should not exist in the "Timeline" "block"
|
||||||
|
@ -136,3 +145,38 @@ Feature: The timeline block allows users to see upcoming courses
|
||||||
And I click on "More courses" "button" in the "Timeline" "block"
|
And I click on "More courses" "button" in the "Timeline" "block"
|
||||||
Then "Test assign 1" "link" should exist in the "Timeline" "block"
|
Then "Test assign 1" "link" should exist in the "Timeline" "block"
|
||||||
And "Test feedback 2" "link" should exist in the "Timeline" "block"
|
And "Test feedback 2" "link" should exist in the "Timeline" "block"
|
||||||
|
|
||||||
|
Scenario: Overdue in course view
|
||||||
|
Given I log in as "student1"
|
||||||
|
And I click on "Sort timeline items" "button" in the "Timeline" "block"
|
||||||
|
And I click on "Sort by courses" "link" in the "Timeline" "block"
|
||||||
|
And I click on "Filter timeline by date" "button" in the "Timeline" "block"
|
||||||
|
When I click on "Overdue" "link" in the "Timeline" "block"
|
||||||
|
Then "Test assign 1" "link" should exist in the "Timeline" "block"
|
||||||
|
And "Test assign 2" "link" should exist in the "Timeline" "block"
|
||||||
|
And I should not see "Test feedback 1" in the "Timeline" "block"
|
||||||
|
And I should not see "Test feedback 2" in the "Timeline" "block"
|
||||||
|
And I should not see "Test feedback 3" in the "Timeline" "block"
|
||||||
|
And I should not see "Test feedback 4" in the "Timeline" "block"
|
||||||
|
And I should not see "Test feedback 5" in the "Timeline" "block"
|
||||||
|
And I should not see "Test choice 1" in the "Timeline" "block"
|
||||||
|
And I should not see "Test choice 2" in the "Timeline" "block"
|
||||||
|
And I should not see "Test choice 3" in the "Timeline" "block"
|
||||||
|
|
||||||
|
Scenario: Persistent Overdue in course view
|
||||||
|
Given I log in as "student1"
|
||||||
|
And I click on "Sort timeline items" "button" in the "Timeline" "block"
|
||||||
|
And I click on "Sort by courses" "link" in the "Timeline" "block"
|
||||||
|
And I click on "Filter timeline by date" "button" in the "Timeline" "block"
|
||||||
|
When I click on "Overdue" "link" in the "Timeline" "block"
|
||||||
|
And I reload the page
|
||||||
|
Then "Test assign 1" "link" should exist in the "Timeline" "block"
|
||||||
|
And "Test assign 2" "link" should exist in the "Timeline" "block"
|
||||||
|
And "Test feedback 1" "link" should not exist in the "Timeline" "block"
|
||||||
|
And "Test feedback 2" "link" should not exist in the "Timeline" "block"
|
||||||
|
And "Test feedback 3" "link" should not exist in the "Timeline" "block"
|
||||||
|
And "Test feedback 4" "link" should not exist in the "Timeline" "block"
|
||||||
|
And "Test feedback 5" "link" should not exist in the "Timeline" "block"
|
||||||
|
And "Test choice 1" "link" should not exist in the "Timeline" "block"
|
||||||
|
And "Test choice 2" "link" should not exist in the "Timeline" "block"
|
||||||
|
And "Test choice 3" "link" should not exist in the "Timeline" "block"
|
||||||
|
|
|
@ -22,9 +22,11 @@ Feature: The timeline block allows users to see upcoming activities
|
||||||
| feedback | C2 | feedback1 | Test feedback 1 | Test feedback description | ##yesterday## | ##tomorrow## |
|
| feedback | C2 | feedback1 | Test feedback 1 | Test feedback description | ##yesterday## | ##tomorrow## |
|
||||||
| feedback | C1 | feedback2 | Test feedback 2 | Test feedback description | ##first day of +10 months## | ##last day of +10 months## |
|
| feedback | C1 | feedback2 | Test feedback 2 | Test feedback description | ##first day of +10 months## | ##last day of +10 months## |
|
||||||
| feedback | C3 | feedback3 | Test feedback 3 | Test feedback description | ##first day of +5 months## | ##last day of +5 months## |
|
| feedback | C3 | feedback3 | Test feedback 3 | Test feedback description | ##first day of +5 months## | ##last day of +5 months## |
|
||||||
|
| feedback | C2 | feedback4 | Test feedback 4 | Test feedback description | ##yesterday## | ##now +1 minute## |
|
||||||
And the following "activities" exist:
|
And the following "activities" exist:
|
||||||
| activity | course | idnumber | name | intro | timeopen | duedate |
|
| activity | course | idnumber | name | intro | timeopen | duedate |
|
||||||
| assign | C1 | assign1 | Test assign 1 | Test assign description | ##1 month ago## | ##yesterday## |
|
| assign | C1 | assign1 | Test assign 1 | Test assign description | ##1 month ago## | ##yesterday## |
|
||||||
|
| assign | C2 | assign2 | Test assign 2 | Test assign description | ##yesterday## | ##now -1 minute## |
|
||||||
And the following "course enrolments" exist:
|
And the following "course enrolments" exist:
|
||||||
| user | course | role |
|
| user | course | role |
|
||||||
| student1 | C1 | student |
|
| student1 | C1 | student |
|
||||||
|
@ -40,6 +42,8 @@ Feature: The timeline block allows users to see upcoming activities
|
||||||
And I should see "Course 2 · Choice closes" in the "Timeline" "block"
|
And I should see "Course 2 · Choice closes" in the "Timeline" "block"
|
||||||
And "Test feedback 1" "link" should exist in the "Timeline" "block"
|
And "Test feedback 1" "link" should exist in the "Timeline" "block"
|
||||||
And I should see "Course 2 · Feedback closes" in the "Timeline" "block"
|
And I should see "Course 2 · Feedback closes" in the "Timeline" "block"
|
||||||
|
And "Test assign 2" "link" should exist in the "Timeline" "block"
|
||||||
|
And "Test feedback 4" "link" should exist in the "Timeline" "block"
|
||||||
And "Test choice 2" "link" should not exist in the "Timeline" "block"
|
And "Test choice 2" "link" should not exist in the "Timeline" "block"
|
||||||
And "Test choice 3" "link" should not exist in the "Timeline" "block"
|
And "Test choice 3" "link" should not exist in the "Timeline" "block"
|
||||||
And "Test feedback 3" "link" should not exist in the "Timeline" "block"
|
And "Test feedback 3" "link" should not exist in the "Timeline" "block"
|
||||||
|
@ -50,13 +54,15 @@ Feature: The timeline block allows users to see upcoming activities
|
||||||
Given I log in as "student1"
|
Given I log in as "student1"
|
||||||
And I click on "Filter timeline by date" "button" in the "Timeline" "block"
|
And I click on "Filter timeline by date" "button" in the "Timeline" "block"
|
||||||
When I click on "Overdue" "link" in the "Timeline" "block"
|
When I click on "Overdue" "link" in the "Timeline" "block"
|
||||||
And "Test assign 1" "link" should exist in the "Timeline" "block"
|
Then "Test assign 1" "link" should exist in the "Timeline" "block"
|
||||||
Then I should see "Course 1 · Assignment is due" in the "Timeline" "block"
|
And I should see "Course 1 · Assignment is due" in the "Timeline" "block"
|
||||||
|
And "Test assign 2" "link" should exist in the "Timeline" "block"
|
||||||
And "Test choice 2" "link" should not exist in the "Timeline" "block"
|
And "Test choice 2" "link" should not exist in the "Timeline" "block"
|
||||||
And "Test feedback 1" "link" should not exist in the "Timeline" "block"
|
And "Test feedback 1" "link" should not exist in the "Timeline" "block"
|
||||||
And "Test choice 1" "link" should not exist in the "Timeline" "block"
|
And "Test choice 1" "link" should not exist in the "Timeline" "block"
|
||||||
And "Test choice 3" "link" should not exist in the "Timeline" "block"
|
And "Test choice 3" "link" should not exist in the "Timeline" "block"
|
||||||
And "Test feedback 3" "link" should not exist in the "Timeline" "block"
|
And "Test feedback 3" "link" should not exist in the "Timeline" "block"
|
||||||
|
And "Test feedback 4" "link" should not exist in the "Timeline" "block"
|
||||||
|
|
||||||
Scenario: All in date view
|
Scenario: All in date view
|
||||||
Given I log in as "student1"
|
Given I log in as "student1"
|
||||||
|
@ -64,24 +70,26 @@ Feature: The timeline block allows users to see upcoming activities
|
||||||
When I click on "All" "link" in the "Timeline" "block"
|
When I click on "All" "link" in the "Timeline" "block"
|
||||||
Then "Test assign 1" "link" should exist in the "Timeline" "block"
|
Then "Test assign 1" "link" should exist in the "Timeline" "block"
|
||||||
And I should see "Course 1 · Assignment is due" in the "Timeline" "block"
|
And I should see "Course 1 · Assignment is due" in the "Timeline" "block"
|
||||||
|
And "Test assign 2" "link" should exist in the "Timeline" "block"
|
||||||
|
And I should see "Course 2 · Assignment is due" in the "Timeline" "block"
|
||||||
And "Test feedback 1" "link" should exist in the "Timeline" "block"
|
And "Test feedback 1" "link" should exist in the "Timeline" "block"
|
||||||
And I should see "Course 2 · Feedback closes" in the "Timeline" "block"
|
And I should see "Course 2 · Feedback closes" in the "Timeline" "block"
|
||||||
And "Test choice 1" "link" should exist in the "Timeline" "block"
|
And "Test choice 1" "link" should exist in the "Timeline" "block"
|
||||||
And I should see "Course 2 · Choice closes" in the "Timeline" "block"
|
And I should see "Course 2 · Choice closes" in the "Timeline" "block"
|
||||||
And "Test choice 3" "link" should exist in the "Timeline" "block"
|
And "Test feedback 4" "link" should exist in the "Timeline" "block"
|
||||||
And I should see "Course 3 · Choice closes" in the "Timeline" "block"
|
And I should see "Course 2 · Feedback closes" in the "Timeline" "block"
|
||||||
And "Test feedback 3" "link" should exist in the "Timeline" "block"
|
|
||||||
And I should see "Course 3 · Feedback closes" in the "Timeline" "block"
|
|
||||||
And "Test choice 2" "link" should not exist in the "Timeline" "block"
|
And "Test choice 2" "link" should not exist in the "Timeline" "block"
|
||||||
And "Test feedback 2" "link" should not exist in the "Timeline" "block"
|
And "Test feedback 2" "link" should not exist in the "Timeline" "block"
|
||||||
And I click on "[data-region='paging-bar'] [data-control='next'] [data-region='page-link']" "css_element" in the "Timeline" "block"
|
And I click on "[data-region='paging-bar'] [data-control='next'] [data-region='page-link']" "css_element" in the "Timeline" "block"
|
||||||
And "Test feedback 2" "link" should exist in the "Timeline" "block"
|
And "Test feedback 2" "link" should exist in the "Timeline" "block"
|
||||||
And I should see "Course 1 · Feedback closes" in the "Timeline" "block"
|
And I should see "Course 1 · Feedback closes" in the "Timeline" "block"
|
||||||
|
And "Test choice 3" "link" should exist in the "Timeline" "block"
|
||||||
|
And I should see "Course 3 · Choice closes" in the "Timeline" "block"
|
||||||
|
And "Test feedback 3" "link" should exist in the "Timeline" "block"
|
||||||
|
And I should see "Course 3 · Feedback closes" in the "Timeline" "block"
|
||||||
And I should not see "Test assign 1" in the "Timeline" "block"
|
And I should not see "Test assign 1" in the "Timeline" "block"
|
||||||
And I should not see "Test feedback 1" in the "Timeline" "block"
|
And I should not see "Test feedback 1" in the "Timeline" "block"
|
||||||
And I should not see "Test choice 1" in the "Timeline" "block"
|
And I should not see "Test choice 1" in the "Timeline" "block"
|
||||||
And I should not see "Test choice 3" in the "Timeline" "block"
|
|
||||||
And I should not see "Test feedback 3" in the "Timeline" "block"
|
|
||||||
And I should not see "Test choice 2" in the "Timeline" "block"
|
And I should not see "Test choice 2" in the "Timeline" "block"
|
||||||
|
|
||||||
Scenario: All in date view no next
|
Scenario: All in date view no next
|
||||||
|
@ -92,7 +100,10 @@ Feature: The timeline block allows users to see upcoming activities
|
||||||
When I click on "25" "link" in the "Timeline" "block"
|
When I click on "25" "link" in the "Timeline" "block"
|
||||||
Then "Test assign 1" "link" should exist in the "Timeline" "block"
|
Then "Test assign 1" "link" should exist in the "Timeline" "block"
|
||||||
And I should see "Course 1 · Assignment is due" in the "Timeline" "block"
|
And I should see "Course 1 · Assignment is due" in the "Timeline" "block"
|
||||||
|
And "Test assign 2" "link" should exist in the "Timeline" "block"
|
||||||
|
And I should see "Course 2 · Assignment is due" in the "Timeline" "block"
|
||||||
And "Test feedback 1" "link" should exist in the "Timeline" "block"
|
And "Test feedback 1" "link" should exist in the "Timeline" "block"
|
||||||
|
And "Test feedback 4" "link" should exist in the "Timeline" "block"
|
||||||
And I should see "Course 2 · Feedback closes" in the "Timeline" "block"
|
And I should see "Course 2 · Feedback closes" in the "Timeline" "block"
|
||||||
And "Test choice 1" "link" should exist in the "Timeline" "block"
|
And "Test choice 1" "link" should exist in the "Timeline" "block"
|
||||||
And I should see "Course 2 · Choice closes" in the "Timeline" "block"
|
And I should see "Course 2 · Choice closes" in the "Timeline" "block"
|
||||||
|
@ -111,25 +122,27 @@ Feature: The timeline block allows users to see upcoming activities
|
||||||
And I reload the page
|
And I reload the page
|
||||||
Then "Test assign 1" "link" should exist in the "Timeline" "block"
|
Then "Test assign 1" "link" should exist in the "Timeline" "block"
|
||||||
And I should see "Course 1 · Assignment is due" in the "Timeline" "block"
|
And I should see "Course 1 · Assignment is due" in the "Timeline" "block"
|
||||||
|
And "Test assign 2" "link" should exist in the "Timeline" "block"
|
||||||
|
And I should see "Course 2 · Assignment is due" in the "Timeline" "block"
|
||||||
And "Test feedback 1" "link" should exist in the "Timeline" "block"
|
And "Test feedback 1" "link" should exist in the "Timeline" "block"
|
||||||
And I should see "Course 2 · Feedback closes" in the "Timeline" "block"
|
And I should see "Course 2 · Feedback closes" in the "Timeline" "block"
|
||||||
And "Test choice 1" "link" should exist in the "Timeline" "block"
|
And "Test choice 1" "link" should exist in the "Timeline" "block"
|
||||||
And I should see "Course 2 · Choice closes" in the "Timeline" "block"
|
And I should see "Course 2 · Choice closes" in the "Timeline" "block"
|
||||||
And "Test choice 3" "link" should exist in the "Timeline" "block"
|
And "Test feedback 4" "link" should exist in the "Timeline" "block"
|
||||||
And I should see "Course 3 · Choice closes" in the "Timeline" "block"
|
And I should see "Course 2 · Feedback closes" in the "Timeline" "block"
|
||||||
And "Test feedback 3" "link" should exist in the "Timeline" "block"
|
|
||||||
And I should see "Course 3 · Feedback closes" in the "Timeline" "block"
|
|
||||||
And I should not see "Test choice 2" in the "Timeline" "block"
|
And I should not see "Test choice 2" in the "Timeline" "block"
|
||||||
And I should not see "Test feedback 2" in the "Timeline" "block"
|
And I should not see "Test feedback 2" in the "Timeline" "block"
|
||||||
And I click on "[data-region='paging-bar'] [data-control='next']" "css_element" in the "Timeline" "block"
|
And I click on "[data-region='paging-bar'] [data-control='next']" "css_element" in the "Timeline" "block"
|
||||||
And "Test feedback 2" "link" should exist in the "Timeline" "block"
|
And "Test feedback 2" "link" should exist in the "Timeline" "block"
|
||||||
And I should see "Course 1 · Feedback closes" in the "Timeline" "block"
|
And I should see "Course 1 · Feedback closes" in the "Timeline" "block"
|
||||||
|
And "Test choice 3" "link" should exist in the "Timeline" "block"
|
||||||
|
And I should see "Course 3 · Choice closes" in the "Timeline" "block"
|
||||||
|
And "Test feedback 3" "link" should exist in the "Timeline" "block"
|
||||||
|
And I should see "Course 3 · Feedback closes" in the "Timeline" "block"
|
||||||
And I should not see "Test assign 1" in the "Timeline" "block"
|
And I should not see "Test assign 1" in the "Timeline" "block"
|
||||||
And I should not see "Test feedback 1" in the "Timeline" "block"
|
And I should not see "Test feedback 1" in the "Timeline" "block"
|
||||||
And I should not see "Test feedback 3" in the "Timeline" "block"
|
|
||||||
And I should not see "Test choice 1" in the "Timeline" "block"
|
And I should not see "Test choice 1" in the "Timeline" "block"
|
||||||
And I should not see "Test choice 2" in the "Timeline" "block"
|
And I should not see "Test choice 2" in the "Timeline" "block"
|
||||||
And I should not see "Test choice 3" in the "Timeline" "block"
|
|
||||||
|
|
||||||
Scenario: Persistent Overdue in date view
|
Scenario: Persistent Overdue in date view
|
||||||
Given I log in as "student1"
|
Given I log in as "student1"
|
||||||
|
@ -137,11 +150,15 @@ Feature: The timeline block allows users to see upcoming activities
|
||||||
When I click on "Overdue" "link" in the "Timeline" "block"
|
When I click on "Overdue" "link" in the "Timeline" "block"
|
||||||
And I reload the page
|
And I reload the page
|
||||||
Then "Test assign 1" "link" should exist in the "Timeline" "block"
|
Then "Test assign 1" "link" should exist in the "Timeline" "block"
|
||||||
And "Test choice 2" "link" should not exist in the "Timeline" "block"
|
And I should see "Course 1 · Assignment is due" in the "Timeline" "block"
|
||||||
|
And "Test assign 2" "link" should exist in the "Timeline" "block"
|
||||||
|
And I should see "Course 2 · Assignment is due" in the "Timeline" "block"
|
||||||
And "Test feedback 1" "link" should not exist in the "Timeline" "block"
|
And "Test feedback 1" "link" should not exist in the "Timeline" "block"
|
||||||
And "Test choice 1" "link" should not exist in the "Timeline" "block"
|
|
||||||
And "Test choice 3" "link" should not exist in the "Timeline" "block"
|
|
||||||
And "Test feedback 3" "link" should not exist in the "Timeline" "block"
|
And "Test feedback 3" "link" should not exist in the "Timeline" "block"
|
||||||
|
And "Test feedback 4" "link" should not exist in the "Timeline" "block"
|
||||||
|
And "Test choice 1" "link" should not exist in the "Timeline" "block"
|
||||||
|
And "Test choice 2" "link" should not exist in the "Timeline" "block"
|
||||||
|
And "Test choice 3" "link" should not exist in the "Timeline" "block"
|
||||||
|
|
||||||
Scenario: Current filtering always applies in date view
|
Scenario: Current filtering always applies in date view
|
||||||
Given I log in as "student1"
|
Given I log in as "student1"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue