Skip to content

Commit

Permalink
Merge branch 'MDL-72275-311-2' of git://github.com/mickhawkins/moodle…
Browse files Browse the repository at this point in the history
… into MOODLE_311_STABLE
  • Loading branch information
abgreeve committed Sep 30, 2021
2 parents 954bc8e + 5b6f956 commit 250524c
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 12 deletions.
2 changes: 1 addition & 1 deletion blocks/timeline/amd/build/view_dates.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion blocks/timeline/amd/build/view_dates.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions blocks/timeline/amd/src/view_dates.js
Expand Up @@ -118,7 +118,7 @@ function(
root = $(root);
if (root.hasClass('active')) {
load(root);
root.data('seen', true);
root.attr('data-seen', true);
}
};

Expand All @@ -132,7 +132,7 @@ function(
root.removeAttr('data-seen');
if (root.hasClass('active')) {
load(root);
root.data('seen', true);
root.attr('data-seen', true);
}
};

Expand All @@ -142,9 +142,9 @@ function(
* @param {object} root The root element for the timeline courses view.
*/
var shown = function(root) {
if (!root.data('seen')) {
if (!root.attr('data-seen')) {
load(root);
root.data('seen', true);
root.attr('data-seen', true);
}
};

Expand Down
6 changes: 3 additions & 3 deletions blocks/timeline/classes/output/main.php
Expand Up @@ -102,7 +102,7 @@ protected function get_filters_as_booleans() {
*/
private function get_filter_offsets() {

$limit = false;
$limit = '';
if (in_array($this->filter, [BLOCK_TIMELINE_FILTER_BY_NONE, BLOCK_TIMELINE_FILTER_BY_OVERDUE])) {
$offset = -14;
if ($this->filter == BLOCK_TIMELINE_FILTER_BY_OVERDUE) {
Expand Down Expand Up @@ -170,8 +170,8 @@ public function export_for_template(renderer_base $output) {
'sorttimelinecourses' => $this->order == BLOCK_TIMELINE_SORT_BY_COURSES,
'selectedfilter' => $this->filter,
'hasdaysoffset' => true,
'hasdayslimit' => $offsets['dayslimit'] !== false ,
'nodayslimit' => $offsets['dayslimit'] === false ,
'hasdayslimit' => $offsets['dayslimit'] !== '' ,
'nodayslimit' => $offsets['dayslimit'] === '' ,
'limit' => $this->limit
];
return array_merge($contextvariables, $filters, $offsets);
Expand Down
2 changes: 1 addition & 1 deletion blocks/timeline/templates/nav-day-filter.mustache
Expand Up @@ -98,7 +98,7 @@
{{#str}} next3months, block_timeline {{/str}}
</a>
<a
class="dropdown-item {{#next6months}} active {{/next6months}}"
class="dropdown-item"
href="#"
data-from="0"
data-to="180"
Expand Down
2 changes: 1 addition & 1 deletion blocks/timeline/templates/view.mustache
Expand Up @@ -58,7 +58,7 @@
data-limit="2"
data-offset="0"
data-days-limit="{{dayslimit}}"
data-days-offset="0"
data-days-offset="{{daysoffset}}"
data-no-events-url="{{urls.noevents}}"
id="view_courses_{{uniqid}}"
>
Expand Down

0 comments on commit 250524c

Please sign in to comment.