COURSES_CARDS: 'block_myoverview/view-cards',
COURSES_LIST: 'block_myoverview/view-list',
COURSES_SUMMARY: 'block_myoverview/view-summary',
- NOCOURSES: 'block_myoverview/no-courses'
+ NOCOURSES: 'core_course/no-courses'
};
var NUMCOURSES_PERPAGE = [12, 24, 48];
$string['list'] = 'List';
$string['myoverview:addinstance'] = 'Add a new course overview block';
$string['myoverview:myaddinstance'] = 'Add a new course overview block to Dashboard';
-$string['nocourses'] = 'No courses';
$string['past'] = 'Past';
$string['pluginname'] = 'Course overview';
$string['privacy:metadata:overviewsortpreference'] = 'The Course overview block sort preference.';
$string['viewcoursename'] = 'View course {$a}';
$string['privacy:metadata:overviewlasttab'] = 'This stores the last tab selected by the user on the overview block.';
$string['viewcourse'] = 'View course';
+
+// Deprecated since Moodle 3.7.
+$string['nocourses'] = 'No courses';
\ No newline at end of file
sortbydates,block_myoverview
timeline,block_myoverview
viewcoursename,block_myoverview
-privacy:metadata:overviewlasttab,block_myoverview
\ No newline at end of file
+privacy:metadata:overviewlasttab,block_myoverview
+nocourses,block_myoverview
\ No newline at end of file
+++ /dev/null
-{{!
- 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_myoverview/no-courses
-
- This template renders the no courses message.
-
- Example context (json):
- {
- "nocoursesimg": "https://moodlesite/theme/image.php/boost/block_myoverview/1535727318/courses"
- }
-}}
-<div class="text-xs-center text-center m-t-1" data-region="empty-message">
- <img class="empty-placeholder-image-lg m-t-1"
- src="{{nocoursesimg}}"
- alt="{{#str}} nocourses, block_myoverview {{/str}}"
- role="presentation">
- <p class="text-muted mt-3">{{#str}} nocourses, block_myoverview {{/str}}</p>
-</div>
<div data-region="loading-placeholder-content" aria-hidden="true">
{{#cards}}
<div class="card-deck dashboard-card-deck one-row" style="height: 13rem">
- <div class="card dashboard-card border-0">
- <div class="card-img-top bg-pulse-grey w-100" style="height: 7rem">
- </div>
- <div class="card-body course-info-container">
- <div class="bg-pulse-grey w-100" style="height: 1rem"></div>
- </div>
- </div>
- <div class="card dashboard-card border-0">
- <div class="card-img-top bg-pulse-grey w-100" style="height: 7rem">
- </div>
- <div class="card-body course-info-container">
- <div class="bg-pulse-grey w-100" style="height: 1rem"></div>
- </div>
- </div>
- <div class="card dashboard-card border-0">
- <div class="card-img-top bg-pulse-grey w-100" style="height: 7rem">
- </div>
- <div class="card-body course-info-container">
- <div class="bg-pulse-grey w-100" style="height: 1rem"></div>
- </div>
- </div>
- <div class="card dashboard-card border-0">
- <div class="card-img-top bg-pulse-grey w-100" style="height: 7rem">
- </div>
- <div class="card-body course-info-container">
- <div class="bg-pulse-grey w-100" style="height: 1rem"></div>
- </div>
- </div>
+ {{> core_course/placeholder-course }}
+ {{> core_course/placeholder-course }}
+ {{> core_course/placeholder-course }}
+ {{> core_course/placeholder-course }}
</div>
{{/cards}}
{{#list}}
*/
var renderCourses = function(root, courses) {
if (courses.length > 0) {
- return Templates.render('block_recentlyaccessedcourses/view-cards', {
+ return Templates.render('core_course/view-cards', {
courses: courses
});
} else {
- var nocoursesimgurl = root.attr('data-nocoursesimgurl');
- return Templates.render('block_recentlyaccessedcourses/no-courses', {
- nocoursesimgurl: nocoursesimgurl
+ var nocoursesimgurl = root.attr('data-nocoursesimg');
+ return Templates.render('core_course/no-courses', {
+ nocoursesimg: nocoursesimgurl
});
}
};
return [
'userid' => $USER->id,
- 'nocoursesimgurl' => $nocoursesurl
+ 'nocoursesimg' => $nocoursesurl
];
}
}
* @copyright 2018 Victor Deniz <victor@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$string['nocourses'] = 'No recent courses';
$string['pluginname'] = 'Recently accessed courses';
$string['privacy:metadata'] = 'The Recently accessed courses block does not store any personal data.';
$string['recentlyaccessedcourses:addinstance'] = 'Add a new Recently accessed courses block';
$string['recentlyaccessedcourses:myaddinstance'] = 'Add a new recently accessed courses block to Dashboard';
+
+// Deprecated since Moodle 3.7.
+$string['nocourses'] = 'No recent courses';
\ No newline at end of file
--- /dev/null
+nocourses,block_recentlyaccessedcourses
\ No newline at end of file
Example context (json):
{
"userid": 2,
- "nocoursesimgurl": "https://moodlesite/theme/image.php/boost/block_recentlyaccessedcourses/1535727318/courses"
+ "nocoursesimg": "https://moodlesite/theme/image.php/boost/block_recentlyaccessedcourses/1535727318/courses"
}
}}
Example context (json):
{
- "nocoursesimgurl": "https://moodlesite/theme/image.php/boost/block_recentlyaccessedcourses/1535727318/courses"
+ "nocoursesimg": "https://moodlesite/theme/image.php/boost/block_recentlyaccessedcourses/1535727318/courses"
}
}}
<div id="recentlyaccessedcourses-view-{{uniqid}}"
data-region="recentlyaccessedcourses-view"
- data-nocoursesimgurl="{{nocoursesimgurl}}">
+ data-nocoursesimg="{{nocoursesimg}}">
<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">
- {{> block_recentlyaccessedcourses/placeholder-course }}
- {{> block_recentlyaccessedcourses/placeholder-course }}
- {{> block_recentlyaccessedcourses/placeholder-course }}
- {{> block_recentlyaccessedcourses/placeholder-course }}
+ {{> core_course/placeholder-course }}
+ {{> core_course/placeholder-course }}
+ {{> core_course/placeholder-course }}
+ {{> core_course/placeholder-course }}
</div>
</div>
</div>
*/
var renderCourses = function(root, courses) {
if (courses.length > 0) {
- return Templates.render('block_starredcourses/view-cards', {
+ return Templates.render('core_course/view-cards', {
courses: courses
});
} else {
var nocoursesimg = root.find(SELECTORS.STARRED_COURSES_REGION_VIEW).attr('data-nocoursesimg');
- return Templates.render('block_starredcourses/no-courses', {
+ return Templates.render('core_course/no-courses', {
nocoursesimg: nocoursesimg
});
}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$string['nocourses'] = 'No starred courses';
$string['pluginname'] = 'Starred courses';
$string['privacy:metadata'] = 'The starred courses block does not store any personal data.';
$string['starredcourses:addinstance'] = 'Add a new starred courses block';
$string['starredcourses:myaddinstance'] = 'Add a new starred courses block to Dashboard';
+// Deprecated since Moodle 3.7.
+$string['nocourses'] = 'No starred courses';
\ No newline at end of file
--- /dev/null
+nocourses,block_starredcourses
\ No newline at end of file
+++ /dev/null
-{{!
- 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_starredcourses/no-courses
- This template renders the no courses message.
- Example context (json):
- {
- "nocoursesimg": "https://moodlesite/theme/image.php/boost/block_recentcourses/1535727318/courses"
- }
-}}
-<div class="text-xs-center text-center m-t-3" data-region="empty-message">
- <img class="empty-placeholder-image-lg m-t-1"
- src="{{nocoursesimg}}"
- alt="{{#str}} nocourses, block_starredcourses {{/str}}"
- role="presentation">
- <p class="text-muted mt-3">{{#str}} nocourses, block_starredcourses {{/str}}</p>
-</div>
+++ /dev/null
-{{!
- 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_starredcourses/placeholder-course
- This template renders an course card item loading placeholder for the starred courses block.
- Example context (json):
- {}
-}}
-<div class="card dashboard-card border-0">
- <div class="card-img-top bg-pulse-grey w-100" style="height: 7rem">
- </div>
- <div class="card-body recent-course-info-container">
- <div class="bg-pulse-grey w-100" style="height: 1rem"></div>
- </div>
-</div>
+++ /dev/null
-{{!
- 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 Licensebllsdsadfasfd
- along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-}}
-{{!
- @template block_starredcourses/view-cards
- This template renders the carousel for the starredcourses block.
- Example context (json):
- {
- "courses": [
- {
- "name": "Assignment due 1",
- "viewurl": "https://moodlesite/course/view.php?id=2",
- "courseimage": "https://moodlesite/pluginfile/123/course/overviewfiles/123.jpg",
- "fullname": "course 3"
- }
- ]
- }
-}}
-
-{{< core_course/coursecards }}
- {{$classes}}one-row{{/classes}}
- {{$coursename}} {{fullname}} {{/coursename}}
-{{/ core_course/coursecards }}
<div data-region="starred-courses-view-content">
<div data-region="starred-courses-loading-placeholder">
<div class="card-deck dashboard-card-deck one-row" style="height: 11.1rem">
- {{> block_starredcourses/placeholder-course }}
- {{> block_starredcourses/placeholder-course }}
- {{> block_starredcourses/placeholder-course }}
+ {{> core_course/placeholder-course }}
+ {{> core_course/placeholder-course }}
+ {{> core_course/placeholder-course }}
</div>
</div>
</div>
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
- @template block_recentlyaccessedcourses/no-courses
+ @template core_course/no-courses
This template renders the no courses message.
}}
<div class="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}}"
+ src="{{nocoursesimg}}"
+ alt="{{#str}} nocourses, core {{/str}}"
role="presentation">
- <p class="text-muted mt-3">{{#str}} nocourses, block_recentlyaccessedcourses {{/str}}</p>
+ <p class="text-muted mt-3">{{#str}} nocourses, core {{/str}}</p>
</div>
\ No newline at end of file
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
- @template block_recentlyaccessedcourses/placeholder-course
+ @template core_course/placeholder-course
- This template renders an course card item loading placeholder for the recentlyaccessedcourses block.
+ This template renders an course card item loading placeholder for multiple blocks.
Example context (json):
{}
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
- @template block_recentlyaccessedcourses/view-cards
+ @template core_course/view-cards
- This template renders the carousel for the recentlyaccessedcourses block.
+ This template renders the carousel for the recentlyaccessedcourses & starredcourses blocks.
Example context (json):
{