Commit 7bda721f authored by Konstantin Schulz's avatar Konstantin Schulz
Browse files

exercise list: users now get exercises only for their currently specified language

parent c4f87720
{ {
"name": "mc_frontend", "name": "mc_frontend",
"version": "1.2.5", "version": "1.2.6",
"author": "Ionic Framework", "author": "Ionic Framework",
"homepage": "https://ionicframework.com/", "homepage": "https://ionicframework.com/",
"scripts": { "scripts": {
......
...@@ -53,7 +53,7 @@ export class ExerciseListPage implements OnInit { ...@@ -53,7 +53,7 @@ export class ExerciseListPage implements OnInit {
ngOnInit() { ngOnInit() {
const url: string = HelperService.config['backendBaseUrl'] + HelperService.config['backendApiExerciseListPath']; const url: string = HelperService.config['backendBaseUrl'] + HelperService.config['backendApiExerciseListPath'];
this.http.get(url).subscribe((exercises: ExerciseMC[]) => { this.http.get(url, {params: {lang: this.translateService.currentLang}}).subscribe((exercises: ExerciseMC[]) => {
this.availableExercises = exercises; this.availableExercises = exercises;
this.exercises = exercises; this.exercises = exercises;
this.exercises.forEach((exercise: ExerciseMC) => { this.exercises.forEach((exercise: ExerciseMC) => {
......
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