MOBILE-3637 lesson: Change path to be coherent with book
parent
d3e8b96946
commit
11dafc92c3
|
@ -161,7 +161,9 @@
|
||||||
</ion-label>
|
</ion-label>
|
||||||
<ion-select [(ngModel)]="group" (ionChange)="setGroup(group)" aria-labelledby="addon-mod_lesson-groupslabel"
|
<ion-select [(ngModel)]="group" (ionChange)="setGroup(group)" aria-labelledby="addon-mod_lesson-groupslabel"
|
||||||
interface="action-sheet">
|
interface="action-sheet">
|
||||||
<ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id">{{groupOpt.name}}</ion-select-option>
|
<ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id">
|
||||||
|
{{groupOpt.name}}
|
||||||
|
</ion-select-option>
|
||||||
</ion-select>
|
</ion-select>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|
||||||
|
|
|
@ -17,12 +17,7 @@ import { RouterModule, Routes } from '@angular/router';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: ':courseId/:cmdId',
|
||||||
redirectTo: 'index',
|
|
||||||
pathMatch: 'full',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'index',
|
|
||||||
loadChildren: () => import('./pages/index/index.module').then( m => m.AddonModLessonIndexPageModule),
|
loadChildren: () => import('./pages/index/index.module').then( m => m.AddonModLessonIndexPageModule),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -111,7 +111,9 @@
|
||||||
<!-- Content page, display a button and the content. -->
|
<!-- Content page, display a button and the content. -->
|
||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col>
|
<ion-col>
|
||||||
<ion-button expand="block" class="ion-text-wrap" color="light" [disabled]="true">{{ answer[0].buttonText }}</ion-button>
|
<ion-button expand="block" class="ion-text-wrap" color="light" [disabled]="true">
|
||||||
|
{{ answer[0].buttonText }}
|
||||||
|
</ion-button>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
<ion-col>
|
<ion-col>
|
||||||
<p [innerHTML]="answer[0].content"></p>
|
<p [innerHTML]="answer[0].content"></p>
|
||||||
|
|
|
@ -79,9 +79,10 @@ export class AddonModLessonModuleHandlerService implements CoreCourseModuleHandl
|
||||||
action: (event: Event, module: CoreCourseModule, courseId: number, options?: CoreNavigationOptions) => {
|
action: (event: Event, module: CoreCourseModule, courseId: number, options?: CoreNavigationOptions) => {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
options.params = options.params || {};
|
options.params = options.params || {};
|
||||||
Object.assign(options.params, { module, courseId });
|
Object.assign(options.params, { module });
|
||||||
|
const routeParams = '/' + courseId + '/' + module.id;
|
||||||
|
|
||||||
CoreNavigator.instance.navigateToSitePath(AddonModLessonModuleHandlerService.PAGE_NAME, options);
|
CoreNavigator.instance.navigateToSitePath(AddonModLessonModuleHandlerService.PAGE_NAME + routeParams, options);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue