Merge branch 'v4.4.x'

main
Pau Ferrer Ocaña 2024-07-10 09:39:16 +02:00
commit c27fb811c7
28 changed files with 4203 additions and 6814 deletions

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="44004" id="com.moodle.moodlemobile" ios-CFBundleVersion="4.4.0.4" version="4.4.0" versionCode="44004" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <widget android-versionCode="44100" id="com.moodle.moodlemobile" ios-CFBundleVersion="4.4.1.0" version="4.4.1" versionCode="44100" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Moodle</name> <name>Moodle</name>
<description>Moodle official app</description> <description>Moodle official app</description>
<author email="mobile@moodle.com" href="http://moodle.com">Moodle Mobile team</author> <author email="mobile@moodle.com" href="http://moodle.com">Moodle Mobile team</author>
@ -28,7 +28,7 @@
<preference name="UIWebViewBounce" value="false" /> <preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" /> <preference name="DisallowOverscroll" value="true" />
<preference name="prerendered-icon" value="true" /> <preference name="prerendered-icon" value="true" />
<preference name="AppendUserAgent" value="MoodleMobile 4.4.0 (44004)" /> <preference name="AppendUserAgent" value="MoodleMobile 4.4.1 (44100)" />
<preference name="BackupWebStorage" value="none" /> <preference name="BackupWebStorage" value="none" />
<preference name="ScrollEnabled" value="false" /> <preference name="ScrollEnabled" value="false" />
<preference name="KeyboardDisplayRequiresUserAction" value="false" /> <preference name="KeyboardDisplayRequiresUserAction" value="false" />
@ -38,7 +38,7 @@
<preference name="load-url-timeout" value="60000" /> <preference name="load-url-timeout" value="60000" />
<preference name="AutoHideSplashScreen" value="false" /> <preference name="AutoHideSplashScreen" value="false" />
<preference name="android-minSdkVersion" value="24" /> <preference name="android-minSdkVersion" value="24" />
<preference name="android-targetSdkVersion" value="33" /> <preference name="android-targetSdkVersion" value="34" />
<preference name="AndroidPersistentFileLocation" value="Compatibility" /> <preference name="AndroidPersistentFileLocation" value="Compatibility" />
<preference name="AndroidInsecureFileModeEnabled" value="true" /> <preference name="AndroidInsecureFileModeEnabled" value="true" />
<preference name="CustomURLSchemePluginClearsAndroidIntent" value="true" /> <preference name="CustomURLSchemePluginClearsAndroidIntent" value="true" />
@ -91,7 +91,7 @@
<true /> <true />
</edit-config> </edit-config>
<edit-config file="*-Info.plist" mode="merge" target="CFBundleShortVersionString"> <edit-config file="*-Info.plist" mode="merge" target="CFBundleShortVersionString">
<string>4.4.0</string> <string>4.4.1</string>
</edit-config> </edit-config>
<edit-config file="*-Info.plist" mode="overwrite" target="CFBundleLocalizations"> <edit-config file="*-Info.plist" mode="overwrite" target="CFBundleLocalizations">
<array> <array>

View File

