diff --git a/package-lock.json b/package-lock.json index e781ced49..1310a5e2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -77,7 +77,6 @@ "cordova-plugin-media-capture": "^3.0.3", "cordova-plugin-network-information": "^2.0.2", "cordova-plugin-prevent-override": "^1.0.0", - "cordova-plugin-screen-orientation": "^3.0.2", "cordova-plugin-splashscreen": "^6.0.0", "cordova-plugin-statusbar": "^2.4.3", "cordova-plugin-whitelist": "^1.3.4", @@ -11201,18 +11200,6 @@ } } }, - "node_modules/cordova-plugin-screen-orientation": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/cordova-plugin-screen-orientation/-/cordova-plugin-screen-orientation-3.0.2.tgz", - "integrity": "sha512-2w6CMC+HGvbhogJetalwGurL2Fx8DQCCPy3wlSZHN1/W7WoQ5n9ujVozcoKrY4VaagK6bxrPFih+ElkO8Uqfzg==", - "engines": { - "cordovaDependencies": { - "4.0.0": { - "cordova": ">100" - } - } - } - }, "node_modules/cordova-plugin-splashscreen": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cordova-plugin-splashscreen/-/cordova-plugin-splashscreen-6.0.0.tgz", @@ -12799,6 +12786,7 @@ "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "devOptional": true, "dependencies": { "iconv-lite": "^0.6.2" } @@ -12807,6 +12795,7 @@ "version": "0.6.2", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz", "integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==", + "devOptional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -39888,11 +39877,6 @@ "resolved": "https://registry.npmjs.org/cordova-plugin-prevent-override/-/cordova-plugin-prevent-override-1.0.0.tgz", "integrity": "sha512-/+3q5r4K5RahCpiYVmZQBjq10x4jj+6CMjYtZyx9jdMWeV+yFE+ItFcO1NeUAEWd2iHC5YPD0P2tHiHx5kscsw==" }, - "cordova-plugin-screen-orientation": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/cordova-plugin-screen-orientation/-/cordova-plugin-screen-orientation-3.0.2.tgz", - "integrity": "sha512-2w6CMC+HGvbhogJetalwGurL2Fx8DQCCPy3wlSZHN1/W7WoQ5n9ujVozcoKrY4VaagK6bxrPFih+ElkO8Uqfzg==" - }, "cordova-plugin-splashscreen": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cordova-plugin-splashscreen/-/cordova-plugin-splashscreen-6.0.0.tgz", @@ -41147,6 +41131,7 @@ "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "devOptional": true, "requires": { "iconv-lite": "^0.6.2" }, @@ -41155,6 +41140,7 @@ "version": "0.6.2", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz", "integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==", + "devOptional": true, "requires": { "safer-buffer": ">= 2.1.2 < 3.0.0" } diff --git a/package.json b/package.json index cc8e30643..bff141856 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,6 @@ "cordova-plugin-media-capture": "^3.0.3", "cordova-plugin-network-information": "^2.0.2", "cordova-plugin-prevent-override": "^1.0.0", - "cordova-plugin-screen-orientation": "^3.0.2", "cordova-plugin-splashscreen": "^6.0.0", "cordova-plugin-statusbar": "^2.4.3", "cordova-plugin-whitelist": "^1.3.4", @@ -217,7 +216,6 @@ }, "cordova-plugin-network-information": {}, "@moodlehq/cordova-plugin-qrscanner": {}, - "cordova-plugin-screen-orientation": {}, "cordova-plugin-splashscreen": {}, "cordova-plugin-statusbar": {}, "cordova-plugin-whitelist": {}, @@ -247,4 +245,4 @@ "optionalDependencies": { "keytar": "^7.2.0" } -} +} \ No newline at end of file diff --git a/scripts/langindex.json b/scripts/langindex.json index 174a16271..18166ff20 100644 --- a/scripts/langindex.json +++ b/scripts/langindex.json @@ -1574,6 +1574,7 @@ "core.dftimedate": "local_moodlemobileapp", "core.digitalminor": "moodle", "core.digitalminor_desc": "moodle", + "core.disablefullscreen": "h5p", "core.discard": "local_moodlemobileapp", "core.dismiss": "local_moodlemobileapp", "core.displayoptions": "atto_media", @@ -1658,6 +1659,7 @@ "core.forcepasswordchangenotice": "moodle", "core.fulllistofcourses": "moodle", "core.fullnameandsitename": "local_moodlemobileapp", + "core.fullscreen": "h5p", "core.grades.aggregatemean": "grades", "core.grades.aggregatesum": "grades", "core.grades.average": "grades", diff --git a/src/addons/block/activitymodules/components/activitymodules/addon-block-activitymodules.html b/src/addons/block/activitymodules/components/activitymodules/addon-block-activitymodules.html index 2306e3b4b..27d105e90 100644 --- a/src/addons/block/activitymodules/components/activitymodules/addon-block-activitymodules.html +++ b/src/addons/block/activitymodules/components/activitymodules/addon-block-activitymodules.html @@ -3,7 +3,7 @@

