diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 919267c9535d0cd2d0f37768fa617d7cb0460712..bdb860dbda82ad5eedd69c052dfa4b1a3c4fa28f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -5,6 +5,7 @@ import { HomePageComponent } from './components/home/home-page/home-page.compone import { UserHomeComponent } from './components/home/user-home/user-home.component'; import { ImprintComponent } from './components/home/_dialogs/imprint/imprint.component'; import { DataProtectionComponent } from './components/home/_dialogs/data-protection/data-protection.component'; +import { QuizNowComponent } from './components/shared/quiz-now/quiz-now.component'; const routes: Routes = [ { @@ -28,6 +29,10 @@ const routes: Routes = [ path: 'data-protection', component: DataProtectionComponent }, + { + path: 'quiz', + component: QuizNowComponent + }, { path: 'creator', loadChildren: () => import('./components/creator/creator.module').then(m => m.CreatorModule) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 67cd297df6add9d93a47f3730bc367ad699fc1d7..28b1148953b7e8e826698c59fd54ecf6c623d24c 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -61,14 +61,15 @@ import { RemoveFromHistoryComponent } from './components/shared/_dialogs/remove- import { MatomoModule } from 'ngx-matomo-v9'; import { TagCloudComponent } from './components/shared/tag-cloud/tag-cloud.component'; import { MatDialogModule } from '@angular/material/dialog'; -import {TagCloudModule} from 'angular-tag-cloud-module'; -import {SpacyService} from './services/http/spacy.service'; +import { TagCloudModule } from 'angular-tag-cloud-module'; +import { SpacyService } from './services/http/spacy.service'; import 'prismjs'; import 'prismjs/plugins/line-numbers/prism-line-numbers.js'; import 'prismjs/plugins/line-highlight/prism-line-highlight.js'; import 'katex/dist/katex.min.js'; import 'emoji-toolkit/lib/js/joypixels.min.js'; +import {QuizNowComponent} from "./components/shared/quiz-now/quiz-now.component"; export function dialogClose(dialogResult: any) { } @@ -105,7 +106,8 @@ export function initializeApp(appConfig: AppConfig) { DemoEnComponent, HelpEnComponent, OverlayComponent, - TagCloudComponent + TagCloudComponent, + QuizNowComponent ], imports: [ MatomoModule, diff --git a/src/app/components/creator/creator.module.ts b/src/app/components/creator/creator.module.ts index 5efccbce0e2d57c0a571144e26416ab839a9cfff..10b0706bd73293cd45e16b584f072917b30750d4 100644 --- a/src/app/components/creator/creator.module.ts +++ b/src/app/components/creator/creator.module.ts @@ -23,7 +23,6 @@ import { DeleteAnswerComponent } from './_dialogs/delete-answer/delete-answer.co import { QuestionWallComponent } from '../shared/questionwall/question-wall/question-wall.component'; import { ArsModule } from '../../../../projects/ars/src/lib/ars.module'; import { MatRippleModule } from '@angular/material/core'; -import { QuizNowComponent } from '../shared/quiz-now/quiz-now.component'; @NgModule({ imports: [ @@ -57,7 +56,6 @@ import { QuizNowComponent } from '../shared/quiz-now/quiz-now.component'; DeleteCommentComponent, BonusDeleteComponent, DeleteAnswerComponent, - QuizNowComponent, QuestionWallComponent ], exports: [] diff --git a/src/app/components/shared/header/header.component.html b/src/app/components/shared/header/header.component.html index c94a05def94aad599a019e1bb8c88b62e162d0c4..a57c5341a8f2992d1dddbce6e7f1218b3ecbb1c4 100644 --- a/src/app/components/shared/header/header.component.html +++ b/src/app/components/shared/header/header.component.html @@ -174,7 +174,7 @@ <button mat-menu-item tabindex="0" - routerLink="participant/room/{{shortId}}/comments/quiz"> + routerLink="quiz"> <mat-icon>school </mat-icon> <span>{{'header.quiz-now' | translate}}</span> diff --git a/src/app/components/shared/quiz-now/quiz-now.component.html b/src/app/components/shared/quiz-now/quiz-now.component.html index ecb59886c41754ed388dba8d2775b11ff21392ef..18dd69c14285d2e0d03a2846ab01a5bcd984fa54 100644 --- a/src/app/components/shared/quiz-now/quiz-now.component.html +++ b/src/app/components/shared/quiz-now/quiz-now.component.html @@ -1,3 +1,3 @@ <div class="container"> - <iframe class="responsive-iframe" src="urlSafe"></iframe> + <iframe class="responsive-iframe" src="https://arsnova.click"></iframe> </div> diff --git a/src/app/components/shared/quiz-now/quiz-now.component.ts b/src/app/components/shared/quiz-now/quiz-now.component.ts index 82870fd955b136ebe77c3f603b66c76dba07f730..822acf25460dbf5157915526852f518d7b4501e3 100644 --- a/src/app/components/shared/quiz-now/quiz-now.component.ts +++ b/src/app/components/shared/quiz-now/quiz-now.component.ts @@ -1,20 +1,9 @@ -import { Component, OnInit } from '@angular/core'; +import {Component, OnInit} from '@angular/core'; import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser'; - @Component({ selector: 'app-quiz-now', templateUrl: './quiz-now.component.html', styleUrls: ['./quiz-now.component.scss'] }) -export class QuizNowComponent implements OnInit { - - url = 'https://arsnova.click'; - urlSafe: SafeResourceUrl; - - constructor(public sanitizer: DomSanitizer) { } - - ngOnInit(): void { - this.urlSafe = this.sanitizer.bypassSecurityTrustResourceUrl(this.url); - } - +export class QuizNowComponent { } diff --git a/src/app/components/shared/shared-routing.module.ts b/src/app/components/shared/shared-routing.module.ts index 7b3a94a82e9be1bbf545433e13ec8c56eaf009f2..1b15001b4ed5cbe84fea53fb90a22f39e4301622 100644 --- a/src/app/components/shared/shared-routing.module.ts +++ b/src/app/components/shared/shared-routing.module.ts @@ -4,7 +4,6 @@ import { QuestionWallComponent } from './questionwall/question-wall/question-wal import { AuthenticationGuard } from '../../guards/authentication.guard'; import { UserRole } from '../../models/user-roles.enum'; import { TagCloudComponent } from './tag-cloud/tag-cloud.component'; -import { QuizNowComponent } from './quiz-now/quiz-now.component'; const routes: Routes = [ { @@ -17,16 +16,6 @@ const routes: Routes = [ UserRole.PARTICIPANT] } }, - { - path: 'room/:shortId/comments/quiz', - component: QuizNowComponent, - data: { roles: [ - UserRole.CREATOR, - UserRole.EDITING_MODERATOR, - UserRole.EXECUTIVE_MODERATOR, - UserRole.PARTICIPANT] } - }, - { path: 'room/:shortId/comments/tagcloud', component: TagCloudComponent,