@ -5634,7 +5634,7 @@
"url": "https://github.com/ichernev", "url": "https://github.com/ichernev",
"licenseFile": "LICENSE" "licenseFile": "LICENSE"
}, },
"moodlemobile@4.4.0": { "moodlemobile@4.4.1": {
"licenses": "Apache-2.0", "licenses": "Apache-2.0",
"repository": "https://github.com/moodlehq/moodleapp", "repository": "https://github.com/moodlehq/moodleapp",
"publisher": "Moodle Pty Ltd.", "publisher": "Moodle Pty Ltd.",

View File

@ -1,8 +1,8 @@
{ {
"app_id": "com.moodle.moodlemobile", "app_id": "com.moodle.moodlemobile",
"appname": "Moodle Mobile", "appname": "Moodle Mobile",
"versioncode": 44004, "versioncode": 44100,
"versionname": "4.4.0", "versionname": "4.4.1",
"cache_update_frequency_usually": 420000, "cache_update_frequency_usually": 420000,
"cache_update_frequency_often": 1200000, "cache_update_frequency_often": 1200000,
"cache_update_frequency_sometimes": 3600000, "cache_update_frequency_sometimes": 3600000,

10915
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "moodlemobile", "name": "moodlemobile",
"version": "4.4.0", "version": "4.4.1",
"description": "The official app for Moodle.", "description": "The official app for Moodle.",
"author": { "author": {
"name": "Moodle Pty Ltd.", "name": "Moodle Pty Ltd.",

View File

@ -15,7 +15,6 @@
import { CoreConstants, ModPurpose } from '@/core/constants'; import { CoreConstants, ModPurpose } from '@/core/constants';
import { Injectable, Type } from '@angular/core'; import { Injectable, Type } from '@angular/core';
import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate';
import { AddonModAssignIndexComponent } from '../../components/index';
import { makeSingleton } from '@singletons'; import { makeSingleton } from '@singletons';
import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler';
@ -51,6 +50,8 @@ export class AddonModAssignModuleHandlerService extends CoreModuleHandlerBase im
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown> | undefined> { async getMainComponent(): Promise<Type<unknown> | undefined> {
const { AddonModAssignIndexComponent } = await import('../../components/index');
return AddonModAssignIndexComponent; return AddonModAssignIndexComponent;
} }

View File

@ -13,7 +13,6 @@
// limitations under the License. // limitations under the License.
import { Injectable, Type } from '@angular/core'; import { Injectable, Type } from '@angular/core';
import { AddonModBookIndexComponent } from '../../components/index';
import { AddonModBook } from '../book'; import { AddonModBook } from '../book';
import { CoreConstants, ModPurpose } from '@/core/constants'; import { CoreConstants, ModPurpose } from '@/core/constants';
import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate';
@ -56,6 +55,8 @@ export class AddonModBookModuleHandlerService extends CoreModuleHandlerBase impl
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown> | undefined> { async getMainComponent(): Promise<Type<unknown> | undefined> {
const { AddonModBookIndexComponent } = await import('../../components/index');
return AddonModBookIndexComponent; return AddonModBookIndexComponent;
} }

View File

@ -45,7 +45,7 @@ export class AddonModChatModuleHandlerService extends CoreModuleHandlerBase impl
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown>> { async getMainComponent(): Promise<Type<unknown>> {
const { AddonModChatIndexComponent } = await import('@addons/mod/chat/components/index'); const { AddonModChatIndexComponent } = await import('../../components/index');
return AddonModChatIndexComponent; return AddonModChatIndexComponent;
} }

View File

@ -17,7 +17,6 @@ import { Injectable, Type } from '@angular/core';
import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler';
import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate';
import { makeSingleton } from '@singletons'; import { makeSingleton } from '@singletons';
import { AddonModChoiceIndexComponent } from '../../components/index';
/** /**
* Handler to support choice modules. * Handler to support choice modules.
@ -48,6 +47,8 @@ export class AddonModChoiceModuleHandlerService extends CoreModuleHandlerBase im
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown>> { async getMainComponent(): Promise<Type<unknown>> {
const { AddonModChoiceIndexComponent } = await import('../../components/index');
return AddonModChoiceIndexComponent; return AddonModChoiceIndexComponent;
} }

View File

@ -17,7 +17,6 @@ import { Injectable, Type } from '@angular/core';
import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler';
import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate';
import { makeSingleton } from '@singletons'; import { makeSingleton } from '@singletons';
import { AddonModDataIndexComponent } from '../../components/index';
/** /**
* Handler to support data modules. * Handler to support data modules.
@ -50,6 +49,8 @@ export class AddonModDataModuleHandlerService extends CoreModuleHandlerBase impl
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown>> { async getMainComponent(): Promise<Type<unknown>> {
const { AddonModDataIndexComponent } = await import('../../components/index');
return AddonModDataIndexComponent; return AddonModDataIndexComponent;
} }

View File

@ -16,7 +16,6 @@ import { CoreConstants, ModPurpose } from '@/core/constants';
import { Injectable, Type } from '@angular/core'; import { Injectable, Type } from '@angular/core';
import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate';
import { makeSingleton } from '@singletons'; import { makeSingleton } from '@singletons';
import { AddonModFeedbackIndexComponent } from '../../components/index';
import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler';
/** /**
@ -48,6 +47,8 @@ export class AddonModFeedbackModuleHandlerService extends CoreModuleHandlerBase
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown>> { async getMainComponent(): Promise<Type<unknown>> {
const { AddonModFeedbackIndexComponent } = await import('../../components/index');
return AddonModFeedbackIndexComponent; return AddonModFeedbackIndexComponent;
} }

View File

@ -20,7 +20,6 @@ import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@features/
import { CoreNavigator } from '@services/navigator'; import { CoreNavigator } from '@services/navigator';
import { CoreDomUtils } from '@services/utils/dom'; import { CoreDomUtils } from '@services/utils/dom';
import { makeSingleton } from '@singletons'; import { makeSingleton } from '@singletons';
import { AddonModFolderIndexComponent } from '../../components/index';
/** /**
* Handler to support folder modules. * Handler to support folder modules.
@ -86,6 +85,8 @@ export class AddonModFolderModuleHandlerService extends CoreModuleHandlerBase im
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown> | undefined> { async getMainComponent(): Promise<Type<unknown> | undefined> {
const { AddonModFolderIndexComponent } = await import('../../components/index');
return AddonModFolderIndexComponent; return AddonModFolderIndexComponent;
} }

View File

@ -17,7 +17,6 @@ import { Injectable, Type } from '@angular/core';
import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler';
import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate';
import { makeSingleton } from '@singletons'; import { makeSingleton } from '@singletons';
import { AddonModGlossaryIndexComponent } from '../../components/index/index';
/** /**
* Handler to support glossary modules. * Handler to support glossary modules.
@ -50,6 +49,8 @@ export class AddonModGlossaryModuleHandlerService extends CoreModuleHandlerBase
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown>> { async getMainComponent(): Promise<Type<unknown>> {
const { AddonModGlossaryIndexComponent } = await import('../../components/index');
return AddonModGlossaryIndexComponent; return AddonModGlossaryIndexComponent;
} }

View File

@ -17,7 +17,6 @@ import { Injectable, Type } from '@angular/core';
import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler';
import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate';
import { makeSingleton } from '@singletons'; import { makeSingleton } from '@singletons';
import { AddonModH5PActivityIndexComponent } from '../../components/index';
import { AddonModH5PActivity } from '../h5pactivity'; import { AddonModH5PActivity } from '../h5pactivity';
/** /**
@ -56,6 +55,8 @@ export class AddonModH5PActivityModuleHandlerService extends CoreModuleHandlerBa
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown>> { async getMainComponent(): Promise<Type<unknown>> {
const { AddonModH5PActivityIndexComponent } = await import('../../components/index');
return AddonModH5PActivityIndexComponent; return AddonModH5PActivityIndexComponent;
} }

View File

@ -17,7 +17,6 @@ import { Injectable, Type } from '@angular/core';
import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler';
import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate';
import { makeSingleton } from '@singletons'; import { makeSingleton } from '@singletons';
import { AddonModImscpIndexComponent } from '../../components/index';
import { AddonModImscp } from '../imscp'; import { AddonModImscp } from '../imscp';
/** /**
@ -56,6 +55,8 @@ export class AddonModImscpModuleHandlerService extends CoreModuleHandlerBase imp
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown>> { async getMainComponent(): Promise<Type<unknown>> {
const { AddonModImscpIndexComponent } = await import('../../components/index');
return AddonModImscpIndexComponent; return AddonModImscpIndexComponent;
} }

View File

@ -16,7 +16,6 @@ import { Injectable, Type } from '@angular/core';
import { CoreConstants, ModPurpose } from '@/core/constants'; import { CoreConstants, ModPurpose } from '@/core/constants';
import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate';
import { AddonModLessonIndexComponent } from '../../components/index';
import { makeSingleton } from '@singletons'; import { makeSingleton } from '@singletons';
import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler';
@ -49,6 +48,8 @@ export class AddonModLessonModuleHandlerService extends CoreModuleHandlerBase im
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown>> { async getMainComponent(): Promise<Type<unknown>> {
const { AddonModLessonIndexComponent } = await import('../../components/index');
return AddonModLessonIndexComponent; return AddonModLessonIndexComponent;
} }

View File

@ -19,7 +19,6 @@ import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@features/
import { CoreCourseModuleData } from '@features/course/services/course-helper'; import { CoreCourseModuleData } from '@features/course/services/course-helper';
import { makeSingleton } from '@singletons'; import { makeSingleton } from '@singletons';
import { AddonModLtiHelper } from '../lti-helper'; import { AddonModLtiHelper } from '../lti-helper';
import { AddonModLtiIndexComponent } from '../../components/index';
import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler';
import { CoreCourse } from '@features/course/services/course'; import { CoreCourse } from '@features/course/services/course';
@ -76,6 +75,8 @@ export class AddonModLtiModuleHandlerService extends CoreModuleHandlerBase imple
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown>> { async getMainComponent(): Promise<Type<unknown>> {
const { AddonModLtiIndexComponent } = await import('../../components/index');
return AddonModLtiIndexComponent; return AddonModLtiIndexComponent;
} }

View File

@ -16,7 +16,6 @@ import { Injectable, Type } from '@angular/core';
import { AddonModPage } from '../page'; import { AddonModPage } from '../page';
import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate';
import { CoreConstants, ModPurpose } from '@/core/constants'; import { CoreConstants, ModPurpose } from '@/core/constants';
import { AddonModPageIndexComponent } from '../../components/index';
import { makeSingleton } from '@singletons'; import { makeSingleton } from '@singletons';
import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler';
@ -56,6 +55,8 @@ export class AddonModPageModuleHandlerService extends CoreModuleHandlerBase impl
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown>> { async getMainComponent(): Promise<Type<unknown>> {
const { AddonModPageIndexComponent } = await import('../../components/index');
return AddonModPageIndexComponent; return AddonModPageIndexComponent;
} }

View File

@ -16,7 +16,6 @@ import { Injectable, Type } from '@angular/core';
import { CoreConstants, ModPurpose } from '@/core/constants'; import { CoreConstants, ModPurpose } from '@/core/constants';
import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate';
import { AddonModQuizIndexComponent } from '../../components/index';
import { makeSingleton } from '@singletons'; import { makeSingleton } from '@singletons';
import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler';
@ -51,6 +50,8 @@ export class AddonModQuizModuleHandlerService extends CoreModuleHandlerBase impl
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown>> { async getMainComponent(): Promise<Type<unknown>> {
const { AddonModQuizIndexComponent } = await import('../../components/index');
return AddonModQuizIndexComponent; return AddonModQuizIndexComponent;
} }

View File

@ -22,7 +22,6 @@ import { CoreCourseModulePrefetchDelegate } from '@features/course/services/modu
import { CoreFileHelper } from '@services/file-helper'; import { CoreFileHelper } from '@services/file-helper';
import { CoreMimetypeUtils } from '@services/utils/mimetype'; import { CoreMimetypeUtils } from '@services/utils/mimetype';
import { makeSingleton, Translate } from '@singletons'; import { makeSingleton, Translate } from '@singletons';
import { AddonModResourceIndexComponent } from '../../components/index';
import { AddonModResource } from '../resource'; import { AddonModResource } from '../resource';
import { AddonModResourceHelper } from '../resource-helper'; import { AddonModResourceHelper } from '../resource-helper';
import { CoreUtils } from '@services/utils/utils'; import { CoreUtils } from '@services/utils/utils';
@ -167,6 +166,8 @@ export class AddonModResourceModuleHandlerService extends CoreModuleHandlerBase
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown>> { async getMainComponent(): Promise<Type<unknown>> {
const { AddonModResourceIndexComponent } = await import('../../components/index');
return AddonModResourceIndexComponent; return AddonModResourceIndexComponent;
} }

View File

@ -17,7 +17,6 @@ import { Injectable, Type } from '@angular/core';
import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler';
import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate';
import { makeSingleton } from '@singletons'; import { makeSingleton } from '@singletons';
import { AddonModScormIndexComponent } from '../../components/index';
/** /**
* Handler to support SCORM modules. * Handler to support SCORM modules.
@ -48,6 +47,8 @@ export class AddonModScormModuleHandlerService extends CoreModuleHandlerBase imp
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown>> { async getMainComponent(): Promise<Type<unknown>> {
const { AddonModScormIndexComponent } = await import('../../components/index');
return AddonModScormIndexComponent; return AddonModScormIndexComponent;
} }

View File

@ -46,7 +46,7 @@ export class AddonModSurveyModuleHandlerService extends CoreModuleHandlerBase im
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown>> { async getMainComponent(): Promise<Type<unknown>> {
const { AddonModSurveyIndexComponent } = await import('@addons/mod/survey/components/index'); const { AddonModSurveyIndexComponent } = await import('../../components/index');
return AddonModSurveyIndexComponent; return AddonModSurveyIndexComponent;
} }

View File

@ -23,7 +23,6 @@ import { CoreNavigationOptions } from '@services/navigator';
import { CoreDomUtils } from '@services/utils/dom'; import { CoreDomUtils } from '@services/utils/dom';
import { CoreUtils } from '@services/utils/utils'; import { CoreUtils } from '@services/utils/utils';
import { makeSingleton } from '@singletons'; import { makeSingleton } from '@singletons';
import { AddonModUrlIndexComponent } from '../../components/index/index';
import { AddonModUrl } from '../url'; import { AddonModUrl } from '../url';
import { AddonModUrlHelper } from '../url-helper'; import { AddonModUrlHelper } from '../url-helper';
import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics'; import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics';
@ -190,6 +189,8 @@ export class AddonModUrlModuleHandlerService extends CoreModuleHandlerBase imple
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown>> { async getMainComponent(): Promise<Type<unknown>> {
const { AddonModUrlIndexComponent } = await import('../../components/index');
return AddonModUrlIndexComponent; return AddonModUrlIndexComponent;
} }

View File

@ -17,7 +17,6 @@ import { Injectable, Type } from '@angular/core';
import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler';
import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate';
import { makeSingleton } from '@singletons'; import { makeSingleton } from '@singletons';
import { AddonModWikiIndexComponent } from '../../components/index';
/** /**
* Handler to support wiki modules. * Handler to support wiki modules.
@ -49,6 +48,8 @@ export class AddonModWikiModuleHandlerService extends CoreModuleHandlerBase impl
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown>> { async getMainComponent(): Promise<Type<unknown>> {
const { AddonModWikiIndexComponent } = await import('../../components/index');
return AddonModWikiIndexComponent; return AddonModWikiIndexComponent;
} }

View File

@ -45,7 +45,7 @@ export class AddonModWorkshopModuleHandlerService extends CoreModuleHandlerBase
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown>> { async getMainComponent(): Promise<Type<unknown>> {
const { AddonModWorkshopIndexComponent } = await import('@addons/mod/workshop/components/index'); const { AddonModWorkshopIndexComponent } = await import('../../components/index');
return AddonModWorkshopIndexComponent; return AddonModWorkshopIndexComponent;
} }

View File

@ -169,9 +169,10 @@ export class CoreFormatTextDirective implements OnChanges, OnDestroy, AsyncDirec
* Apply CoreExternalContentDirective to a certain element. * Apply CoreExternalContentDirective to a certain element.
* *
* @param element Element to add the attributes to. * @param element Element to add the attributes to.
* @param onlyInlineStyles Whether to only handle inline styles.
* @returns External content instance or undefined if siteId is not provided. * @returns External content instance or undefined if siteId is not provided.
*/ */
protected addExternalContent(element: Element): CoreExternalContentDirective | undefined { protected addExternalContent(element: Element, onlyInlineStyles = false): CoreExternalContentDirective | undefined {
if (!this.siteId) { if (!this.siteId) {
return; return;
} }
@ -185,11 +186,13 @@ export class CoreFormatTextDirective implements OnChanges, OnDestroy, AsyncDirec
extContent.url = element.getAttribute('src') ?? element.getAttribute('href') ?? element.getAttribute('xlink:href'); extContent.url = element.getAttribute('src') ?? element.getAttribute('href') ?? element.getAttribute('xlink:href');
extContent.posterUrl = element.getAttribute('poster'); extContent.posterUrl = element.getAttribute('poster');
if (!onlyInlineStyles) {
// Remove the original attributes to avoid performing requests to untreated URLs. // Remove the original attributes to avoid performing requests to untreated URLs.
element.removeAttribute('src'); element.removeAttribute('src');
element.removeAttribute('href'); element.removeAttribute('href');
element.removeAttribute('xlink:href'); element.removeAttribute('xlink:href');
element.removeAttribute('poster'); element.removeAttribute('poster');
}
extContent.ngAfterViewInit(); extContent.ngAfterViewInit();
@ -569,9 +572,9 @@ export class CoreFormatTextDirective implements OnChanges, OnDestroy, AsyncDirec
// Handle inline styles. // Handle inline styles.
elementsWithInlineStyles.forEach((el: HTMLElement) => { elementsWithInlineStyles.forEach((el: HTMLElement) => {
// Only add external content for tags that haven't been treated already. // Only add external content for tags that haven't been treated already.
if (el.tagName != 'A' && el.tagName != 'IMG' && el.tagName != 'AUDIO' && el.tagName != 'VIDEO' if (el.tagName !== 'A' && el.tagName !== 'IMG' && el.tagName !== 'AUDIO' && el.tagName !== 'VIDEO'
&& el.tagName != 'SOURCE' && el.tagName != 'TRACK') { && el.tagName !== 'SOURCE' && el.tagName !== 'TRACK' && el.tagName !== 'IMAGE') {
this.addExternalContent(el); this.addExternalContent(el, true);
} }
}); });

View File

@ -18,7 +18,6 @@ import { CoreSites } from '@services/sites';
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '../module-delegate'; import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '../module-delegate';
import { CoreCourse } from '../course'; import { CoreCourse } from '../course';
import { CoreCourseModuleData } from '../course-helper'; import { CoreCourseModuleData } from '../course-helper';
import { CoreCourseUnsupportedModuleComponent } from '@features/course/components/unsupported-module/unsupported-module';
import { CoreNavigationOptions, CoreNavigator } from '@services/navigator'; import { CoreNavigationOptions, CoreNavigator } from '@services/navigator';
/** /**
@ -79,6 +78,9 @@ export class CoreCourseModuleDefaultHandler implements CoreCourseModuleHandler {
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown>> { async getMainComponent(): Promise<Type<unknown>> {
const { CoreCourseUnsupportedModuleComponent } =
await import('@features/course/components/unsupported-module/unsupported-module');
return CoreCourseUnsupportedModuleComponent; return CoreCourseUnsupportedModuleComponent;
} }

View File

@ -18,7 +18,6 @@ import { CoreConstants } from '@/core/constants';
import { CoreCourse } from '@features/course/services/course'; import { CoreCourse } from '@features/course/services/course';
import { CoreCourseHelper, CoreCourseModuleData } from '@features/course/services/course-helper'; import { CoreCourseHelper, CoreCourseModuleData } from '@features/course/services/course-helper';
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@features/course/services/module-delegate'; import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@features/course/services/module-delegate';
import { CoreSitePluginsModuleIndexComponent } from '@features/siteplugins/components/module-index/module-index';
import { import {
CoreSitePlugins, CoreSitePlugins,
CoreSitePluginsContent, CoreSitePluginsContent,
@ -205,6 +204,9 @@ export class CoreSitePluginsModuleHandler extends CoreSitePluginsBaseHandler imp
* @inheritdoc * @inheritdoc
*/ */
async getMainComponent(): Promise<Type<unknown>> { async getMainComponent(): Promise<Type<unknown>> {
const { CoreSitePluginsModuleIndexComponent } =
await import('@features/siteplugins/components/module-index/module-index');
return CoreSitePluginsModuleIndexComponent; return CoreSitePluginsModuleIndexComponent;
} }