{{ 'addon.block_activitymodules.pluginname' | translate }}

- + diff --git a/src/addons/block/myoverview/components/myoverview/addon-block-myoverview.html b/src/addons/block/myoverview/components/myoverview/addon-block-myoverview.html index b6e750c9f..2394d5a8b 100644 --- a/src/addons/block/myoverview/components/myoverview/addon-block-myoverview.html +++ b/src/addons/block/myoverview/components/myoverview/addon-block-myoverview.html @@ -39,8 +39,8 @@ - -
+ +
@@ -87,7 +87,7 @@ -
+
- + @@ -31,10 +31,12 @@ (scroll)="scrollControls.updateScrollPosition()" >
+
+
diff --git a/src/addons/block/recentlyaccesseditems/components/recentlyaccesseditems/addon-block-recentlyaccesseditems.html b/src/addons/block/recentlyaccesseditems/components/recentlyaccesseditems/addon-block-recentlyaccesseditems.html index 73e52969f..cf85821ef 100644 --- a/src/addons/block/recentlyaccesseditems/components/recentlyaccesseditems/addon-block-recentlyaccesseditems.html +++ b/src/addons/block/recentlyaccesseditems/components/recentlyaccesseditems/addon-block-recentlyaccesseditems.html @@ -5,7 +5,7 @@
- +
-
+
+
@@ -35,6 +36,7 @@
+
diff --git a/src/addons/block/recentlyaccesseditems/components/recentlyaccesseditems/recentlyaccesseditems.scss b/src/addons/block/recentlyaccesseditems/components/recentlyaccesseditems/recentlyaccesseditems.scss index 06802f880..62c797d58 100644 --- a/src/addons/block/recentlyaccesseditems/components/recentlyaccesseditems/recentlyaccesseditems.scss +++ b/src/addons/block/recentlyaccesseditems/components/recentlyaccesseditems/recentlyaccesseditems.scss @@ -1,12 +1,12 @@ @import "~theme/globals"; :host { - .core-horizontal-scroll > div > div { + .core-horizontal-scroll div.core-horizontal-scroll-item { @include horizontal_scroll_item(80%, 250px, 300px); } .core-course-module-handler { - --inner-border-width: 0; + --inner-border-width: 0px; } core-loading { --loading-inline-min-height: 102px; diff --git a/src/addons/block/sitemainmenu/components/sitemainmenu/addon-block-sitemainmenu.html b/src/addons/block/sitemainmenu/components/sitemainmenu/addon-block-sitemainmenu.html index f5e50c8f7..e18016290 100644 --- a/src/addons/block/sitemainmenu/components/sitemainmenu/addon-block-sitemainmenu.html +++ b/src/addons/block/sitemainmenu/components/sitemainmenu/addon-block-sitemainmenu.html @@ -3,7 +3,7 @@

{{ 'addon.block_sitemainmenu.pluginname' | translate }}

- + diff --git a/src/addons/block/starredcourses/components/starredcourses/addon-block-starredcourses.html b/src/addons/block/starredcourses/components/starredcourses/addon-block-starredcourses.html index 703863301..32fbdc9fb 100644 --- a/src/addons/block/starredcourses/components/starredcourses/addon-block-starredcourses.html +++ b/src/addons/block/starredcourses/components/starredcourses/addon-block-starredcourses.html @@ -21,7 +21,7 @@
- + @@ -32,10 +32,12 @@ (scroll)="scrollControls.updateScrollPosition()" >
+
+
diff --git a/src/addons/block/timeline/components/timeline/addon-block-timeline.html b/src/addons/block/timeline/components/timeline/addon-block-timeline.html index f8d82393d..62105627c 100644 --- a/src/addons/block/timeline/components/timeline/addon-block-timeline.html +++ b/src/addons/block/timeline/components/timeline/addon-block-timeline.html @@ -9,8 +9,8 @@ - -
+ +
{{ 'core.all' | translate }} @@ -35,12 +35,12 @@
- + + [fullscreen]="false" class="safe-area-padding"> diff --git a/src/addons/calendar/components/calendar/addon-calendar-calendar.html b/src/addons/calendar/components/calendar/addon-calendar-calendar.html index 570926c23..fe3cf2895 100644 --- a/src/addons/calendar/components/calendar/addon-calendar-calendar.html +++ b/src/addons/calendar/components/calendar/addon-calendar-calendar.html @@ -8,7 +8,7 @@ - + diff --git a/src/addons/calendar/pages/day/day.html b/src/addons/calendar/pages/day/day.html index c0e8bb1d7..7580d07b1 100644 --- a/src/addons/calendar/pages/day/day.html +++ b/src/addons/calendar/pages/day/day.html @@ -26,7 +26,7 @@ - + @@ -44,7 +44,7 @@ - + diff --git a/src/addons/messages/pages/discussion/discussion.html b/src/addons/messages/pages/discussion/discussion.html index 346fe8573..0ac439fa6 100644 --- a/src/addons/messages/pages/discussion/discussion.html +++ b/src/addons/messages/pages/discussion/discussion.html @@ -60,7 +60,7 @@ - + @@ -138,8 +138,8 @@ - - + +

{{ 'addon.messages.unabletomessage' | translate }}

diff --git a/src/addons/mod/assign/components/submission/addon-mod-assign-submission.html b/src/addons/mod/assign/components/submission/addon-mod-assign-submission.html index 89d14abeb..7858fdad1 100644 --- a/src/addons/mod/assign/components/submission/addon-mod-assign-submission.html +++ b/src/addons/mod/assign/components/submission/addon-mod-assign-submission.html @@ -1,4 +1,4 @@ - +
-
+
diff --git a/src/addons/mod/chat/components/index/addon-mod-chat-index.html b/src/addons/mod/chat/components/index/addon-mod-chat-index.html index 9d58151d0..8f1069746 100644 --- a/src/addons/mod/chat/components/index/addon-mod-chat-index.html +++ b/src/addons/mod/chat/components/index/addon-mod-chat-index.html @@ -24,7 +24,7 @@ - + - + @@ -109,8 +109,8 @@ - - + +

{{ 'addon.mod_chat.mustbeonlinetosendmessages' | translate }}

diff --git a/src/addons/mod/chat/pages/session-messages/session-messages.html b/src/addons/mod/chat/pages/session-messages/session-messages.html index f9706469e..275819ac5 100644 --- a/src/addons/mod/chat/pages/session-messages/session-messages.html +++ b/src/addons/mod/chat/pages/session-messages/session-messages.html @@ -10,7 +10,7 @@ - + diff --git a/src/addons/mod/data/data-forms.scss b/src/addons/mod/data/data-forms.scss index 2834bfc25..17b000650 100644 --- a/src/addons/mod/data/data-forms.scss +++ b/src/addons/mod/data/data-forms.scss @@ -4,7 +4,7 @@ :host { --input-border-color: var(--gray); --input-border-width: 1px; - --select-border-width: 0; + --select-border-width: 0px; ::ng-deep { table { diff --git a/src/addons/mod/forum/components/post-options-menu/post-options-menu.html b/src/addons/mod/forum/components/post-options-menu/post-options-menu.html index e1fe50448..eed4aa8ac 100644 --- a/src/addons/mod/forum/components/post-options-menu/post-options-menu.html +++ b/src/addons/mod/forum/components/post-options-menu/post-options-menu.html @@ -1,4 +1,4 @@ - + diff --git a/src/addons/mod/h5pactivity/components/index/addon-mod-h5pactivity-index.html b/src/addons/mod/h5pactivity/components/index/addon-mod-h5pactivity-index.html index 90158fa9a..ca3d3524f 100644 --- a/src/addons/mod/h5pactivity/components/index/addon-mod-h5pactivity-index.html +++ b/src/addons/mod/h5pactivity/components/index/addon-mod-h5pactivity-index.html @@ -34,7 +34,7 @@ - + - + - + - + - + - + - + +

{{ errorMessage | translate }}

diff --git a/src/addons/mod/scorm/pages/player/player.ts b/src/addons/mod/scorm/pages/player/player.ts index 74bf853c9..ad6555c82 100644 --- a/src/addons/mod/scorm/pages/player/player.ts +++ b/src/addons/mod/scorm/pages/player/player.ts @@ -66,7 +66,7 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy { protected moduleUrl!: string; // Module URL. protected newAttempt = false; // Whether to start a new attempt. protected organizationId?: string; // Organization ID to load. - protected attempt?: number; // The attempt number. + protected attempt = 0; // The attempt number. protected offline = false; // Whether it's offline mode. protected userData?: AddonModScormUserDataMap; // User data. protected initialScoId?: number; // Initial SCO ID to load. @@ -96,7 +96,7 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy { this.newAttempt = !!CoreNavigator.getRouteBooleanParam('newAttempt'); this.organizationId = CoreNavigator.getRouteParam('organizationId'); this.initialScoId = CoreNavigator.getRouteNumberParam('scoId'); - this.siteId = CoreSites.getCurrentSiteId(); + this.siteId = CoreSites.getRequiredCurrentSite().getId(); } catch (error) { CoreDomUtils.showErrorModal(error); @@ -150,14 +150,12 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy { this.showToc = AddonModScorm.displayTocInPlayer(this.scorm); if (this.scorm.popup) { - this.mainMenuPage.changeVisibility(false); - // If we receive a value > 100 we assume it's a fixed pixel size. - if (this.scorm.width! > 100) { + if (this.scorm.width && this.scorm.width > 100) { this.scormWidth = this.scorm.width; // Only get fixed size on height if width is also fixed. - if (this.scorm.height! > 100) { + if (this.scorm.height && this.scorm.height > 100) { this.scormHeight = this.scorm.height; } } @@ -198,7 +196,7 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy { // Wait a bit to prevent collisions between this store and SCORM API's store. setTimeout(async () => { try { - AddonModScormHelper.convertAttemptToOffline(this.scorm, this.attempt!); + AddonModScormHelper.convertAttemptToOffline(this.scorm, this.attempt); } catch (error) { CoreDomUtils.instance.showErrorModalDefault(error, 'core.error', true); } @@ -292,7 +290,7 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy { await this.determineAttemptAndMode(attemptsData); const [data, accessInfo] = await Promise.all([ - AddonModScorm.getScormUserData(this.scorm.id, this.attempt!, { + AddonModScorm.getScormUserData(this.scorm.id, this.attempt, { cmId: this.cmId, offline: this.offline, }), @@ -319,13 +317,13 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy { try { // We need to check incomplete again: attempt number or status might have changed. - this.incomplete = await AddonModScorm.isAttemptIncomplete(this.scorm.id, this.attempt!, { + this.incomplete = await AddonModScorm.isAttemptIncomplete(this.scorm.id, this.attempt, { offline: this.offline, cmId: this.cmId, }); // Get TOC. - this.toc = await AddonModScormHelper.getToc(this.scorm.id, this.attempt!, this.incomplete, { + this.toc = await AddonModScormHelper.getToc(this.scorm.id, this.attempt, this.incomplete, { organization: this.organizationId, offline: this.offline, cmId: this.cmId, @@ -351,7 +349,7 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy { } // No SCO defined. Get the first valid one. - const sco = await AddonModScormHelper.getFirstSco(this.scorm.id, this.attempt!, { + const sco = await AddonModScormHelper.getFirstSco(this.scorm.id, this.attempt, { toc: this.toc, organization: this.organizationId, mode: this.mode, @@ -383,7 +381,7 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy { this.siteId, this.scorm, sco.id, - this.attempt!, + this.attempt, this.userData!, this.mode, this.offline, @@ -446,14 +444,14 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy { }]; try { - AddonModScorm.saveTracks(sco.id, this.attempt!, tracks, this.scorm, this.offline); + AddonModScorm.saveTracks(sco.id, this.attempt, tracks, this.scorm, this.offline); } catch { // Error saving data. Go offline if needed. if (this.offline) { return; } - const data = await AddonModScorm.getScormUserData(this.scorm.id, this.attempt!, { + const data = await AddonModScorm.getScormUserData(this.scorm.id, this.attempt, { cmId: this.cmId, }); @@ -464,12 +462,12 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy { try { // Go offline. - await AddonModScormHelper.convertAttemptToOffline(this.scorm, this.attempt!); + await AddonModScormHelper.convertAttemptToOffline(this.scorm, this.attempt); this.offline = true; this.dataModel?.setOffline(true); - await AddonModScorm.saveTracks(sco.id, this.attempt!, tracks, this.scorm, true); + await AddonModScorm.saveTracks(sco.id, this.attempt, tracks, this.scorm, true); } catch (error) { CoreDomUtils.instance.showErrorModalDefault(error, 'core.error', true); } @@ -528,7 +526,7 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy { value: String(CoreTimeUtils.timestamp()), }]; - await AddonModScorm.saveTracks(scoId, this.attempt!, tracks, this.scorm, this.offline); + await AddonModScorm.saveTracks(scoId, this.attempt, tracks, this.scorm, this.offline); if (this.offline) { return; @@ -541,22 +539,6 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy { })); } - /** - * @inheritdoc - */ - ionViewDidEnter(): void { - if (this.scorm && this.scorm.popup) { - this.mainMenuPage.changeVisibility(false); - } - } - - /** - * @inheritdoc - */ - ionViewWillLeave(): void { - this.mainMenuPage.changeVisibility(true); - } - /** * Component being destroyed. */ diff --git a/src/addons/mod/survey/components/index/addon-mod-survey-index.html b/src/addons/mod/survey/components/index/addon-mod-survey-index.html index 80b973f89..5bf012e3e 100644 --- a/src/addons/mod/survey/components/index/addon-mod-survey-index.html +++ b/src/addons/mod/survey/components/index/addon-mod-survey-index.html @@ -27,7 +27,7 @@ - + + + + + + + + +