Commit 24af649a authored by Konstantin Schulz's avatar Konstantin Schulz
Browse files

disabled google analytics so CI can run on its own

parent eb5b0824
Pipeline #10761 failed with stage
in 3 minutes and 7 seconds
...@@ -17,9 +17,11 @@ RUN install -Dv /dev/null /run/nginx/nginx.pid ...@@ -17,9 +17,11 @@ RUN install -Dv /dev/null /run/nginx/nginx.pid
WORKDIR /home/mc/mc_frontend WORKDIR /home/mc/mc_frontend
# to get the version of the local CLI package, run: npm list @angular/cli | sed 's/[^0-9.]*//g' | sed -n 2p # to get the version of the local CLI package, run: npm list @angular/cli | sed 's/[^0-9.]*//g' | sed -n 2p
RUN npm i -g cordova && cordova telemetry off && npm i -g @ionic/cli && npm i -g @angular/cli RUN npm i -g cordova @ionic/cli @angular/cli
# automatically say 'yes' to any occurring prompts during installation, e.g. "participate in Google's telemetry?" RUN cordova telemetry off
RUN yes | npm install # this makes the analytics prompt during upcoming "npm install" disappear, so this can also run in CI
RUN ng analytics off
RUN npm install
# workaround to fix the missing binding issue for node-sass # workaround to fix the missing binding issue for node-sass
RUN npm rebuild node-sass RUN npm rebuild node-sass
# TODO: for some reason, this does not persist?!?!??! # TODO: for some reason, this does not persist?!?!??!
......
{ {
"name": "mc_frontend", "name": "mc_frontend",
"version": "1.6.7", "version": "1.6.8",
"author": "Ionic Framework", "author": "Ionic Framework",
"homepage": "https://ionicframework.com/", "homepage": "https://ionicframework.com/",
"scripts": { "scripts": {
......
...@@ -207,7 +207,6 @@ export class HelperService { ...@@ -207,7 +207,6 @@ export class HelperService {
static goToVocabularyCheckPage(navCtrl: NavController): Promise<boolean> { static goToVocabularyCheckPage(navCtrl: NavController): Promise<boolean> {
return new Promise<boolean>((resolve) => { return new Promise<boolean>((resolve) => {
navCtrl.navigateForward('/vocabulary-check').then((result: boolean) => { navCtrl.navigateForward('/vocabulary-check').then((result: boolean) => {
HelperService.isVocabularyCheck = true;
return resolve(result); return resolve(result);
}); });
}); });
......
...@@ -73,7 +73,8 @@ export class PreviewPage implements OnDestroy, OnInit { ...@@ -73,7 +73,8 @@ export class PreviewPage implements OnDestroy, OnInit {
// this will be called via GET request from the h5p standalone javascript library // this will be called via GET request from the h5p standalone javascript library
const url: string = `${configMC.backendBaseUrl + configMC.backendApiH5pPath}` + const url: string = `${configMC.backendBaseUrl + configMC.backendApiH5pPath}` +
`?eid=${this.corpusService.annisResponse.exercise_id}&lang=${this.translateService.currentLang + solutionIndicesString}`; `?eid=${this.corpusService.annisResponse.exercise_id}&lang=${this.translateService.currentLang + solutionIndicesString}`;
this.storage.set(configMC.localStorageKeyH5P, url).then(); // this has to be LocalStorage because the H5P javascript cannot easily access the Ionic Storage
window.localStorage.setItem(configMC.localStorageKeyH5P, url);
const exerciseTypePath: string = this.corpusService.exercise.type === ExerciseType.markWords ? 'mark_words' : 'drag_text'; const exerciseTypePath: string = this.corpusService.exercise.type === ExerciseType.markWords ? 'mark_words' : 'drag_text';
this.exerciseService.initH5P(exerciseTypePath); this.exerciseService.initH5P(exerciseTypePath);
this.updateFileUrl(); this.updateFileUrl();
......
...@@ -33,6 +33,7 @@ export class RankingPage { ...@@ -33,6 +33,7 @@ export class RankingPage {
const urnEnd: string = ar.nodes.slice(-1)[0].id.split('/')[1]; const urnEnd: string = ar.nodes.slice(-1)[0].id.split('/')[1];
this.corpusService.currentUrn = urnStart.concat('-', urnEnd.split(':').slice(-1)[0]); this.corpusService.currentUrn = urnStart.concat('-', urnEnd.split(':').slice(-1)[0]);
this.corpusService.processAnnisResponse(ar); this.corpusService.processAnnisResponse(ar);
HelperService.isVocabularyCheck = true;
HelperService.goToShowTextPage(this.navCtrl, true).then(); HelperService.goToShowTextPage(this.navCtrl, true).then();
}, async (error: HttpErrorResponse) => { }, async (error: HttpErrorResponse) => {
}); });
......
...@@ -248,20 +248,16 @@ export class TextRangePage implements OnInit { ...@@ -248,20 +248,16 @@ export class TextRangePage implements OnInit {
} }
HelperService.applicationState.pipe(take(1)).subscribe((state: ApplicationState) => { HelperService.applicationState.pipe(take(1)).subscribe((state: ApplicationState) => {
state.currentSetup.currentTextRange = tr; state.currentSetup.currentTextRange = tr;
state.currentSetup.currentUrn = this.corpusService.currentUrn; this.corpusService.isTextRangeCorrect = true;
state.mostRecentSetup = state.currentSetup; this.corpusService.getText().then(() => {
this.helperService.saveApplicationState(state).then(() => { if (skipText) {
this.corpusService.isTextRangeCorrect = true; HelperService.goToExerciseParametersPage(this.navCtrl).then();
this.corpusService.getText().then(() => { } else if (HelperService.isVocabularyCheck) {
if (skipText) { HelperService.goToVocabularyCheckPage(this.navCtrl).then();
HelperService.goToExerciseParametersPage(this.navCtrl).then(); } else {
} else if (HelperService.isVocabularyCheck) { HelperService.goToShowTextPage(this.navCtrl).then();
HelperService.goToVocabularyCheckPage(this.navCtrl).then(); }
} else { }, () => {
HelperService.goToShowTextPage(this.navCtrl).then();
}
}, () => {
});
}); });
}); });
}); });
......
Markdown is supported
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