From 1e97f393d5b5b8271c26f5dd19a650622381eb52 Mon Sep 17 00:00:00 2001 From: mme <mechtel@iqb.hu-berlin.de> Date: Fri, 22 Feb 2019 17:47:36 +0100 Subject: [PATCH] Lazy test-controller, but not working anymore... --- src/app/app-routing.module.ts | 2 +- src/app/app.component.html | 2 -- src/app/app.module.ts | 2 -- .../test-controller-routing.module.ts | 16 ++++++---------- .../test-controller.component.html | 1 + .../unithost/unithost.component.ts | 2 +- src/environments/environment.ts | 2 +- 7 files changed, 10 insertions(+), 17 deletions(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 74f811fb..797af8d3 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -10,7 +10,7 @@ const routes: Routes = [ {path: 'start', component: StartComponent}, {path: 'about', component: AboutComponent}, {path: 'check', loadChildren: './sys-check/sys-check.module#SysCheckModule'}, - {path: 't', component: TestControllerComponent} + {path: 't', loadChildren: './test-controller/test-controller.module#TestControllerModule'} ]; @NgModule({ diff --git a/src/app/app.component.html b/src/app/app.component.html index c6ba6583..0be6ebdc 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -4,8 +4,6 @@ </a> <span>{{ title }}</span> <span class="itp-fill-remaining-space"></span> - - <tc-menu-buttons></tc-menu-buttons> </mat-toolbar> <router-outlet></router-outlet> diff --git a/src/app/app.module.ts b/src/app/app.module.ts index de1ed07f..dfda0174 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -11,7 +11,6 @@ import { MatButtonModule, MatCheckboxModule, MatMenuModule, MatTooltipModule, Ma import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; -import { TestControllerModule } from './test-controller'; import { IqbCommonModule } from './iqb-common'; import { BackendService } from './backend.service'; import { StartComponent } from './start/start.component'; @@ -46,7 +45,6 @@ import { ErrormsgComponent } from './errormsg/errormsg.component'; FlexLayoutModule, ReactiveFormsModule, HttpClientModule, - TestControllerModule, AppRoutingModule, IqbCommonModule ], diff --git a/src/app/test-controller/test-controller-routing.module.ts b/src/app/test-controller/test-controller-routing.module.ts index 04356deb..ca91174e 100644 --- a/src/app/test-controller/test-controller-routing.module.ts +++ b/src/app/test-controller/test-controller-routing.module.ts @@ -8,19 +8,15 @@ import { Routes, RouterModule } from '@angular/router'; const routes: Routes = [ { - path: 't', - component: TestControllerComponent, - children: [ - {path: 'u/:u', - component: UnithostComponent, - canActivate: [UnitActivateGuard], - canDeactivate: [UnitDeactivateGuard] + path: 'u/:u', + component: UnithostComponent, + canActivate: [UnitActivateGuard], + canDeactivate: [UnitDeactivateGuard] // resolve: { // unitData: UnitResolver // } - } - ] - }]; + } +]; @NgModule({ imports: [RouterModule.forChild(routes)], diff --git a/src/app/test-controller/test-controller.component.html b/src/app/test-controller/test-controller.component.html index f0d2e2c2..a30ae86a 100644 --- a/src/app/test-controller/test-controller.component.html +++ b/src/app/test-controller/test-controller.component.html @@ -1,3 +1,4 @@ +<!-- <tc-menu-buttons></tc-menu-buttons> --> <tc-navi-buttons></tc-navi-buttons> <div class="spinner-container" *ngIf="dataLoading"> <mat-spinner></mat-spinner> diff --git a/src/app/test-controller/unithost/unithost.component.ts b/src/app/test-controller/unithost/unithost.component.ts index 1e41a490..0cf55464 100644 --- a/src/app/test-controller/unithost/unithost.component.ts +++ b/src/app/test-controller/unithost/unithost.component.ts @@ -81,7 +81,7 @@ export class UnithostComponent implements OnInit, OnDestroy { this.itemplayerSessionId = Math.floor(Math.random() * 20000000 + 10000000).toString(); this.log$.next({'unitName': this.myUnitName, 'logEntry': 'start'}); - this.postMessageTarget = m.source; + this.postMessageTarget = m.source as Window; this.postMessageTarget.postMessage({ type: 'OpenCBA.ToItemPlayer.DataTransfer', sessionId: this.itemplayerSessionId, diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 50ce0325..cebbbc75 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -4,7 +4,7 @@ export const environment = { production: false, - testcenterUrl: 'https://www.iqb-testcenter.de/', + testcenterUrl: 'https://itemdb2.iqb.hu-berlin.de/', appName: 'IQB-Testcenter', appPublisher: 'IQB - Institut zur Qualitätsentwicklung im Bildungswesen', appVersion: '0 (dev)' -- GitLab