diff --git a/blocks/myoverview/templates/course-event-list-item.mustache b/blocks/myoverview/templates/course-event-list-item.mustache index b48f82698d3..af7d5ee350f 100644 --- a/blocks/myoverview/templates/course-event-list-item.mustache +++ b/blocks/myoverview/templates/course-event-list-item.mustache @@ -22,14 +22,15 @@ Example context (json): { - "enddate": "Nov 4th, 10am", "name": "Assignment due 1", "url": "https://www.google.com", + "timesort": 1490320388, "action": { "name": "Submit assignment", "url": "https://www.google.com", "itemcount": 1, - "showitemcount": true + "showitemcount": true, + "actionable": true }, "icon": { "key": "icon", diff --git a/blocks/myoverview/templates/course-event-list-items.mustache b/blocks/myoverview/templates/course-event-list-items.mustache index 3e084cf50d3..10a1c435dc0 100644 --- a/blocks/myoverview/templates/course-event-list-items.mustache +++ b/blocks/myoverview/templates/course-event-list-items.mustache @@ -24,13 +24,14 @@ { "events": [ { - "enddate": "Nov 4th, 10am", "name": "Assignment due 1", "url": "https://www.google.com", + "timesort": 1490320388, "action": { "name": "Submit assignment", "url": "https://www.google.com", - "itemcount": 1 + "itemcount": 1, + "actionable": true }, "icon": { "key": "icon", @@ -39,13 +40,14 @@ } }, { - "enddate": "Nov 4th, 10am", "name": "Assignment due 2", "url": "https://www.google.com", + "timesort": 1490320388, "action": { "name": "Submit assignment", "url": "https://www.google.com", - "itemcount": 1 + "itemcount": 1, + "actionable": true }, "icon": { "key": "icon", diff --git a/blocks/myoverview/templates/course-item.mustache b/blocks/myoverview/templates/course-item.mustache index 56467685f70..7d2250ba7e9 100644 --- a/blocks/myoverview/templates/course-item.mustache +++ b/blocks/myoverview/templates/course-item.mustache @@ -23,8 +23,8 @@ { "shortname": "course 3", "viewurl": "https://www.google.com", - "startdate": "Nov 1th, 10am", - "enddate": "Nov 4th, 10am", + "startdate": 1490320388, + "enddate": 1490320388, "summary": "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout." } }} diff --git a/blocks/myoverview/templates/course-paging-content-item.mustache b/blocks/myoverview/templates/course-paging-content-item.mustache index 57d4dc39080..c20a052f33f 100644 --- a/blocks/myoverview/templates/course-paging-content-item.mustache +++ b/blocks/myoverview/templates/course-paging-content-item.mustache @@ -17,13 +17,32 @@ {{! @template block_myoverview/course-paging-content-item - This template renders the each course block containing a summary and calendar events. + This template renders each course block. Example context (json): { + "page": 1, + "active": true, + "courses": [ + { + "fullnamedisplay": "course 1", + "viewurl": "https://www.google.com", + "startdate": 1490252232, + "enddate": 1490252232, + "summary": "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout." + }, + { + "fullnamedisplay": "course 2", + "viewurl": "https://www.google.com", + "startdate": 1490252232, + "enddate": 1490252232, + "summary": "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout." + } + ] } }} {{< block_myoverview/paging-content-item }} + {{$classes}}row{{/classes}} {{$content}} {{#courses}} {{> block_myoverview/courses-view-course-item }} diff --git a/blocks/myoverview/templates/course-paging-content.mustache b/blocks/myoverview/templates/course-paging-content.mustache index 1857f06ccbb..21a55611de8 100644 --- a/blocks/myoverview/templates/course-paging-content.mustache +++ b/blocks/myoverview/templates/course-paging-content.mustache @@ -15,12 +15,34 @@ along with Moodle. If not, see . }} {{! - @template block_myoverview/paging-bar + @template block_myoverview/course-paging-content This template renders the each course block containing a summary and calendar events. Example context (json): { + "pages": [ + { + "page": 1, + "active": true, + "courses": [ + { + "fullnamedisplay": "course 1", + "viewurl": "https://www.google.com", + "startdate": 1490252232, + "enddate": 1490252232, + "summary": "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout." + }, + { + "fullnamedisplay": "course 2", + "viewurl": "https://www.google.com", + "startdate": 1490252232, + "enddate": 1490252232, + "summary": "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout." + } + ] + } + ] } }} {{< block_myoverview/paging-content }} diff --git a/blocks/myoverview/templates/course-summary.mustache b/blocks/myoverview/templates/course-summary.mustache index fd56fcf5e4c..dcde9a38389 100644 --- a/blocks/myoverview/templates/course-summary.mustache +++ b/blocks/myoverview/templates/course-summary.mustache @@ -21,10 +21,10 @@ Example context (json): { - "shortname": "course 3", + "fullnamedisplay": "course 3", "viewurl": "https://www.google.com", - "startdate": "Nov 1th, 10am", - "enddate": "Nov 4th, 10am", + "startdate": 1490320388, + "enddate": 1490320388, "summary": "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout." } }} diff --git a/blocks/myoverview/templates/courses-view-course-item.mustache b/blocks/myoverview/templates/courses-view-course-item.mustache index 5e2b5ab606a..aa77887593c 100644 --- a/blocks/myoverview/templates/courses-view-course-item.mustache +++ b/blocks/myoverview/templates/courses-view-course-item.mustache @@ -15,16 +15,16 @@ along with Moodle. If not, see . }} {{! - @template block_myoverview/course-view-course-item + @template block_myoverview/courses-view-course-item This template renders the course summary (view by courses) for the myoverview block. Example context (json): { - "shortname": "course 3", + "fullnamedisplay": "course 3", "viewurl": "https://www.google.com", - "startdate": "Nov 1th, 10am", - "enddate": "Nov 4th, 10am", + "startdate": 1490252232, + "enddate": 1490252232, "summary": "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout." } }} diff --git a/blocks/myoverview/templates/event-list-item.mustache b/blocks/myoverview/templates/event-list-item.mustache index ddce069279b..139152f23b6 100644 --- a/blocks/myoverview/templates/event-list-item.mustache +++ b/blocks/myoverview/templates/event-list-item.mustache @@ -21,17 +21,18 @@ Example context (json): { - "enddate": "Nov 4th, 10am", "name": "Assignment due 1", "url": "https://www.google.com", + "timesort": 1490320388, "course": { - "fullname": "Course 1" + "fullnamedisplay": "Course 1" }, "action": { "name": "Submit assignment", "url": "https://www.google.com", "itemcount": 1, - "showitemcount": true + "showitemcount": true, + "actionable": true }, "icon": { "key": "icon", diff --git a/blocks/myoverview/templates/event-list-items.mustache b/blocks/myoverview/templates/event-list-items.mustache index 53c3b5f742e..2dc770bfc5e 100644 --- a/blocks/myoverview/templates/event-list-items.mustache +++ b/blocks/myoverview/templates/event-list-items.mustache @@ -23,16 +23,17 @@ { "events": [ { - "enddate": "Nov 4th, 10am", "name": "Assignment due 1", "url": "https://www.google.com", + "timesort": 1490320388, "course": { - "fullname": "Course 1" + "fullnamedisplay": "Course 1" }, "action": { "name": "Submit assignment", "url": "https://www.google.com", - "itemcount": 1 + "itemcount": 1, + "actionable": true }, "icon": { "key": "icon", @@ -41,16 +42,17 @@ } }, { - "enddate": "Nov 4th, 10am", "name": "Assignment due 2", "url": "https://www.google.com", + "timesort": 1490320388, "course": { - "fullname": "Course 1" + "fullnamedisplay": "Course 1" }, "action": { "name": "Submit assignment", "url": "https://www.google.com", - "itemcount": 1 + "itemcount": 1, + "actionable": true }, "icon": { "key": "icon", diff --git a/blocks/myoverview/templates/paging-content-item.mustache b/blocks/myoverview/templates/paging-content-item.mustache index 8897126316e..82e73e19bde 100644 --- a/blocks/myoverview/templates/paging-content-item.mustache +++ b/blocks/myoverview/templates/paging-content-item.mustache @@ -17,15 +17,19 @@ {{! @template block_myoverview/paging-content-item - This template renders the each course block containing a summary and calendar events. + This template renders the content of a page. It is to be used with + the paging bar to toggle visibility of the content items. Example context (json): { + "active": true, + "page": 1, + "content": "

Some page content

" } }}
+ class="{{^active}}hidden{{/active}} {{$classes}}{{/classes}}"> {{$content}} {{{content}}} {{/content}} diff --git a/blocks/myoverview/templates/paging-content.mustache b/blocks/myoverview/templates/paging-content.mustache index 5fbc5c291a2..83a9cdd799b 100644 --- a/blocks/myoverview/templates/paging-content.mustache +++ b/blocks/myoverview/templates/paging-content.mustache @@ -17,10 +17,22 @@ {{! @template block_myoverview/paging-content - This template renders the each course block containing a summary and calendar events. + This template renders each of the content regions for a paginated + content section. Example context (json): { + "pages": [ + { + "active": true, + "page": 1, + "content": "

Some page content

" + }, + { + "page": 2, + "content": "

Some page content

" + } + ] } }}
diff --git a/theme/boost/scss/moodle/blocks.scss b/theme/boost/scss/moodle/blocks.scss index 217235208b9..7ab7cf71dc2 100644 --- a/theme/boost/scss/moodle/blocks.scss +++ b/theme/boost/scss/moodle/blocks.scss @@ -147,10 +147,11 @@ $doughnut-fill-colour: $brand-warning; /*rtl:ignore*/ left: 50%; margin: 0; - transform: translate(-45%, -45%); + transform: translate(-48%, -50%); color: #fff; - height: ($chart-size / 2); - width: ($chart-size / 2); + height: ($chart-size / 2) + 10px; + width: ($chart-size / 2) + 10px; + font-size: ($chart-size / 2) + 10px; } } }