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

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
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
RUN npm i -g cordova && cordova telemetry off && npm i -g @ionic/cli && npm i -g @angular/cli
# automatically say 'yes' to any occurring prompts during installation, e.g. "participate in Google's telemetry?"
RUN yes | npm install
RUN npm i -g cordova @ionic/cli @angular/cli
RUN cordova telemetry off
# 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
RUN npm rebuild node-sass
# TODO: for some reason, this does not persist?!?!??!
......
{
"name": "mc_frontend",
"version": "1.6.7",
"version": "1.6.8",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
......
......@@ -207,7 +207,6 @@ export class HelperService {
static goToVocabularyCheckPage(navCtrl: NavController): Promise<boolean> {
return new Promise<boolean>((resolve) => {
navCtrl.navigateForward('/vocabulary-check').then((result: boolean) => {
HelperService.isVocabularyCheck = true;
return resolve(result);
});
});
......
......@@ -73,7 +73,8 @@ export class PreviewPage implements OnDestroy, OnInit {
// this will be called via GET request from the h5p standalone javascript library
const url: string = `${configMC.backendBaseUrl + configMC.backendApiH5pPath}` +
`?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';
this.exerciseService.initH5P(exerciseTypePath);
this.updateFileUrl();
......
......@@ -33,6 +33,7 @@ export class RankingPage {
const urnEnd: string = ar.nodes.slice(-1)[0].id.split('/')[1];
this.corpusService.currentUrn = urnStart.concat('-', urnEnd.split(':').slice(-1)[0]);
this.corpusService.processAnnisResponse(ar);
HelperService.isVocabularyCheck = true;
HelperService.goToShowTextPage(this.navCtrl, true).then();
}, async (error: HttpErrorResponse) => {
});
......
......@@ -248,20 +248,16 @@ export class TextRangePage implements OnInit {
}
HelperService.applicationState.pipe(take(1)).subscribe((state: ApplicationState) => {
state.currentSetup.currentTextRange = tr;
state.currentSetup.currentUrn = this.corpusService.currentUrn;
state.mostRecentSetup = state.currentSetup;
this.helperService.saveApplicationState(state).then(() => {
this.corpusService.isTextRangeCorrect = true;
this.corpusService.getText().then(() => {
if (skipText) {
HelperService.goToExerciseParametersPage(this.navCtrl).then();
} else if (HelperService.isVocabularyCheck) {
HelperService.goToVocabularyCheckPage(this.navCtrl).then();
} else {
HelperService.goToShowTextPage(this.navCtrl).then();
}
}, () => {
});
this.corpusService.isTextRangeCorrect = true;
this.corpusService.getText().then(() => {
if (skipText) {
HelperService.goToExerciseParametersPage(this.navCtrl).then();
} else if (HelperService.isVocabularyCheck) {
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