diff --git a/src/addons/block/badges/components/badges/badges.scss b/src/addons/block/badges/components/badges/badges.scss
index 5ca9725d5..539340b70 100644
--- a/src/addons/block/badges/components/badges/badges.scss
+++ b/src/addons/block/badges/components/badges/badges.scss
@@ -1,21 +1,42 @@
-:host .core-block-content ::ng-deep {
- ul.badges {
- list-style: none;
- margin-left: 0;
- margin-right: 0;
- -webkit-padding-start: 0;
+:host {
+ --badge-size: 100px;
+ --badge-container-size: 150px;
- li {
- position: relative;
- display: inline-block;
- padding-top: 1em;
- text-align: center;
- vertical-align: top;
- width: 150px;
+ .core-block-content ::ng-deep {
- .badge-name {
- display: block;
- padding: 5px;
+ ul.badges {
+ list-style: none;
+ margin: 0;
+
+ li {
+ position: relative;
+ display: inline-block;
+ text-align: center;
+ margin-top: 1em;
+ vertical-align: top;
+ width: var(--badge-container-size);
+
+ .badge-name {
+ display: block;
+ padding: 5px;
+ }
+ .badge-image {
+ width: var(--badge-size);
+ }
+
+ .expireimage {
+ content: 'expired';
+ background-image: url('/assets/img/expired.svg');
+ background-repeat: no-repeat;
+ background-size: var(--badge-size) var(--badge-size);
+ width: var(--badge-size);
+ height: var(--badge-size);
+ left: calc((var(--badge-container-size) - var(--badge-size)) /2);
+ top: 0;
+ position: absolute;
+ z-index: 2;
+ opacity: .85;
+ }
}
}
}
diff --git a/src/addons/mod/h5pactivity/services/handlers/prefetch.ts b/src/addons/mod/h5pactivity/services/handlers/prefetch.ts
index 14ecc15cb..98309cf0a 100644
--- a/src/addons/mod/h5pactivity/services/handlers/prefetch.ts
+++ b/src/addons/mod/h5pactivity/services/handlers/prefetch.ts
@@ -154,6 +154,10 @@ export class AddonModH5PActivityPrefetchHandlerService extends CoreCourseActivit
};
if (!accessInfo.canreviewattempts) {
+ if (!h5pActivity.enabletracking) {
+ return;
+ }
+
// Not a teacher, prefetch user attempts and the current user profile.
const site = await CoreSites.getSite(siteId);
diff --git a/src/addons/storagemanager/pages/course-storage/course-storage.scss b/src/addons/storagemanager/pages/course-storage/course-storage.scss
index 8393ed5c4..8682b14eb 100644
--- a/src/addons/storagemanager/pages/course-storage/course-storage.scss
+++ b/src/addons/storagemanager/pages/course-storage/course-storage.scss
@@ -20,7 +20,8 @@
padding: 0;
}
- .core-course-storage-activity ion-label {
+ .core-course-storage-activity ion-label h3 {
+ position: relative;
max-height: var(--course-storage-max-activity-height);
&:before {
diff --git a/src/assets/img/expired.svg b/src/assets/img/expired.svg
new file mode 100644
index 000000000..adaaf862d
--- /dev/null
+++ b/src/assets/img/expired.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/assets/img/files/archive-64.png b/src/assets/img/files/archive-64.png
new file mode 100644
index 000000000..ba7111a02
Binary files /dev/null and b/src/assets/img/files/archive-64.png differ
diff --git a/src/assets/img/files/archive.png b/src/assets/img/files/archive.png
deleted file mode 100644
index 20aab03e1..000000000
Binary files a/src/assets/img/files/archive.png and /dev/null differ
diff --git a/src/assets/img/files/audio-64.png b/src/assets/img/files/audio-64.png
new file mode 100644
index 000000000..e98c78dd7
Binary files /dev/null and b/src/assets/img/files/audio-64.png differ
diff --git a/src/assets/img/files/audio.png b/src/assets/img/files/audio.png
deleted file mode 100644
index 7d8a7824e..000000000
Binary files a/src/assets/img/files/audio.png and /dev/null differ
diff --git a/src/assets/img/files/avi-64.png b/src/assets/img/files/avi-64.png
new file mode 100644
index 000000000..ec1a942cd
Binary files /dev/null and b/src/assets/img/files/avi-64.png differ
diff --git a/src/assets/img/files/avi.png b/src/assets/img/files/avi.png
deleted file mode 100644
index 700f9ce62..000000000
Binary files a/src/assets/img/files/avi.png and /dev/null differ
diff --git a/src/assets/img/files/base-64.png b/src/assets/img/files/base-64.png
new file mode 100644
index 000000000..cf698f525
Binary files /dev/null and b/src/assets/img/files/base-64.png differ
diff --git a/src/assets/img/files/base.png b/src/assets/img/files/base.png
deleted file mode 100644
index c75e01f12..000000000
Binary files a/src/assets/img/files/base.png and /dev/null differ
diff --git a/src/assets/img/files/bmp-64.png b/src/assets/img/files/bmp-64.png
new file mode 100644
index 000000000..562e7bbab
Binary files /dev/null and b/src/assets/img/files/bmp-64.png differ
diff --git a/src/assets/img/files/bmp.png b/src/assets/img/files/bmp.png
deleted file mode 100644
index 6b6dc8f37..000000000
Binary files a/src/assets/img/files/bmp.png and /dev/null differ
diff --git a/src/assets/img/files/calc-64.png b/src/assets/img/files/calc-64.png
new file mode 100644
index 000000000..b813dd2cb
Binary files /dev/null and b/src/assets/img/files/calc-64.png differ
diff --git a/src/assets/img/files/calc.png b/src/assets/img/files/calc.png
deleted file mode 100644
index ec76dceac..000000000
Binary files a/src/assets/img/files/calc.png and /dev/null differ
diff --git a/src/assets/img/files/chart-64.png b/src/assets/img/files/chart-64.png
new file mode 100644
index 000000000..4b8f85bd6
Binary files /dev/null and b/src/assets/img/files/chart-64.png differ
diff --git a/src/assets/img/files/chart.png b/src/assets/img/files/chart.png
deleted file mode 100644
index 8e04b2bc8..000000000
Binary files a/src/assets/img/files/chart.png and /dev/null differ
diff --git a/src/assets/img/files/database-64.png b/src/assets/img/files/database-64.png
new file mode 100644
index 000000000..33d5043c1
Binary files /dev/null and b/src/assets/img/files/database-64.png differ
diff --git a/src/assets/img/files/database.png b/src/assets/img/files/database.png
deleted file mode 100644
index 5e9fd837e..000000000
Binary files a/src/assets/img/files/database.png and /dev/null differ
diff --git a/src/assets/img/files/document-64.png b/src/assets/img/files/document-64.png
new file mode 100644
index 000000000..0888ebbbd
Binary files /dev/null and b/src/assets/img/files/document-64.png differ
diff --git a/src/assets/img/files/document.png b/src/assets/img/files/document.png
deleted file mode 100644
index 6a4bb8ba5..000000000
Binary files a/src/assets/img/files/document.png and /dev/null differ
diff --git a/src/assets/img/files/draw-64.png b/src/assets/img/files/draw-64.png
new file mode 100644
index 000000000..1b827c7c6
Binary files /dev/null and b/src/assets/img/files/draw-64.png differ
diff --git a/src/assets/img/files/draw.png b/src/assets/img/files/draw.png
deleted file mode 100644
index f9f2da1ea..000000000
Binary files a/src/assets/img/files/draw.png and /dev/null differ
diff --git a/src/assets/img/files/eps-64.png b/src/assets/img/files/eps-64.png
new file mode 100644
index 000000000..c42492441
Binary files /dev/null and b/src/assets/img/files/eps-64.png differ
diff --git a/src/assets/img/files/eps.png b/src/assets/img/files/eps.png
deleted file mode 100644
index 99b23525c..000000000
Binary files a/src/assets/img/files/eps.png and /dev/null differ
diff --git a/src/assets/img/files/epub-64.png b/src/assets/img/files/epub-64.png
new file mode 100644
index 000000000..298d5dcd9
Binary files /dev/null and b/src/assets/img/files/epub-64.png differ
diff --git a/src/assets/img/files/epub.png b/src/assets/img/files/epub.png
deleted file mode 100644
index 9a59fdc02..000000000
Binary files a/src/assets/img/files/epub.png and /dev/null differ
diff --git a/src/assets/img/files/flash-64.png b/src/assets/img/files/flash-64.png
new file mode 100644
index 000000000..01d28e03e
Binary files /dev/null and b/src/assets/img/files/flash-64.png differ
diff --git a/src/assets/img/files/flash.png b/src/assets/img/files/flash.png
deleted file mode 100644
index 11c557051..000000000
Binary files a/src/assets/img/files/flash.png and /dev/null differ
diff --git a/src/assets/img/files/folder-64.png b/src/assets/img/files/folder-64.png
new file mode 100644
index 000000000..2508ab252
Binary files /dev/null and b/src/assets/img/files/folder-64.png differ
diff --git a/src/assets/img/files/folder-open-64.png b/src/assets/img/files/folder-open-64.png
new file mode 100644
index 000000000..27f7271bd
Binary files /dev/null and b/src/assets/img/files/folder-open-64.png differ
diff --git a/src/assets/img/files/folder-open.png b/src/assets/img/files/folder-open.png
deleted file mode 100644
index bcca6f434..000000000
Binary files a/src/assets/img/files/folder-open.png and /dev/null differ
diff --git a/src/assets/img/files/folder.png b/src/assets/img/files/folder.png
deleted file mode 100644
index 8479747ef..000000000
Binary files a/src/assets/img/files/folder.png and /dev/null differ
diff --git a/src/assets/img/files/gif-64.png b/src/assets/img/files/gif-64.png
new file mode 100644
index 000000000..2373292b7
Binary files /dev/null and b/src/assets/img/files/gif-64.png differ
diff --git a/src/assets/img/files/gif.png b/src/assets/img/files/gif.png
deleted file mode 100644
index 303cfd9ef..000000000
Binary files a/src/assets/img/files/gif.png and /dev/null differ
diff --git a/src/assets/img/files/h5p-64.png b/src/assets/img/files/h5p-64.png
new file mode 100644
index 000000000..cdd1c9b1b
Binary files /dev/null and b/src/assets/img/files/h5p-64.png differ
diff --git a/src/assets/img/files/h5p.png b/src/assets/img/files/h5p.png
deleted file mode 100644
index b3554abbf..000000000
Binary files a/src/assets/img/files/h5p.png and /dev/null differ
diff --git a/src/assets/img/files/html-64.png b/src/assets/img/files/html-64.png
new file mode 100644
index 000000000..7f703bb83
Binary files /dev/null and b/src/assets/img/files/html-64.png differ
diff --git a/src/assets/img/files/html.png b/src/assets/img/files/html.png
deleted file mode 100644
index 5d36c2227..000000000
Binary files a/src/assets/img/files/html.png and /dev/null differ
diff --git a/src/assets/img/files/image-64.png b/src/assets/img/files/image-64.png
new file mode 100644
index 000000000..2d8f9e4fa
Binary files /dev/null and b/src/assets/img/files/image-64.png differ
diff --git a/src/assets/img/files/image.png b/src/assets/img/files/image.png
deleted file mode 100644
index 52d7060dc..000000000
Binary files a/src/assets/img/files/image.png and /dev/null differ
diff --git a/src/assets/img/files/impress-64.png b/src/assets/img/files/impress-64.png
new file mode 100644
index 000000000..c279c62ef
Binary files /dev/null and b/src/assets/img/files/impress-64.png differ
diff --git a/src/assets/img/files/impress.png b/src/assets/img/files/impress.png
deleted file mode 100644
index 8b9723919..000000000
Binary files a/src/assets/img/files/impress.png and /dev/null differ
diff --git a/src/assets/img/files/isf-64.png b/src/assets/img/files/isf-64.png
new file mode 100644
index 000000000..ad5a18867
Binary files /dev/null and b/src/assets/img/files/isf-64.png differ
diff --git a/src/assets/img/files/isf.png b/src/assets/img/files/isf.png
deleted file mode 100644
index 30466983f..000000000
Binary files a/src/assets/img/files/isf.png and /dev/null differ
diff --git a/src/assets/img/files/jpeg-64.png b/src/assets/img/files/jpeg-64.png
new file mode 100644
index 000000000..b4fc0c998
Binary files /dev/null and b/src/assets/img/files/jpeg-64.png differ
diff --git a/src/assets/img/files/jpeg.png b/src/assets/img/files/jpeg.png
deleted file mode 100644
index 03e2302aa..000000000
Binary files a/src/assets/img/files/jpeg.png and /dev/null differ
diff --git a/src/assets/img/files/markup-64.png b/src/assets/img/files/markup-64.png
new file mode 100644
index 000000000..b89072713
Binary files /dev/null and b/src/assets/img/files/markup-64.png differ
diff --git a/src/assets/img/files/markup.png b/src/assets/img/files/markup.png
deleted file mode 100644
index 350b1d5ef..000000000
Binary files a/src/assets/img/files/markup.png and /dev/null differ
diff --git a/src/assets/img/files/math-64.png b/src/assets/img/files/math-64.png
new file mode 100644
index 000000000..d98beea61
Binary files /dev/null and b/src/assets/img/files/math-64.png differ
diff --git a/src/assets/img/files/math.png b/src/assets/img/files/math.png
deleted file mode 100644
index 70509ac82..000000000
Binary files a/src/assets/img/files/math.png and /dev/null differ
diff --git a/src/assets/img/files/moodle-64.png b/src/assets/img/files/moodle-64.png
new file mode 100644
index 000000000..44ad3a37d
Binary files /dev/null and b/src/assets/img/files/moodle-64.png differ
diff --git a/src/assets/img/files/moodle.png b/src/assets/img/files/moodle.png
deleted file mode 100644
index e98223567..000000000
Binary files a/src/assets/img/files/moodle.png and /dev/null differ
diff --git a/src/assets/img/files/mp3-64.png b/src/assets/img/files/mp3-64.png
new file mode 100644
index 000000000..13b8da0b8
Binary files /dev/null and b/src/assets/img/files/mp3-64.png differ
diff --git a/src/assets/img/files/mp3.png b/src/assets/img/files/mp3.png
deleted file mode 100644
index 83ce89b9c..000000000
Binary files a/src/assets/img/files/mp3.png and /dev/null differ
diff --git a/src/assets/img/files/mpeg-64.png b/src/assets/img/files/mpeg-64.png
new file mode 100644
index 000000000..05d77fa7b
Binary files /dev/null and b/src/assets/img/files/mpeg-64.png differ
diff --git a/src/assets/img/files/mpeg.png b/src/assets/img/files/mpeg.png
deleted file mode 100644
index 6047ef219..000000000
Binary files a/src/assets/img/files/mpeg.png and /dev/null differ
diff --git a/src/assets/img/files/oth-64.png b/src/assets/img/files/oth-64.png
new file mode 100644
index 000000000..8ffa8b466
Binary files /dev/null and b/src/assets/img/files/oth-64.png differ
diff --git a/src/assets/img/files/oth.png b/src/assets/img/files/oth.png
deleted file mode 100644
index 97fa3eeeb..000000000
Binary files a/src/assets/img/files/oth.png and /dev/null differ
diff --git a/src/assets/img/files/pdf-64.png b/src/assets/img/files/pdf-64.png
new file mode 100644
index 000000000..b7cdae7e9
Binary files /dev/null and b/src/assets/img/files/pdf-64.png differ
diff --git a/src/assets/img/files/pdf.png b/src/assets/img/files/pdf.png
deleted file mode 100644
index cb98c99a8..000000000
Binary files a/src/assets/img/files/pdf.png and /dev/null differ
diff --git a/src/assets/img/files/png-64.png b/src/assets/img/files/png-64.png
new file mode 100644
index 000000000..3ecf3e5df
Binary files /dev/null and b/src/assets/img/files/png-64.png differ
diff --git a/src/assets/img/files/png.png b/src/assets/img/files/png.png
deleted file mode 100644
index 33b4acac4..000000000
Binary files a/src/assets/img/files/png.png and /dev/null differ
diff --git a/src/assets/img/files/powerpoint-64.png b/src/assets/img/files/powerpoint-64.png
new file mode 100644
index 000000000..4d44c7d2b
Binary files /dev/null and b/src/assets/img/files/powerpoint-64.png differ
diff --git a/src/assets/img/files/powerpoint.png b/src/assets/img/files/powerpoint.png
deleted file mode 100644
index d8a830780..000000000
Binary files a/src/assets/img/files/powerpoint.png and /dev/null differ
diff --git a/src/assets/img/files/psd-64.png b/src/assets/img/files/psd-64.png
new file mode 100644
index 000000000..0b800dffa
Binary files /dev/null and b/src/assets/img/files/psd-64.png differ
diff --git a/src/assets/img/files/psd.png b/src/assets/img/files/psd.png
deleted file mode 100644
index 3433fbc84..000000000
Binary files a/src/assets/img/files/psd.png and /dev/null differ
diff --git a/src/assets/img/files/publisher-64.png b/src/assets/img/files/publisher-64.png
new file mode 100644
index 000000000..9633ef3dd
Binary files /dev/null and b/src/assets/img/files/publisher-64.png differ
diff --git a/src/assets/img/files/publisher.png b/src/assets/img/files/publisher.png
deleted file mode 100644
index 8a51d4701..000000000
Binary files a/src/assets/img/files/publisher.png and /dev/null differ
diff --git a/src/assets/img/files/quicktime-64.png b/src/assets/img/files/quicktime-64.png
new file mode 100644
index 000000000..90f2fbc0d
Binary files /dev/null and b/src/assets/img/files/quicktime-64.png differ
diff --git a/src/assets/img/files/quicktime.png b/src/assets/img/files/quicktime.png
deleted file mode 100644
index 4a56a9676..000000000
Binary files a/src/assets/img/files/quicktime.png and /dev/null differ
diff --git a/src/assets/img/files/sourcecode-64.png b/src/assets/img/files/sourcecode-64.png
new file mode 100644
index 000000000..ad25537e4
Binary files /dev/null and b/src/assets/img/files/sourcecode-64.png differ
diff --git a/src/assets/img/files/sourcecode.png b/src/assets/img/files/sourcecode.png
deleted file mode 100644
index 5c8863480..000000000
Binary files a/src/assets/img/files/sourcecode.png and /dev/null differ
diff --git a/src/assets/img/files/spreadsheet-64.png b/src/assets/img/files/spreadsheet-64.png
new file mode 100644
index 000000000..00427c0e7
Binary files /dev/null and b/src/assets/img/files/spreadsheet-64.png differ
diff --git a/src/assets/img/files/spreadsheet.png b/src/assets/img/files/spreadsheet.png
deleted file mode 100644
index 23d94f272..000000000
Binary files a/src/assets/img/files/spreadsheet.png and /dev/null differ
diff --git a/src/assets/img/files/text-64.png b/src/assets/img/files/text-64.png
new file mode 100644
index 000000000..7b397cea5
Binary files /dev/null and b/src/assets/img/files/text-64.png differ
diff --git a/src/assets/img/files/text.png b/src/assets/img/files/text.png
deleted file mode 100644
index 9eb4b197e..000000000
Binary files a/src/assets/img/files/text.png and /dev/null differ
diff --git a/src/assets/img/files/tiff-64.png b/src/assets/img/files/tiff-64.png
new file mode 100644
index 000000000..c11a85e28
Binary files /dev/null and b/src/assets/img/files/tiff-64.png differ
diff --git a/src/assets/img/files/tiff.png b/src/assets/img/files/tiff.png
deleted file mode 100644
index dd17d28dd..000000000
Binary files a/src/assets/img/files/tiff.png and /dev/null differ
diff --git a/src/assets/img/files/unknown-64.png b/src/assets/img/files/unknown-64.png
new file mode 100644
index 000000000..7f703bb83
Binary files /dev/null and b/src/assets/img/files/unknown-64.png differ
diff --git a/src/assets/img/files/unknown.png b/src/assets/img/files/unknown.png
deleted file mode 100644
index 5d36c2227..000000000
Binary files a/src/assets/img/files/unknown.png and /dev/null differ
diff --git a/src/assets/img/files/video-64.png b/src/assets/img/files/video-64.png
new file mode 100644
index 000000000..570c4b2b3
Binary files /dev/null and b/src/assets/img/files/video-64.png differ
diff --git a/src/assets/img/files/video.png b/src/assets/img/files/video.png
deleted file mode 100644
index 8ac140c8b..000000000
Binary files a/src/assets/img/files/video.png and /dev/null differ
diff --git a/src/assets/img/files/wav-64.png b/src/assets/img/files/wav-64.png
new file mode 100644
index 000000000..819781a9b
Binary files /dev/null and b/src/assets/img/files/wav-64.png differ
diff --git a/src/assets/img/files/wav.png b/src/assets/img/files/wav.png
deleted file mode 100644
index b12df5d4c..000000000
Binary files a/src/assets/img/files/wav.png and /dev/null differ
diff --git a/src/assets/img/files/wmv-64.png b/src/assets/img/files/wmv-64.png
new file mode 100644
index 000000000..570c4b2b3
Binary files /dev/null and b/src/assets/img/files/wmv-64.png differ
diff --git a/src/assets/img/files/wmv.png b/src/assets/img/files/wmv.png
deleted file mode 100644
index 8ac140c8b..000000000
Binary files a/src/assets/img/files/wmv.png and /dev/null differ
diff --git a/src/assets/img/files/writer-64.png b/src/assets/img/files/writer-64.png
new file mode 100644
index 000000000..6285b6ffa
Binary files /dev/null and b/src/assets/img/files/writer-64.png differ
diff --git a/src/assets/img/files/writer.png b/src/assets/img/files/writer.png
deleted file mode 100644
index eb8e7cf1a..000000000
Binary files a/src/assets/img/files/writer.png and /dev/null differ
diff --git a/src/core/features/course/services/module-delegate.ts b/src/core/features/course/services/module-delegate.ts
index ba49c4c72..f2faeac31 100644
--- a/src/core/features/course/services/module-delegate.ts
+++ b/src/core/features/course/services/module-delegate.ts
@@ -299,11 +299,17 @@ export class CoreCourseModuleDelegateService extends CoreDelegate {
- return await this.executeFunctionOnEnabled(
+ const data = await this.executeFunctionOnEnabled(
modname,
'getData',
[module, courseId, sectionId, forCoursePage],
);
+
+ if (data) {
+ data.showDownloadButton = data.showDownloadButton ?? true;
+ }
+
+ return data;
}
/**
diff --git a/src/core/features/h5p/components/h5p-player/h5p-player.scss b/src/core/features/h5p/components/h5p-player/h5p-player.scss
index 1761f096a..4644e74b4 100644
--- a/src/core/features/h5p/components/h5p-player/h5p-player.scss
+++ b/src/core/features/h5p/components/h5p-player/h5p-player.scss
@@ -6,7 +6,7 @@
position: relative;
width: 100%;
height: 230px;
- background: url('../../../../../assets/img/icons/h5p.svg') center top 25px / 100px auto no-repeat var(--core-h5p-placeholder-bg-color);
+ background: url('/assets/img/icons/h5p.svg') center top 25px / 100px auto no-repeat var(--core-h5p-placeholder-bg-color);
color: var(--core-h5p-placeholder-text-color);
.icon:not([color="success"]) {
diff --git a/src/core/features/settings/pages/dev/dev.html b/src/core/features/settings/pages/dev/dev.html
index d7dd7f061..bf055c1ca 100644
--- a/src/core/features/settings/pages/dev/dev.html
+++ b/src/core/features/settings/pages/dev/dev.html
@@ -45,6 +45,14 @@
+
+
+ Reset user tours
+
+
+
+
+
diff --git a/src/core/features/settings/pages/dev/dev.ts b/src/core/features/settings/pages/dev/dev.ts
index 9b14f3e42..913708872 100644
--- a/src/core/features/settings/pages/dev/dev.ts
+++ b/src/core/features/settings/pages/dev/dev.ts
@@ -14,7 +14,9 @@
import { Component, OnInit } from '@angular/core';
import { CoreSitePlugins } from '@features/siteplugins/services/siteplugins';
+import { CoreUserTours } from '@features/usertours/services/user-tours';
import { CoreSites } from '@services/sites';
+import { CoreDomUtils } from '@services/utils/dom';
import { CoreUtils } from '@services/utils/utils';
import { Platform } from '@singletons';
@@ -36,6 +38,7 @@ export class CoreSettingsDevPage implements OnInit {
pluginStyles = true;
pluginStylesCount = 0;
sitePlugins: CoreSitePluginsBasicInfo[] = [];
+ userToursEnabled = true;
disabledFeatures: string[] = [];
@@ -60,6 +63,8 @@ export class CoreSettingsDevPage implements OnInit {
this.pluginStyles = false;
this.pluginStylesCount = 0;
+ this.userToursEnabled = !CoreUserTours.isDisabled();
+
document.head.querySelectorAll('style').forEach((style) => {
if (this.siteId && style.id.endsWith(this.siteId)) {
if (style.innerHTML.length > 0) {
@@ -139,6 +144,14 @@ export class CoreSettingsDevPage implements OnInit {
CoreUtils.copyToClipboard(JSON.stringify({ disabledFeatures: this.disabledFeatures, sitePlugins: this.sitePlugins }));
}
+ /**
+ * Reset all user tours.
+ */
+ async resetUserTours(): Promise {
+ await CoreUserTours.resetTours();
+ CoreDomUtils.showToast('User tours have been reseted');
+ }
+
}
// Basic site plugin info.
diff --git a/src/core/features/usertours/services/user-tours.ts b/src/core/features/usertours/services/user-tours.ts
index fac59c705..d73c52071 100644
--- a/src/core/features/usertours/services/user-tours.ts
+++ b/src/core/features/usertours/services/user-tours.ts
@@ -63,7 +63,7 @@ export class CoreUserToursService {
* @returns Whether the User Tour is pending or not.
*/
async isPending(id: string): Promise {
- if (CoreConstants.CONFIG.disableUserTours || CoreConstants.CONFIG.disabledUserTours?.includes(id)) {
+ if (this.isDisabled(id)) {
return false;
}
@@ -252,6 +252,31 @@ export class CoreUserToursService {
}
}
+ /**
+ * Is user Tour disabled?
+ *
+ * @param tourId Tour Id or undefined to check all user tours.
+ * @return Wether a particular or all user tours are disabled.
+ */
+ isDisabled(tourId?: string): boolean {
+ if (CoreConstants.CONFIG.disableUserTours) {
+ return true;
+ }
+
+ return !!tourId && !!CoreConstants.CONFIG.disabledUserTours?.includes(tourId);
+ }
+
+ /**
+ * It will reset all user tours.
+ */
+ async resetTours(): Promise {
+ if (this.isDisabled()) {
+ return;
+ }
+
+ await this.table.delete();
+ }
+
}
export const CoreUserTours = makeSingleton(CoreUserToursService);
diff --git a/src/core/services/utils/mimetype.ts b/src/core/services/utils/mimetype.ts
index 386a6f267..d8e4610ed 100644
--- a/src/core/services/utils/mimetype.ts
+++ b/src/core/services/utils/mimetype.ts
@@ -280,7 +280,7 @@ export class CoreMimetypeUtilsProvider {
* @return The path to a folder icon.
*/
getFolderIcon(): string {
- return 'assets/img/files/folder.png';
+ return 'assets/img/files/folder-64.png';
}
/**
@@ -290,7 +290,7 @@ export class CoreMimetypeUtilsProvider {
* @return The icon path.
*/
getFileIconForType(type: string): string {
- return `assets/img/files/${type}.png`;
+ return 'assets/img/files/' + type + '-64.png';
}
/**