first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
@@ -0,0 +1,39 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template block_timeline/course-item-loading-placeholder
This template renders the each course block containing a summary and calendar events.
Example context (json):
{}
}}
<li class="list-group-item mt-3 p-0 px-2 border-0">
<div class="w-50 bg-pulse-grey mt-1 mb-2" style="height: 20px"></div>
<div>
<ul class="pl-0 list-group list-group-flush">
{{> block_timeline/placeholder-event-list-item }}
{{> block_timeline/placeholder-event-list-item }}
{{> block_timeline/placeholder-event-list-item }}
{{> block_timeline/placeholder-event-list-item }}
{{> block_timeline/placeholder-event-list-item }}
</ul>
<div class="pt-3 pb-2 d-flex justify-content-between">
<div class="w-25 bg-pulse-grey" style="height: 35px"></div>
</div>
</div>
</li>
@@ -0,0 +1,36 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template block_timeline/course-item
This template renders the each course block containing a summary and calendar events.
Example context (json):
{
"shortname": "course 3",
"viewurl": "https://www.google.com",
"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."
}
}}
<li class="list-group-item mt-3 p-0 border-0">
<div data-region="course-events-container" id="course-events-container-{{id}}" data-course-id="{{id}}" class="px-2">
<h4 class="h5 font-weight-bold">{{{fullnamedisplay}}}</h4>
{{< block_timeline/event-list }}
{{$courseid}}{{id}}{{/courseid}}
{{/ block_timeline/event-list }}
</div>
</li>
@@ -0,0 +1,31 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template block_timeline/course-items
This template renders the each course block containing a summary and calendar events.
Example context (json):
{
"shortname": "course 3",
"viewurl": "https://www.google.com",
"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."
}
}}
{{#courses}}
{{> block_timeline/course-item }}
{{/courses}}
@@ -0,0 +1,73 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template block_timeline/event-list-content
This template renders a group of event list items for the timeline block.
Example context (json):
{
"events": [
{
"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,
"actionable": true
},
"icon": {
"key": "icon",
"component": "mod_assign",
"alttext": "Assignment icon"
}
},
{
"name": "Assignment due 2",
"url": "https://www.google.com",
"timesort": 1490320388,
"course": {
"fullnamedisplay": "Course 1"
},
"action": {
"name": "Submit assignment",
"url": "https://www.google.com",
"itemcount": 1,
"actionable": true
},
"icon": {
"key": "icon",
"component": "mod_assign",
"alttext": "Assignment icon"
}
}
]
}
}}
<div class="pb-2" data-region="event-list-wrapper">
{{#eventsbyday}}
<div class="mt-3" data-region="event-list-content-date" data-timestamp="{{dayTimestamp}}">
<h5 class="h6 d-inline {{^courseview}}font-weight-bold px-2{{/courseview}}">{{#userdate}} {{dayTimestamp}}, {{#str}} strftimedaydate, core_langconfig {{/str}} {{/userdate}}</h5>
</div>
{{> block_timeline/event-list-items }}
{{/eventsbyday}}
</div>
@@ -0,0 +1,104 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template block_timeline/event-list-item
This template renders an event list item for the timeline block.
Example context (json):
{
"name": "Assignment 1 is due",
"activityname": "Assignment",
"activitystr": "Assignment is due",
"courseview": true,
"url": "https://www.google.com",
"timesort": 1490320388,
"course": {
"fullnamedisplay": "Course 1"
},
"action": {
"name": "Submit assignment",
"url": "https://www.google.com",
"itemcount": 1,
"showitemcount": true,
"actionable": true
},
"icon": {
"key": "icon",
"component": "mod_assign",
"alttext": "Assignment icon",
"iconurl": "#"
},
"overdue": false,
"purpose": "assessment"
}
}}
<div class="list-group-item timeline-event-list-item flex-column pt-2 pb-0 border-0 {{#courseview}}px-0{{/courseview}}{{^courseview}}px-2{{/courseview}}"
data-region="event-list-item">
<div class="d-flex flex-wrap pb-1">
<div class="d-flex mr-auto pb-1 mw-100 timeline-name">
<small class="text-right text-nowrap align-self-center ml-1">
{{#userdate}} {{timesort}}, {{#str}} strftimetime24, core_langconfig {{/str}} {{/userdate}}
</small>
<div class="activityiconcontainer small courseicon align-self-top align-self-center mx-3 mb-1 mb-sm-0 text-nowrap">
{{#icon}}
{{#iconurl}}
<img alt="{{alttext}}" title="{{alttext}}" src="{{{ iconurl }}}" class="icon {{iconclass}}">
{{/iconurl}}
{{^iconurl}}
{{#pix}} {{key}}, {{component}}, {{alttext}} {{/pix}}
{{/iconurl}}
{{/icon}}
</div>
<div class="event-name-container flex-grow-1 line-height-3 nowrap text-truncate">
<div class="d-flex">
<h6 class="event-name mb-0 pb-1 text-truncate">
{{#overdue}}<span class="badge rounded-pill bg-danger text-white ml-1 float-right">{{#str}} overdue, block_timeline {{/str}}</span>{{/overdue}}
<a href="{{url}}"
title="{{name}}"
aria-label='{{#cleanstr}} ariaeventlistitem, block_timeline, { "name": {{#quote}}{{{activityname}}}{{/quote}}, "course": {{#quote}}{{{course.fullnamedisplay}}}{{/quote}}, "date": "{{#userdate}} {{timesort}}, {{#str}} strftimedatetime, core_langconfig {{/str}} {{/userdate}}" } {{/cleanstr}}'>
{{{activityname}}}</a>
</h6>
</div>
<small class="mb-0">
{{#courseview}}
{{activitystr}}
{{/courseview}}
{{^courseview}}
{{activitystr}}{{#course.fullnamedisplay}} &middot; {{{course.fullnamedisplay}}}{{/course.fullnamedisplay}}
{{/courseview}}
</small>
</div>
</div>
{{#action.actionable}}
<div class="d-flex timeline-action-button">
<h6 class="event-action">
<a class="list-group-item-action btn btn-outline-secondary btn-sm text-nowrap"
href="{{action.url}}"
aria-label="{{action.name}}"
title="{{action.name}}">
{{{action.name}}}
{{#action.showitemcount}}
<span class="badge bg-secondary text-dark">{{action.itemcount}}</span>
{{/action.showitemcount}}
</a>
</h6>
</div>
{{/action.actionable}}
</div>
<div class="pt-2 border-bottom"></div>
</div>
@@ -0,0 +1,70 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template block_timeline/event-list-items
This template renders a group of event list items for the timeline block.
Example context (json):
{
"events": [
{
"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,
"actionable": true
},
"icon": {
"key": "icon",
"component": "mod_assign",
"alttext": "Assignment icon"
}
},
{
"name": "Assignment due 2",
"url": "https://www.google.com",
"timesort": 1490320388,
"course": {
"fullnamedisplay": "Course 1"
},
"action": {
"name": "Submit assignment",
"url": "https://www.google.com",
"itemcount": 1,
"actionable": true
},
"icon": {
"key": "icon",
"component": "mod_assign",
"alttext": "Assignment icon"
}
}
]
}
}}
<div class="list-group list-group-flush">
{{#events}}
{{> block_timeline/event-list-item }}
{{/events}}
</div>
@@ -0,0 +1,31 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template block_timeline/event-list-loadmore
This template renders a show more activities button.
Example context (json):
{
"courseview": false
}
}}
<div class="pt-1 pb-2 {{^courseview}}pl-2{{/courseview}}" data-region="more-events-button-container">
<button type="button" class="btn btn-secondary btn-sm" data-action="more-events">
{{#str}} moreactivities, block_timeline {{/str}}
</button>
</div>
@@ -0,0 +1,49 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template block_timeline/event-list
This template renders a list of events for the timeline block.
Example context (json):
{
}
}}
<div data-region="event-list-container"
data-days-offset="{{$daysoffset}}{{#hasdaysoffset}}{{daysoffset}}{{/hasdaysoffset}}{{^hasdaysoffset}}0{{/hasdaysoffset}}{{/daysoffset}}"
{{^nodayslimit}}data-days-limit="{{$dayslimit}}{{#hasdayslimit}}{{dayslimit}}{{/hasdayslimit}}{{^hasdayslimit}}30{{/hasdayslimit}}{{/dayslimit}}"{{/nodayslimit}}
data-course-id="{{$courseid}}{{/courseid}}"
data-midnight="{{midnight}}"
>
{{#hascourses}}
<div data-region="event-list-loading-placeholder">
<ul class="pl-0 list-group list-group-flush">
{{> block_timeline/placeholder-event-list-item }}
{{> block_timeline/placeholder-event-list-item }}
{{> block_timeline/placeholder-event-list-item }}
{{> block_timeline/placeholder-event-list-item }}
{{> block_timeline/placeholder-event-list-item }}
</ul>
<div class="pt-3 pb-2 d-flex justify-content-between">
<div class="w-25 bg-pulse-grey" style="height: 35px"></div>
</div>
</div>
{{/hascourses}}
<div data-region="event-list-content"></div>
{{> block_timeline/no-events }}
{{> block_timeline/no-courses }}
</div>
+58
View File
@@ -0,0 +1,58 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template block_timeline/main
This template renders the main content area for the timeline block.
Example context (json):
{}
}}
<div id="block-timeline-{{uniqid}}-{{timelineinstanceid}}" class="block-timeline" data-region="timeline">
<div class="p-0 px-2">
<div class="row no-gutters">
<div class="mr-2 mb-1">
{{> block_timeline/nav-day-filter }}
</div>
<div class="mr-auto mb-1">
{{> block_timeline/nav-view-selector }}
</div>
<div class="col-md-6 col-sm-8 col-12 mb-1 d-flex justify-content-end nav-search">
{{> block_timeline/nav-search }}
</div>
</div>
<div class="pb-3 px-2 border-bottom"></div>
</div>
<div class="p-0">
{{> block_timeline/view }}
</div>
</div>
{{#js}}
require(
[
'jquery',
'block_timeline/main',
],
function(
$,
Main
) {
var root = $('#block-timeline-{{uniqid}}-{{timelineinstanceid}}');
Main.init(root);
});
{{/js}}
@@ -0,0 +1,113 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template block_timeline/nav-day-filter
This template renders the day range selector for the timeline view.
Example context (json):
{}
}}
<div data-region="day-filter" class="dropdown mb-1">
<button type="button" class="btn btn-outline-secondary dropdown-toggle icon-no-margin" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
aria-label="{{#str}} ariadayfilter, block_timeline {{/str}}" aria-controls="menudayfilter"
title="{{#str}} ariadayfilter, block_timeline{{/str}}" aria-describedby="timeline-day-filter-current-selection">
<span id="timeline-day-filter-current-selection" data-active-item-text>
{{#all}} {{#str}} all, core {{/str}} {{/all}}
{{#overdue}} {{#str}} overdue, block_timeline {{/str}} {{/overdue}}
{{#next7days}} {{#str}}next7days, block_timeline {{/str}} {{/next7days}}
{{#next30days}} {{#str}}next30days, block_timeline {{/str}} {{/next30days}}
{{#next3months}} {{#str}}next3months, block_timeline {{/str}} {{/next3months}}
{{#next6months}} {{#str}}next6months, block_timeline {{/str}} {{/next6months}}
</span>
</button>
<div id="menudayfilter" role="menu" class="dropdown-menu" data-show-active-item data-skip-active-class="true">
<a
class="dropdown-item"
href="#"
data-from="-14"
data-filtername="all"
{{#all}}aria-current="true"{{/all}}
aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} all, core {{/str}}{{/str}}"
role="menuitem"
>
{{#str}} all, core {{/str}}
</a>
<a
class="dropdown-item"
href="#"
data-from="-14"
data-to="1"
data-filtername="overdue"
{{#overdue}}aria-current="true"{{/overdue}}
aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} overdue, block_timeline {{/str}}{{/str}}"
role="menuitem"
>
{{#str}} overdue, block_timeline {{/str}}
</a>
<div class="dropdown-divider" role="separator"></div>
<h6 class="dropdown-header">{{#str}} duedate, block_timeline {{/str}}</h6>
<a
class="dropdown-item"
href="#"
data-from="0"
data-to="7"
data-filtername="next7days"
{{#next7days}}aria-current="true"{{/next7days}}
aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next7days, block_timeline {{/str}}{{/str}}"
role="menuitem"
>
{{#str}} next7days, block_timeline {{/str}}
</a>
<a
class="dropdown-item"
href="#"
data-from="0"
data-to="30"
data-filtername="next30days"
{{#next30days}}aria-current="true"{{/next30days}}
aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next30days, block_timeline {{/str}}{{/str}}"
role="menuitem"
>
{{#str}} next30days, block_timeline {{/str}}
</a>
<a
class="dropdown-item"
href="#"
data-from="0"
data-to="90"
data-filtername="next3months"
{{#next3months}}aria-current="true"{{/next3months}}
aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next3months, block_timeline {{/str}}{{/str}}"
role="menuitem"
>
{{#str}} next3months, block_timeline {{/str}}
</a>
<a
class="dropdown-item"
href="#"
data-from="0"
data-to="180"
data-filtername="next6months"
{{#next6months}}aria-current="true"{{/next6months}}
aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next6months, block_timeline {{/str}}{{/str}}"
role="menuitem"
>
{{#str}} next6months, block_timeline {{/str}}
</a>
</div>
</div>
@@ -0,0 +1,34 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template block_timeline/nav-search
This template renders the main content area for the timeline block.
Example context (json):
{}
}}
<div class="w-100">
{{< core/search_input_auto }}
{{$label}}{{#str}}
searchevents, block_timeline
{{/str}}{{/label}}
{{$placeholder}}{{#str}}
searchevents, block_timeline
{{/str}}{{/placeholder}}
{{/ core/search_input_auto }}
</div>
@@ -0,0 +1,58 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template block_timeline/nav-view-selector
This template renders the timeline sort selector.
Example context (json):
{}
}}
<div data-region="view-selector" class="btn-group mb-1">
<button type="button" class="btn btn-outline-secondary dropdown-toggle icon-no-margin" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
aria-label="{{#str}} ariaviewselector, block_timeline{{/str}}" aria-controls="menusortby"
title="{{#str}} ariaviewselector, block_timeline{{/str}}" aria-describedby="timeline-view-selector-current-selection">
<span id="timeline-view-selector-current-selection" data-active-item-text>
{{#sorttimelinecourses}}{{#str}} sortbycourses, block_timeline{{/str}}{{/sorttimelinecourses}}
{{#sorttimelinedates}}{{#str}} sortbydates, block_timeline {{/str}}{{/sorttimelinedates}}
</span>
</button>
<div id="menusortby" role="menu" class="dropdown-menu dropdown-menu-right list-group hidden" data-show-active-item data-skip-active-class="true">
<a
class="dropdown-item"
href="#view_dates_{{uniqid}}-{{timelineinstanceid}}"
data-toggle="tab"
data-filtername="sortbydates"
{{#sorttimelinedates}}aria-current="true"{{/sorttimelinedates}}
aria-label="{{#str}} ariaviewselectoroption, block_timeline, {{#str}} sortbydates, block_timeline {{/str}}{{/str}}"
role="menuitem"
>
{{#str}} sortbydates, block_timeline {{/str}}
</a>
<a
class="dropdown-item"
href="#view_courses_{{uniqid}}-{{timelineinstanceid}}"
data-toggle="tab"
data-filtername="sortbycourses"
{{#sorttimelinecourses}}aria-current="true"{{/sorttimelinecourses}}
aria-label="{{#str}} ariaviewselectoroption, block_timeline, {{#str}} sortbycourses, block_timeline {{/str}}{{/str}}"
role="menuitem"
>
{{#str}} sortbycourses, block_timeline {{/str}}
</a>
</div>
</div>
@@ -0,0 +1,39 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template block_timeline/no-courses
This template renders a notice that the user has no active courses.
Example context (json):
{
"hascourses": false,
"urls": {
"noevents": "#"
}
}
}}
{{^hascourses}}
<div class="text-xs-center text-center mt-3" data-region="no-courses-empty-message">
<img
src="{{urls.noevents}}"
alt=""
style="height: 70px; width: 70px"
>
<p class="text-muted mt-1">{{#str}} nocoursesinprogress, block_timeline {{/str}}</p>
</div>
{{/hascourses}}
@@ -0,0 +1,38 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template block_timeline/no-events
This template renders confirmation that no events require action.
Example context (json):
{
"urls": {
"noevents": "#"
}
}
}}
{{#urls.noevents}}
<div class="hidden text-xs-center text-center mt-3" data-region="no-events-empty-message">
<img
src="{{urls.noevents}}"
alt=""
style="height: 70px; width: 70px"
>
<p class="text-muted mt-1">{{#str}} noevents, block_timeline {{/str}}</p>
</div>
{{/urls.noevents}}
@@ -0,0 +1,42 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template block_timeline/placeholder-event-list-item
This template renders an event list item loading placeholder for the timeline block.
Example context (json):
{}
}}
<li class="list-group-item px-2">
<div class="row">
<div class="col-8 pr-0">
<div class="d-flex flex-row align-items-center" style="height: 32px">
<div class="bg-pulse-grey rounded-circle" style="height: 32px; width: 32px;"></div>
<div style="flex: 1" class="pl-2">
<div class="bg-pulse-grey w-100" style="height: 15px;"></div>
<div class="bg-pulse-grey w-75 mt-1" style="height: 10px;"></div>
</div>
</div>
</div>
<div class="col-4 pr-3">
<div class="d-flex flex-row justify-content-end" style="height: 32px; padding-top: 2px">
<div class="bg-pulse-grey w-75" style="height: 15px;"></div>
</div>
</div>
</div>
</li>
@@ -0,0 +1,44 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template block_timeline/view-courses
This template renders the timeline view by courses for the timeline block.
Example context (json):
{}
}}
{{#hascourses}}
<div data-region="course-items-loading-placeholder">
<ul class="list-group unstyled">
{{> block_timeline/course-item-loading-placeholder }}
{{> block_timeline/course-item-loading-placeholder }}
</ul>
<div class="bg-pulse-grey mt-1" style="width: 100px; height: 30px; margin-left: auto; margin-right: auto"></div>
</div>
{{/hascourses}}
<ul class="list-group unstyled" data-region="courses-list"></ul>
<div class="hidden text-xs-center text-center pt-3" data-region="more-courses-button-container">
<button type="button" class="btn btn-primary" data-action="more-courses">
{{#str}} morecourses, block_timeline {{/str}}
<span class="hidden" data-region="loading-icon-container">
{{> core/loading }}
</span>
</button>
</div>
{{> block_timeline/no-events }}
{{> block_timeline/no-courses }}
@@ -0,0 +1,27 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template block_timeline/view-dates
This template renders the timeline view by dates for the timeline block.
Example context (json):
{}
}}
<div data-region="timeline-view-dates">
{{> block_timeline/event-list }}
</div>
+71
View File
@@ -0,0 +1,71 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template block_timeline/view
This template renders the timeline view for the timeline block.
Example context (json):
{
"midnight": 1538954668,
"coursepages": [
{}
],
"urls": {
"nocourses": "#",
"noevents": "#"
},
"sorttimelinedates": true,
"sorttimelinecourses": false,
"selectedfilter": "all",
"hasdaysoffset": true,
"hasdayslimit": false,
"nodayslimit": true,
"all": true,
"overdue": false,
"next7days": false,
"next30days": false,
"next3months": false,
"next6months": false,
"daysoffset": -14,
"dayslimit": false,
"limit": 0,
"hascourses": true,
"overdue": false
}
}}
<div data-region="timeline-view">
<div class="tab-content">
<div class="tab-pane {{#sorttimelinedates}}active show{{/sorttimelinedates}} fade" data-limit="{{limit}}" data-region="view-dates" id="view_dates_{{uniqid}}-{{timelineinstanceid}}">
{{> block_timeline/view-dates }}
</div>
<div
class="tab-pane {{#sorttimelinecourses}}active show{{/sorttimelinecourses}} fade"
data-region="view-courses"
data-midnight="{{midnight}}"
data-limit="2"
data-offset="0"
data-days-limit="{{dayslimit}}"
data-days-offset="{{daysoffset}}"
data-no-events-url="{{urls.noevents}}"
{{#overdue}}data-filter-overdue="{{overdue}}"{{/overdue}}
id="view_courses_{{uniqid}}-{{timelineinstanceid}}"
>
{{> block_timeline/view-courses }}
</div>
</div>
</div>