-
-
- {{> block_myoverview/course-summary }}
-
-
- {{< block_myoverview/course-event-list }}
- {{$limit}}10{{/limit}}
- {{$offset}}0{{/offset}}
- {{$courseid}}{{id}}{{/courseid}}
- {{/ block_myoverview/course-event-list }}
-
+
+
+ {{> block_myoverview/course-summary }}
+
+
+ {{< block_myoverview/course-event-list }}
+ {{$limit}}10{{/limit}}
+ {{$offset}}0{{/offset}}
+ {{$courseid}}{{id}}{{/courseid}}
+ {{/ block_myoverview/course-event-list }}
diff --git a/theme/bootstrapbase/templates/block_myoverview/course-paging-content-item.mustache b/theme/bootstrapbase/templates/block_myoverview/course-paging-content-item.mustache
new file mode 100644
index 00000000000..c536b4c5142
--- /dev/null
+++ b/theme/bootstrapbase/templates/block_myoverview/course-paging-content-item.mustache
@@ -0,0 +1,50 @@
+{{!
+ This file is part of Moodle - http://moodle.org/
+
+ Moodle is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Moodle is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Moodle. If not, see
.
+}}
+{{!
+ @template block_myoverview/course-paging-content-item
+
+ 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 }}
+ {{$content}}
+ {{#courses}}
+ {{> block_myoverview/courses-view-course-item }}
+ {{/courses}}
+ {{/content}}
+{{/ block_myoverview/paging-content-item }}
diff --git a/theme/bootstrapbase/templates/block_myoverview/course-summary.mustache b/theme/bootstrapbase/templates/block_myoverview/course-summary.mustache
new file mode 100644
index 00000000000..e0220cc70f3
--- /dev/null
+++ b/theme/bootstrapbase/templates/block_myoverview/course-summary.mustache
@@ -0,0 +1,57 @@
+{{!
+ This file is part of Moodle - http://moodle.org/
+
+ Moodle is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Moodle is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Moodle. If not, see
.
+}}
+{{!
+ @template block_myoverview/course-summary
+
+ This template renders the course summary (view by courses) for the myoverview block.
+
+ Example context (json):
+ {
+ "fullnamedisplay": "course 3",
+ "viewurl": "https://www.google.com",
+ "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."
+ }
+}}
+
+
+ {{> block_myoverview/progress-chart}}
+
+
+
+
+ {{#userdate}}{{startdate}}, {{#str}}strftimedate, langconfig{{/str}}{{/userdate}}
+ {{#enddate}}
+ - {{#userdate}}{{enddate}}, {{#str}}strftimedate, langconfig{{/str}}{{/userdate}}
+ {{/enddate}}
+
+
+ {{#shortentext}} 140, {{{summary}}}{{/shortentext}}
+
+
diff --git a/theme/bootstrapbase/templates/block_myoverview/courses-view-course-item.mustache b/theme/bootstrapbase/templates/block_myoverview/courses-view-course-item.mustache
new file mode 100644
index 00000000000..753fa6327f1
--- /dev/null
+++ b/theme/bootstrapbase/templates/block_myoverview/courses-view-course-item.mustache
@@ -0,0 +1,53 @@
+{{!
+ This file is part of Moodle - http://moodle.org/
+
+ Moodle is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Moodle is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Moodle. If not, see
.
+}}
+{{!
+ @template block_myoverview/course-view-course-item
+
+ This template renders the course summary (view by courses) for the myoverview block.
+
+ Example context (json):
+ {
+ "shortname": "course 3",
+ "viewurl": "https://www.google.com",
+ "startdate": "Nov 1th, 10am",
+ "enddate": "Nov 4th, 10am",
+ "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."
+ }
+}}
+
+
+
+
+ {{#userdate}}{{startdate}}, {{#str}}strftimedate, langconfig{{/str}}{{/userdate}}
+ {{#enddate}}
+ - {{#userdate}}{{enddate}}, {{#str}}strftimedate, langconfig{{/str}}{{/userdate}}
+ {{/enddate}}
+
+
+ {{#shortentext}} 140, {{{summary}}}{{/shortentext}}
+
+
+
diff --git a/theme/bootstrapbase/templates/block_myoverview/courses-view.mustache b/theme/bootstrapbase/templates/block_myoverview/courses-view.mustache
new file mode 100644
index 00000000000..b8a9dee10f5
--- /dev/null
+++ b/theme/bootstrapbase/templates/block_myoverview/courses-view.mustache
@@ -0,0 +1,114 @@
+{{!
+ This file is part of Moodle - http://moodle.org/
+
+ Moodle is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Moodle is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Moodle. If not, see
.
+}}
+{{!
+ @template block_myoverview/courses-view
+
+ This template renders the courses view for the myoverview block.
+
+ Example context (json):
+ {}
+}}
+
+ {{#hascourses}}
+
+
+
+ {{#inprogress}}
+ {{< block_myoverview/courses-view-by-status }}
+ {{$id}}courses-view-in-progress{{/id}}
+ {{$status}}1{{/status}}
+ {{$pagingbarid}}pb-for-in-progress{{/pagingbarid}}
+ {{$pagingcontentid}}pc-for-in-progress{{/pagingcontentid}}
+ {{/ block_myoverview/courses-view-by-status }}
+ {{/inprogress}}
+ {{^inprogress}}
+
+

+
{{#str}} nocoursesinprogress, block_myoverview {{/str}}
+
+ {{/inprogress}}
+
+
+ {{#future}}
+ {{< block_myoverview/courses-view-by-status }}
+ {{$id}}courses-view-future{{/id}}
+ {{$status}}2{{/status}}
+ {{$pagingbarid}}pb-for-future{{/pagingbarid}}
+ {{$pagingcontentid}}pc-for-in-progress{{/pagingcontentid}}
+ {{/ block_myoverview/courses-view-by-status }}
+ {{/future}}
+ {{^future}}
+
+

+
{{#str}} nocoursesfuture, block_myoverview {{/str}}
+
+ {{/future}}
+
+
+ {{#past}}
+ {{< block_myoverview/courses-view-by-status }}
+ {{$id}}courses-view-past{{/id}}
+ {{$status}}0{{/status}}
+ {{$pagingbarid}}pb-for-past{{/pagingbarid}}
+ {{$pagingcontentid}}pc-for-in-progress{{/pagingcontentid}}
+ {{/ block_myoverview/courses-view-by-status }}
+ {{/past}}
+ {{^past}}
+
+

+
{{#str}} nocoursespast, block_myoverview {{/str}}
+
+ {{/past}}
+
+
+ {{/hascourses}}
+ {{^hascourses}}
+
+

+
{{#str}} nocourses, block_myoverview {{/str}}
+
+ {{/hascourses}}
+
+{{#js}}
+require(['jquery', 'core/custom_interaction_events'], function($, customEvents) {
+ var root = $('#courses-view-{{uniqid}}');
+ customEvents.define(root, [customEvents.events.activate]);
+ root.on(customEvents.events.activate, '[data-toggle="btns"] > .btn', function() {
+ root.find('.btn.active').removeClass('active');
+ });
+});
+{{/js}}
diff --git a/theme/bootstrapbase/templates/block_myoverview/event-list-group.mustache b/theme/bootstrapbase/templates/block_myoverview/event-list-group.mustache
new file mode 100644
index 00000000000..2fd6bfbae87
--- /dev/null
+++ b/theme/bootstrapbase/templates/block_myoverview/event-list-group.mustache
@@ -0,0 +1,75 @@
+{{!
+ This file is part of Moodle - http://moodle.org/
+
+ Moodle is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Moodle is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Moodle. If not, see
.
+}}
+{{!
+ @template block_myoverview/event-list-group
+
+ This template renders a list of events for the myoverview block.
+
+ Example context (json):
+ {
+ "events": [
+ {
+ "enddate": "Nov 4th, 10am",
+ "name": "Assignment due 1",
+ "url": "https://www.google.com",
+ "course": {
+ "fullname": "Course 1"
+ },
+ "action": {
+ "name": "Submit assignment",
+ "url": "https://www.google.com",
+ "itemcount": 1
+ },
+ "icon": {
+ "key": "icon",
+ "component": "mod_assign",
+ "alttext": "Assignment icon"
+ }
+ },
+ {
+ "enddate": "Nov 4th, 10am",
+ "name": "Assignment due 2",
+ "url": "https://www.google.com",
+ "course": {
+ "fullname": "Course 1"
+ },
+ "action": {
+ "name": "Submit assignment",
+ "url": "https://www.google.com",
+ "itemcount": 1
+ },
+ "icon": {
+ "key": "icon",
+ "component": "mod_assign",
+ "alttext": "Assignment icon"
+ }
+ }
+ ]
+ }
+}}
+
+
+
+
+ {{$eventlistitems}}
+ {{> block_myoverview/event-list-items }}
+ {{/eventlistitems}}
+
+
diff --git a/theme/bootstrapbase/templates/block_myoverview/event-list-item.mustache b/theme/bootstrapbase/templates/block_myoverview/event-list-item.mustache
index 5c02670e117..931ca5bba77 100644
--- a/theme/bootstrapbase/templates/block_myoverview/event-list-item.mustache
+++ b/theme/bootstrapbase/templates/block_myoverview/event-list-item.mustache
@@ -21,16 +21,18 @@
Example context (json):
{
- "enddate": "Nov 4th, 10am",
"name": "Assignment due 1",
"url": "https://www.google.com",
+ "timesort": 1490320388,
"course": {
"fullnamedisplay": "Course 1"
},
"action": {
"name": "Submit assignment",
"url": "https://www.google.com",
- "itemcount": 1
+ "itemcount": 1,
+ "showitemcount": true,
+ "actionable": true
},
"icon": {
"key": "icon",
@@ -39,18 +41,18 @@
}
}
}}
-
-
+
+
{{#icon}}{{#pix}} {{key}}, {{component}}, {{alttext}} {{/pix}}{{/icon}}
{{name}}
-
{{course.fullnamedisplay}}
+
{{course.fullnamedisplay}}
-
+
{{#userdate}} {{timesort}}, {{#str}} strftimerecent {{/str}} {{/userdate}}
@@ -59,7 +61,9 @@
{{#action.actionable}}
{{action.name}}
{{#action.itemcount}}
-
{{.}}
+ {{#action.showitemcount}}
+
{{.}}
+ {{/action.showitemcount}}
{{/action.itemcount}}
{{/action.actionable}}
{{^action.actionable}}
@@ -68,13 +72,33 @@
-
+
+
+
+
+ {{#icon}}{{#pix}} {{key}}, {{component}}, {{alttext}} {{/pix}}{{/icon}}
+
+
+
{{name}}
+
{{course.fullnamedisplay}}
+
+
+
+ {{#userdate}} {{timesort}}, {{#str}} strftimerecent {{/str}} {{/userdate}}
+
+
+
+
+
+ {{#icon}}{{#pix}} {{key}}, {{component}}, {{alttext}} {{/pix}}{{/icon}}
+
+
+
{{name}}
+
{{course.fullnamedisplay}}
+
{{#userdate}} {{timesort}}, {{#str}} strftimerecent {{/str}} {{/userdate}}
-
- {{#userdate}} {{timesort}}, {{#str}} strftimerecent {{/str}} {{/userdate}}
-
diff --git a/theme/bootstrapbase/templates/block_myoverview/timeline-view.mustache b/theme/bootstrapbase/templates/block_myoverview/timeline-view.mustache
index 7c11a3daf6b..9ccdb7d4325 100644
--- a/theme/bootstrapbase/templates/block_myoverview/timeline-view.mustache
+++ b/theme/bootstrapbase/templates/block_myoverview/timeline-view.mustache
@@ -24,7 +24,7 @@
}}