MDL-64376 recentlyaccessedcourses: stop reloading on favourite

Stop reloading the whole content when a single course is favourited
or unfavourited.
This commit is contained in:
Ryan Wyllie 2018-12-12 10:06:00 +08:00 committed by Ryan Wyllie
parent 07203d34f1
commit 6d9727628a
6 changed files with 71 additions and 69 deletions

View file

@ -1,21 +0,0 @@
{{!
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/>.
}}
{{< core_course/no-courses}}
{{$nocoursestring}}
{{#str}} nocourses, block_recentlyaccessedcourses {{/str}}
{{/nocoursestring}}
{{/ core_course/no-courses}}

View file

@ -25,8 +25,7 @@
}
}}
<div id="recentlyaccessedcourses-view-{{uniqid}}"
data-region="recentlyaccessedcourses-view"
data-nocoursesimg="{{nocoursesimg}}">
data-region="recentlyaccessedcourses-view">
<div data-region="recentlyaccessedcourses-view-content">
<div data-region="recentlyaccessedcourses-loading-placeholder">
<div class="card-deck dashboard-card-deck one-row" style="height: 11.1rem">
@ -37,4 +36,11 @@
</div>
</div>
</div>
</div>
<div class="hidden text-xs-center text-center m-t-3" data-region="empty-message">
<img class="empty-placeholder-image-lg m-t-1"
src="{{nocoursesimgurl}}"
alt="{{#str}} nocourses, block_recentlyaccessedcourses {{/str}}"
role="presentation">
<p class="text-muted mt-3">{{#str}} nocourses, block_recentlyaccessedcourses {{/str}}</p>
</div>
</div>