diff --git a/src/core/features/siteplugins/classes/handlers/module-handler.ts b/src/core/features/siteplugins/classes/handlers/module-handler.ts
index 1276a3a87..847d2894b 100644
--- a/src/core/features/siteplugins/classes/handlers/module-handler.ts
+++ b/src/core/features/siteplugins/classes/handlers/module-handler.ts
@@ -15,7 +15,7 @@
import { Type } from '@angular/core';
import { CoreConstants } from '@/core/constants';
-import { CoreCourseAnyModuleData, CoreCourseWSModule } from '@features/course/services/course';
+import { CoreCourse, CoreCourseAnyModuleData, CoreCourseWSModule } from '@features/course/services/course';
import { CoreCourseModule } from '@features/course/services/course-helper';
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@features/course/services/module-delegate';
import { CoreSitePluginsModuleIndexComponent } from '@features/siteplugins/components/module-index/module-index';
@@ -92,17 +92,16 @@ export class CoreSitePluginsModuleHandler extends CoreSitePluginsBaseHandler imp
if (this.handlerSchema.method) {
// There is a method, add an action.
- handlerData.action = (event: Event, module: CoreCourseModule, courseId: number, options?: CoreNavigationOptions) => {
+ handlerData.action = async (
+ event: Event,
+ module: CoreCourseModule,
+ courseId: number,
+ options?: CoreNavigationOptions,
+ ) => {
event.preventDefault();
event.stopPropagation();
- options = options || {};
- options.params = {
- title: module.name,
- module,
- };
-
- CoreNavigator.navigateToSitePath(`siteplugins/module/${courseId}/${module.id}`, options);
+ await this.openActivityPage(module, courseId, options);
};
}
@@ -229,4 +228,22 @@ export class CoreSitePluginsModuleHandler extends CoreSitePluginsBaseHandler imp
return false;
}
+ /**
+ * @inheritdoc
+ */
+ async openActivityPage(module: CoreCourseModule, courseId: number, options?: CoreNavigationOptions): Promise {
+ if (!CoreCourse.moduleHasView(module)) {
+ return;
+ }
+
+ options = options || {};
+ options.params = options.params || {};
+ Object.assign(options.params, {
+ title: module.name,
+ module,
+ });
+
+ CoreNavigator.navigateToSitePath(`siteplugins/module/${courseId}/${module.id}`, options);
+ }
+
}
diff --git a/src/core/features/siteplugins/components/components.module.ts b/src/core/features/siteplugins/components/components.module.ts
index 2969000e5..b9482e300 100644
--- a/src/core/features/siteplugins/components/components.module.ts
+++ b/src/core/features/siteplugins/components/components.module.ts
@@ -28,6 +28,7 @@ import { CoreSitePluginsAssignSubmissionComponent } from './assign-submission/as
import { CoreSitePluginsWorkshopAssessmentStrategyComponent } from './workshop-assessment-strategy/workshop-assessment-strategy';
import { CoreSitePluginsBlockComponent } from './block/block';
import { CoreSitePluginsOnlyTitleBlockComponent } from './only-title-block/only-title-block';
+import { CoreCourseComponentsModule } from '@features/course/components/components.module';
@NgModule({
declarations: [
@@ -47,6 +48,7 @@ import { CoreSitePluginsOnlyTitleBlockComponent } from './only-title-block/only-
imports: [
CoreSharedModule,
CoreCompileHtmlComponentModule,
+ CoreCourseComponentsModule,
],
exports: [
CoreSitePluginsPluginContentComponent,
diff --git a/src/core/features/siteplugins/components/module-index/core-siteplugins-module-index.html b/src/core/features/siteplugins/components/module-index/core-siteplugins-module-index.html
index 930a6e0a0..ac5c6b837 100644
--- a/src/core/features/siteplugins/components/module-index/core-siteplugins-module-index.html
+++ b/src/core/features/siteplugins/components/module-index/core-siteplugins-module-index.html
@@ -11,8 +11,7 @@
+ [content]="'core.refresh' | translate" (action)="doRefresh(null, $event)" [iconAction]="refreshIcon" [closeOnClick]="false">
+
+
diff --git a/src/core/features/viewer/pages/iframe/iframe.html b/src/core/features/viewer/pages/iframe/iframe.html
index 5b2ae550d..213a23e16 100644
--- a/src/core/features/viewer/pages/iframe/iframe.html
+++ b/src/core/features/viewer/pages/iframe/iframe.html
@@ -9,7 +9,7 @@
-
+
diff --git a/src/core/services/utils/dom.ts b/src/core/services/utils/dom.ts
index c23675e5c..77a664817 100644
--- a/src/core/services/utils/dom.ts
+++ b/src/core/services/utils/dom.ts
@@ -975,7 +975,7 @@ export class CoreDomUtilsProvider {
* @deprecated since 3.9.5. Use directly the IonContent class.
*/
scrollTo(content: IonContent, x: number, y: number, duration?: number): Promise {
- return content?.scrollToPoint(x, y, duration || 0);
+ return content.scrollToPoint(x, y, duration || 0);
}
/**
@@ -987,7 +987,7 @@ export class CoreDomUtilsProvider {
* @deprecated since 3.9.5. Use directly the IonContent class.
*/
scrollToBottom(content: IonContent, duration?: number): Promise {
- return content?.scrollToBottom(duration);
+ return content.scrollToBottom(duration);
}
/**
@@ -999,7 +999,7 @@ export class CoreDomUtilsProvider {
* @deprecated since 3.9.5. Use directly the IonContent class.
*/
scrollToTop(content: IonContent, duration?: number): Promise {
- return content?.scrollToTop(duration);
+ return content.scrollToTop(duration);
}
/**
@@ -1010,9 +1010,9 @@ export class CoreDomUtilsProvider {
*/
async getContentHeight(content: IonContent): Promise {
try {
- const scrollElement = await content?.getScrollElement();
+ const scrollElement = await content.getScrollElement();
- return scrollElement?.clientHeight || 0;
+ return scrollElement.clientHeight || 0;
} catch (error) {
return 0;
}
@@ -1026,9 +1026,9 @@ export class CoreDomUtilsProvider {
*/
async getScrollHeight(content: IonContent): Promise {
try {
- const scrollElement = await content?.getScrollElement();
+ const scrollElement = await content.getScrollElement();
- return scrollElement?.scrollHeight || 0;
+ return scrollElement.scrollHeight || 0;
} catch (error) {
return 0;
}
@@ -1042,9 +1042,9 @@ export class CoreDomUtilsProvider {
*/
async getScrollTop(content: IonContent): Promise {
try {
- const scrollElement = await content?.getScrollElement();
+ const scrollElement = await content.getScrollElement();
- return scrollElement?.scrollTop || 0;
+ return scrollElement.scrollTop || 0;
} catch (error) {
return 0;
}
@@ -1065,7 +1065,7 @@ export class CoreDomUtilsProvider {
return false;
}
- content?.scrollToPoint(position[0], position[1], duration || 0);
+ content.scrollToPoint(position[0], position[1], duration || 0);
return true;
}
@@ -1097,7 +1097,7 @@ export class CoreDomUtilsProvider {
return false;
}
- content?.scrollToPoint(position[0], position[1], duration || 0);
+ content.scrollToPoint(position[0], position[1], duration || 0);
return true;
} catch (error) {
diff --git a/src/theme/theme.base.scss b/src/theme/theme.base.scss
index 4b9278132..51f3cb7f2 100644
--- a/src/theme/theme.base.scss
+++ b/src/theme/theme.base.scss
@@ -906,13 +906,16 @@ ion-back-button.md::part(text) {
display: none;
}
+// Hide close button because when present is read on voice over.
ion-fab[core-fab] {
- position: fixed;
-
- // Hide close button because when present is read on voice over.
ion-fab-button::part(close-icon) {
display: none;
}
+}
+
+core-course-module-navigation + ion-fab {
+ bottom: calc(var(--core-course-module-navigation-height, 0px) + 10px);
+ @include core-transition(all, 200ms);
}
.core-media-adapt-width {
diff --git a/src/theme/theme.light.scss b/src/theme/theme.light.scss
index fa001efb9..a4b0b935e 100644
--- a/src/theme/theme.light.scss
+++ b/src/theme/theme.light.scss
@@ -257,6 +257,9 @@
--core-courseimage-on-course-height: 150px;
+ --core-course-module-navigation-max-height: 56px;
+ --core-course-module-navigation-background: var(--contrast-background);
+
--addon-calendar-event-category-color: var(--purple);
--addon-calendar-event-course-color: var(--red);
--addon-calendar-event-group-color: var(--yellow);
diff --git a/upgrade.txt b/upgrade.txt
index 19393ed60..4f36e38bc 100644
--- a/upgrade.txt
+++ b/upgrade.txt
@@ -4,6 +4,8 @@ information provided here is intended especially for developers.
=== 3.9.6 ===
- The parameters of the functions confirmAndPrefetchCourse and confirmAndPrefetchCourses have changed, they now accept an object with options.
+- Component core-navigation-bar changed to add an slider inside. previous, previousTitle, next, nextTitle, info and title have been removed.
+ Now you have to pass all items and 3 optional params have been added.
=== 3.9.5 ===