diff --git a/package.json b/package.json index 83b983a65fb1512bec34ac32d5d841e38b2f1530..530bd9f4b6cab6c8b8d39ebbb3e779119a5141d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mc_frontend", - "version": "1.4.5", + "version": "1.4.8", "author": "Ionic Framework", "homepage": "https://ionicframework.com/", "scripts": { diff --git a/src/app/exercise-list/exercise-list.page.html b/src/app/exercise-list/exercise-list.page.html index 4ef241e59350e39927f136a7d378de9d89e37322..4bf6de2f43ad0eb21a7e0c7b8d465bde4bca1718 100644 --- a/src/app/exercise-list/exercise-list.page.html +++ b/src/app/exercise-list/exercise-list.page.html @@ -107,21 +107,21 @@ - + - + {{exercise.exercise_type_translation}} - + {{ getDateString(exercise.last_access_time) }} - + {{Math.round(exercise.text_complexity)}} - + {{getMatchingDegree(exercise)}} diff --git a/src/app/exercise-list/exercise-list.page.ts b/src/app/exercise-list/exercise-list.page.ts index c248b274293dd4f7f7f3bcb0859c6b02730e9913..7d80d0ed8c94bc344fc7aae6dec2136548c18b45 100644 --- a/src/app/exercise-list/exercise-list.page.ts +++ b/src/app/exercise-list/exercise-list.page.ts @@ -116,8 +116,8 @@ export class ExerciseListPage implements OnInit { const url: string = HelperService.config['backendBaseUrl'] + HelperService.config['backendApiExercisePath']; const params: HttpParams = new HttpParams().set('eid', exercise.eid); HelperService.makeGetRequest(this.http, this.toastCtrl, url, params).then((ar: AnnisResponse) => { - HelperService.mostRecentSetup.annisResponse = ar; - this.helperService.saveMostRecentSetup().then(); + // save this exercise only locally in the CorpusService (not as MostRecentSetup in the HelperService) because + // users just want to have a quick look at it this.corpusService.annisResponse = ar; const met: MoodleExerciseType = MoodleExerciseType[exercise.exercise_type]; this.corpusService.exercise.type = ExerciseType[met.toString()]; diff --git a/src/app/show-text/show-text.page.ts b/src/app/show-text/show-text.page.ts index ca8ef94607d370083c157781ca41be183518c792..629ed911a2e43f76e1af2111785d17f2527217af 100644 --- a/src/app/show-text/show-text.page.ts +++ b/src/app/show-text/show-text.page.ts @@ -1,12 +1,12 @@ /* tslint:disable:no-string-literal */ -import {Component} from '@angular/core'; +import {Component, OnInit} from '@angular/core'; import {NavController, ToastController} from '@ionic/angular'; import {CorpusService} from 'src/app/corpus.service'; import {VocabularyService} from 'src/app/vocabulary.service'; import {ExerciseService} from 'src/app/exercise.service'; import {HelperService} from 'src/app/helper.service'; import {TranslateService} from '@ngx-translate/core'; -import {FileType} from '../models/enum'; +import {FileType, VocabularyCorpus} from '../models/enum'; import {HttpClient} from '@angular/common/http'; @Component({ @@ -14,7 +14,7 @@ import {HttpClient} from '@angular/common/http'; templateUrl: './show-text.page.html', styleUrls: ['./show-text.page.scss'], }) -export class ShowTextPage { +export class ShowTextPage implements OnInit { FileType = FileType; HelperService = HelperService; ObjectKeys = Object.keys; @@ -93,4 +93,8 @@ export class ShowTextPage { } return ''; } + + ngOnInit(): void { + this.vocService.currentReferenceVocabulary = this.vocService.currentReferenceVocabulary || VocabularyCorpus.bws; + } }