MOBILE-4623 imscp: Fix issue with single activity format
parent
cefe0e4ac1
commit
46c305b563
|
@ -19,7 +19,7 @@ import { CoreCourse } from '@features/course/services/course';
|
||||||
import { CoreNavigator } from '@services/navigator';
|
import { CoreNavigator } from '@services/navigator';
|
||||||
import { AddonModImscp, AddonModImscpTocItem } from '../../services/imscp';
|
import { AddonModImscp, AddonModImscpTocItem } from '../../services/imscp';
|
||||||
import { CoreUtils } from '@services/utils/utils';
|
import { CoreUtils } from '@services/utils/utils';
|
||||||
import { ADDON_MOD_IMSCP_COMPONENT } from '../../constants';
|
import { ADDON_MOD_IMSCP_COMPONENT, ADDON_MOD_IMSCP_PAGE_NAME } from '../../constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Component that displays a IMSCP.
|
* Component that displays a IMSCP.
|
||||||
|
@ -113,14 +113,17 @@ export class AddonModImscpIndexComponent extends CoreCourseModuleMainResourceCom
|
||||||
*
|
*
|
||||||
* @param href Item href to open, undefined for last item seen.
|
* @param href Item href to open, undefined for last item seen.
|
||||||
*/
|
*/
|
||||||
openImscp(href?: string): void {
|
async openImscp(href?: string): Promise<void> {
|
||||||
CoreNavigator.navigate('view', {
|
await CoreNavigator.navigateToSitePath(
|
||||||
|
`${ADDON_MOD_IMSCP_PAGE_NAME}/${this.courseId}/${this.module.id}/view`,
|
||||||
|
{
|
||||||
params: {
|
params: {
|
||||||
cmId: this.module.id,
|
cmId: this.module.id,
|
||||||
courseId: this.courseId,
|
courseId: this.courseId,
|
||||||
initialHref: href,
|
initialHref: href,
|
||||||
},
|
},
|
||||||
});
|
},
|
||||||
|
);
|
||||||
|
|
||||||
this.hasStarted = true;
|
this.hasStarted = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue