Commit 63345885 authored by Christopher Mark Fullarton's avatar Christopher Mark Fullarton
Browse files

Fixes linting errors. Updates piwik tracking script to the matomo version

parent 7999a5c9
import {DatePipe, isPlatformBrowser, isPlatformServer, LOCATION_INITIALIZED, ɵgetDOM} from '@angular/common';
import { DatePipe, isPlatformServer } from '@angular/common';
import { HttpClient, HttpClientModule } from '@angular/common/http';
import {
APP_INITIALIZER,
ApplicationRef,
ErrorHandler,
Inject,
Injector,
NgModule,
PLATFORM_ID,
SecurityContext
} from '@angular/core';
import { APP_INITIALIZER, ErrorHandler, Inject, Injector, NgModule, PLATFORM_ID, SecurityContext } from '@angular/core';
import { BrowserModule, BrowserTransferStateModule, TransferState } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ServiceWorkerModule } from '@angular/service-worker';
import { JWT_OPTIONS, JwtModule } from '@auth0/angular-jwt';
import {NgbActiveModal, NgbModal, NgbModule} from '@ng-bootstrap/ng-bootstrap';
import { NgbActiveModal, NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { TranslateCompiler, TranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core';
import { InjectableRxStompConfig, RxStompService, rxStompServiceFactory } from '@stomp/ng2-stompjs';
import { AngularSvgIconModule, SvgLoader } from 'angular-svg-icon';
......@@ -46,9 +37,9 @@ import { StatisticsComponent } from './root/statistics/statistics.component';
import { ThemeSwitcherComponent } from './root/theme-switcher/theme-switcher.component';
import { TwitterCardsComponent } from './root/twitter-cards/twitter-cards.component';
import rxStompConfig from './rx-stomp.config';
import { SettingsService } from './service/settings/settings.service';
import { SentryErrorHandler } from './shared/sentry-error-handler';
import { SharedModule } from './shared/shared.module';
import {SettingsService} from './service/settings/settings.service';
function markedOptionsFactory(): MarkedOptions {
return {
......
......@@ -30,11 +30,10 @@ export class FreeTextAnswerEntity extends AbstractAnswerEntity {
}
let refValue = this.answerText;
let result = false;
let result: boolean;
if (!this.configCaseSensitive) {
refValue = refValue.toLowerCase();
ref = ref.toLowerCase();
result = refValue === ref;
}
if (this.configTrimWhitespaces) {
refValue = refValue.replace(/[ ]/g, '');
......
......@@ -2,8 +2,8 @@ import { MusicTitleSessionConfigurationEntity } from './MusicTitleSessionConfigu
import { MusicVolumeSessionConfigurationEntity } from './MusicVolumeSessionConfigurationEntity';
export class MusicSessionConfigurationEntity {
public enabled;
public shared;
public enabled: {lobby: number, countdownRunning: number, countdownEnd: number};
public shared: {lobby: number, countdownRunning: number, countdownEnd: number};
public volumeConfig: MusicVolumeSessionConfigurationEntity;
public titleConfig: MusicTitleSessionConfigurationEntity;
......
import { LoginMechanism, Title } from '../enums/enums';
import { QuizTheme } from '../enums/QuizTheme';
export interface IEnvironment {
production: boolean;
serverEndpoint: string;
......
......@@ -119,7 +119,8 @@ describe('QuizLobbyComponent', () => {
expect(component['_kickMemberModalRef']).not.toBeNull();
}));
it('#kickMember', inject([NgbModal], (modalService: NgbModal) => {
it('#kickMember', waitForAsync(() => {
const modalService = TestBed.inject(NgbModal);
const modalContent = '<div></div>' as unknown as TemplateRef<any>;
const nickToRemove = 'TestNick';
......@@ -128,11 +129,7 @@ describe('QuizLobbyComponent', () => {
spyOn(component, 'kickMember').and.callThrough();
component.openKickMemberModal(modalContent, nickToRemove);
(
(
async () => await component.kickMember(nickToRemove)
)()
);
component.kickMember(nickToRemove);
expect(component.kickMember).toHaveBeenCalled();
}));
......
......@@ -18,7 +18,7 @@ import {SettingsService} from '../../service/settings/settings.service';
export class InfoComponent implements OnInit, OnDestroy, AfterViewInit {
public static readonly TYPE = 'InfoComponent';
private _markdownFilePostfix: string;
private readonly _markdownFilePostfix: string;
private readonly _destroy = new Subject();
@ViewChild('buttonHeader', { static: true }) private buttonHeader: ElementRef;
......
import { isPlatformServer } from '@angular/common';
import { Component, Inject, OnDestroy, OnInit, PLATFORM_ID } from '@angular/core';
import { IconParams, IconProp } from '@fortawesome/fontawesome-svg-core';
import { IconParams, IconProp, LayerParams } from '@fortawesome/fontawesome-svg-core';
import { RxStompService } from '@stomp/ng2-stompjs';
import { SimpleMQ } from 'ng2-simple-mq';
import { of, Subject, zip } from 'rxjs';
......@@ -17,7 +17,7 @@ import {SettingsService} from '../../service/settings/settings.service';
interface IStatisticDataTile {
iconColor: string;
iconLayer?: Array<IconParams>;
iconLayer?: Array<IconParams & LayerParams>;
icon?: IconProp;
amount: number;
title: string;
......
......@@ -157,7 +157,7 @@ export class NotificationService {
this.modifyBadge(parseInt(parsed.payload, 10));
console.log('Notification showed', options);
console.log('Notification showed');
break;
default:
console.error('Unknown message from service worker received');
......
......@@ -20,7 +20,7 @@ import {environment} from '../../../environments/environment';
})
export class ThemesService {
private _currentTheme: QuizTheme;
private _themes: Array<ITheme>;
private readonly _themes: Array<ITheme>;
private readonly _defaultTheme: QuizTheme;
public readonly themeChanged: EventEmitter<QuizTheme> = new EventEmitter<QuizTheme>();
......@@ -49,7 +49,7 @@ export class ThemesService {
private transferState: TransferState,
private settingsService: SettingsService
) {
this._themes = settingsService.frontEnv?.availableQuizThemes.map(t => themes.find(theme => theme.id === t));
this._themes = settingsService.frontEnv?.availableQuizThemes.map(t => themes.find(theme => theme.id === t));
const key: StateKey<Array<IThemeHashMap>> = makeStateKey<Array<IThemeHashMap>>('transfer-theme-map');
if (this.themeMap) {
this.transferState.set(key, this.themeMap);
......
......@@ -88,7 +88,7 @@
db.close();
dump(databaseNames.slice(1));
});
;
} else {
console.log("Finished dumping databases");
console.log("==========================");
......
......@@ -101,7 +101,7 @@
"about": {
"declaration": "Ein bisschen <a href='https://getkahoot.com' target='_blank'>Kahoot!</a>, <br />ein bisschen <a href='https://socrative.com/' target='_blank'>Socrative</a>,<br />ganz viel <a href='https://arsnova.eu/' target='_blank'>ARSnova</a>!",
"ars": "arsnova.click ist ein innovatives <a href='https://de.wikipedia.org/wiki/Audience_Response_System' target='_blank'>Audience-Response-System (ARS)</a> für öffentliche Bildungseinrichtungen.",
"developed_by": "Inspiriert durch <a href='https://getkahoot.com' target='_blank'>Kahoot!</a> und <a href='https://socrative.com/' target='_blank'>Socrative</a> entwickelten Informatik-Studenten der <a href='http://www.thm.de/site/' target='_blank'>THM</a> die <a href='https://de.wikipedia.org/wiki/Gamification' target='_blank'>gamifizierte</a> Alternative zum Flaggschiff <a href='https://arsnova.eu/' target='_blank'>ARSnova</a>.",
"developed_by": "Inspiriert durch <a href='https://getkahoot.com' target='_blank'>Kahoot!</a> und <a href='https://socrative.com/' target='_blank'>Socrative</a> entwickelten Informatik-Studenten der <a href='https://thm.de' target='_blank'>THM</a> die <a href='https://de.wikipedia.org/wiki/Gamification' target='_blank'>gamifizierte</a> Alternative zum Flaggschiff <a href='https://arsnova.eu/' target='_blank'>ARSnova</a>.",
"met_requirements": "<strong>Features:</strong>",
"requirements": {
"1": "Absoluter Datenschutz: keine personenbezogenen Daten auf dem Server, alle Quiz-Daten verbleiben im Browser (<a href='https://de.wikipedia.org/wiki/Web_Storage' target='_blank'>Web Storage</a>)",
......@@ -111,7 +111,7 @@
"5": "Barrierefreie und für den Beamer optimierte Bedienoberfläche",
"6": "Fragetypen: ABC…, Multiple/Single Choice, Schätzfrage, Kurzantwort, Umfrage; MC/SC-Fragen mit beliebig vielen Antwortoptionen",
"7": "ABC…-Quizze können durch Eingabe von ABC… als Quiz-Name mit einem Klick erstellt werden. Die Anzahl der fortlaufende Buchstaben bestimmt die Antwortoptionen.",
"8": "<a href='https://de.wikipedia.org/wiki/TeX' target='_blank'>TeX</a>-Formelsatz, Textformatierung mit <a href='https://de.wikipedia.org/wiki/Markdown' target='_blank'>Markdown</a>, <a href='http://www.webpagefx.com/tools/emoji-cheat-sheet/' target='_blank'>Emojis</a>, Bilder und Videos im Fragetext und in den Antwortoptionen",
"8": "<a href='https://de.wikipedia.org/wiki/TeX' target='_blank'>TeX</a>-Formelsatz, Textformatierung mit <a href='https://de.wikipedia.org/wiki/Markdown' target='_blank'>Markdown</a>, <a href='https://www.webfx.com/tools/emoji-cheat-sheet/' target='_blank'>Emojis</a>, Bilder und Videos im Fragetext und in den Antwortoptionen",
"9": "Edutainment: Lernmotivation durch Live-Wettbewerb – einzeln oder in Teams – mit Sound im Countdown gegen die Mitspielenden",
"10": "Bonusoption: Die Top Player erhalten »Tokens«, die sie per Mail an die Lehrperson in Bonuspunkte einlösen können.",
"11": "<a href='https://de.wikipedia.org/wiki/Responsive_Webdesign' target='_blank'>Responsives Design</a>: egal ob Smartphone, Beamer oder Wide Screen, das Design skaliert. Selbst komplexe Quizze können auf dem Smartphone erstellt werden.",
......@@ -247,7 +247,7 @@
"show_answer_content_on_buttons": "Antworttext auf Abstimmbuttons?",
"show_one_answer_per_row": "Zeige nur eine Antwortoption pro Zeile?",
"multiple_selection_survey": "Mehrere Optionen auswählbar?",
"emoji_info": "Du kannst auch Emojis einfügen! <a href='http://www.webpagefx.com/tools/emoji-cheat-sheet/' target='_blank'><img class='w-40px' src='/assets/images/emojis/smile.png' alt='smiling_emoji.png'/></a>",
"emoji_info": "Du kannst auch Emojis einfügen! <a href='https://www.webfx.com/tools/emoji-cheat-sheet/' target='_blank'><img class='w-40px' src='/assets/images/emojis/smile.png' alt='smiling_emoji.png'/></a>",
"description": {
"default_answer_row": "Ziehe diesen Block in die Liste der Antwortoptionen oder klick auf ihn, um eine neue Antwort einzufügen.",
"added_answers": "Hier siehst du die Antwortoptionen der Frage. Du kannst die Reihenfolge per Drag & Drop ändern.",
......@@ -830,7 +830,7 @@
"horizontal-rule": "Trennlinie",
"info": "Info zur Textformatierung"
},
"info_content": "Formatiere deine Frage mit <a target='_blank' class='hyperlink' href='https://de.wikipedia.org/wiki/Markdown'>Markdown</a> und füge Bilder, Videos oder Formeln ein. Besonders cool: Du kannst Emojis einfügen! Klick auf den Smiley, um ein passendes Emoji zu finden: <a href='http://www.webpagefx.com/tools/emoji-cheat-sheet/' target='_blank'><img style='width:30px;' src='./images/emojis/smile.png' alt='smiling_emoji.png'/></a>"
"info_content": "Formatiere deine Frage mit <a target='_blank' class='hyperlink' href='https://de.wikipedia.org/wiki/Markdown'>Markdown</a> und füge Bilder, Videos oder Formeln ein. Besonders cool: Du kannst Emojis einfügen! Klick auf den Smiley, um ein passendes Emoji zu finden: <a href='https://www.webfx.com/tools/emoji-cheat-sheet/' target='_blank'><img style='width:30px;' src='./images/emojis/smile.png' alt='smiling_emoji.png'/></a>"
},
"sound": {
"running_music": "Countdown",
......
......@@ -101,10 +101,10 @@
"about": {
"declaration": "A little <a href='https://getkahoot.com' target='_blank'>Kahoot!</a>, <br />a little <a href='https://socrative.com/' target='_blank'>Socrative</a>,<br />a lot <a href='https://arsnova.eu/' target='_blank'>ARSnova</a>!",
"ars": "arsnova.click is an innovative <a href='https://en.wikipedia.org/wiki/Audience_response#Classroom_use' target='_blank'>Audience-Response-System (ARS)</a> for public educational institutions.",
"developed_by": "Inspired by <a href='https://getkahoot.com' target='_blank'>Kahoot!</a> and <a href='https://socrative.com/' target='_blank'>Socrative</a> developed by computer science students of <a href='https://www.thm.de/site/' target='_blank'>THM</a> the <a href='https://en.wikipedia.org/wiki/Gamification' target='_blank'>gamified</a> alternative to the flagship <a href='https://arsnova.eu/' target='_blank'>ARSnova</a>.",
"developed_by": "Inspired by <a href='https://getkahoot.com' target='_blank'>Kahoot!</a> and <a href='https://socrative.com/' target='_blank'>Socrative</a> developed by computer science students of <a href='https://thm.de' target='_blank'>THM</a> the <a href='https://en.wikipedia.org/wiki/Gamification' target='_blank'>gamified</a> alternative to the flagship <a href='https://arsnova.eu/' target='_blank'>ARSnova</a>.",
"met_requirements": "<strong>Features:</strong>",
"requirements": {
"1": "Absolute data privacy: No personal files on the server. All quiz data is located at the <a href='http://www.w3schools.com/html/html5_webstorage.asp' target='_blank'>HTML5 Local Storage</a> of the quiz owner.",
"1": "Absolute data privacy: No personal files on the server. All quiz data is located at the <a href='https://www.w3schools.com/html/html5_webstorage.asp' target='_blank'>HTML5 Local Storage</a> of the quiz owner.",
"2": "No registration, no installation, no costs at all",
"3": "Same landing page for both roles: quiz master and player",
"4": "Anyone can create quizzes: immediately and as much as you like!",
......@@ -247,7 +247,7 @@
"show_answer_content_on_buttons": "Display the answer's content on the buttons?",
"show_one_answer_per_row": "Show only one answer per row?",
"multiple_selection_survey": "Allow selection of multiple answers?",
"emoji_info": "You can embed also one of these <a href='http://www.webpagefx.com/tools/emoji-cheat-sheet/' target='_blank'>Emojis (external website!)</a> <img class='w-40px' src='/assets/images/emojis/smile.png' alt='emoji'/> <br/>Simply click on the website on the Emoji and paste it into the answeroption.",
"emoji_info": "You can embed also one of these <a href='https://www.webfx.com/tools/emoji-cheat-sheet/' target='_blank'>Emojis (external website!)</a> <img class='w-40px' src='/assets/images/emojis/smile.png' alt='emoji'/> <br/>Simply click on the website on the Emoji and paste it into the answeroption.",
"description": {
"default_answer_row": "Drag this block into the list of answeroptions to create a new one.",
"added_answers": "Here are all already created answeroptions. You can change the order of the answers via drag & drop.",
......
var _paq = _paq || [];
const _paq = window._paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function () {
const u = "https://arsnova.thm.de/stats/";
_paq.push(['setTrackerUrl', u + 'piwik.php']);
_paq.push(['setTrackerUrl', u + 'matomo.php']);
_paq.push(['setSiteId', '8']);
const d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript';
g.async = true;
g.defer = true;
g.src = u + 'piwik.js';
g.src = u + 'matomo.js';
s.parentNode.insertBefore(g, s);
})();
})();
\ No newline at end of file
var _paq = _paq || [];
const _paq = window._paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function () {
const u = "https://arsnova.thm.de/stats/";
_paq.push(['setTrackerUrl', u + 'piwik.php']);
_paq.push(['setTrackerUrl', u + 'matomo.php']);
_paq.push(['setSiteId', '4']);
const d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript';
g.async = true;
g.defer = true;
g.src = u + 'piwik.js';
g.src = u + 'matomo.js';
s.parentNode.insertBefore(g, s);
})();
})();
\ No newline at end of file
var _paq = _paq || [];
const _paq = window._paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function () {
const u = "https://arsnova.thm.de/stats/";
_paq.push(['setTrackerUrl', u + 'piwik.php']);
_paq.push(['setSiteId', '7']);
_paq.push(['setTrackerUrl', u + 'matomo.php']);
_paq.push(['setSiteId', '8']);
const d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript';
g.async = true;
g.defer = true;
g.src = u + 'piwik.js';
g.src = u + 'matomo.js';
s.parentNode.insertBefore(g, s);
})();
})();
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment