Commit 1f2e44d9 authored by Konstantin Schulz's avatar Konstantin Schulz
Browse files

test module now offers review for every exercise after the test is finished

parent 63a19a6b
......@@ -168,6 +168,12 @@ export enum PhenomenonTranslation {
partOfSpeech = <any>'PHENOMENON_PART_OF_SPEECH',
}
export enum TestModuleState {
inProgress = <any>'inProgress',
showResults = <any>'showResults',
showSolutions = <any>'showSolutions',
}
export enum TestType {
cloze = <any>'cloze',
list = <any>'list',
......
......@@ -2,11 +2,14 @@ import Extensions from './Extensions';
import LanguageMap from './LanguageMap';
interface Definition {
readonly name?: LanguageMap;
readonly description?: LanguageMap;
readonly extensions?: Extensions;
readonly type?: string;
readonly moreInfo?: string;
readonly name?: LanguageMap;
readonly description?: LanguageMap;
readonly extensions?: Extensions;
readonly type?: string;
readonly moreInfo?: string;
readonly choices?: { description: LanguageMap, id: string }[];
readonly correctResponsesPattern?: string[];
readonly interactionType?: string;
}
export default Definition;
......@@ -4,6 +4,7 @@ import Score from "src/app/models/xAPI/Score";
interface Result {
duration?: string;
extensions?: Extensions;
response?: string;
score?: Score;
}
......
......@@ -15,18 +15,19 @@
<ion-content padding>
<ion-grid>
<ion-row>
<!-- Comment out the *ngIf condition for easy navigation during development -->
<ion-row *ngIf="currentState !== TestModuleState.inProgress">
<ion-col>
<ion-label>{{ 'TEST_MODULE_GO_TO_EXERCISE' | translate}}</ion-label>
<ion-select (ionChange)="showNextExercise(+selectedExerciseIndex -1)"
[(ngModel)]="selectedExerciseIndex" name="selectedExerciseIndex">
<ion-select [(ngModel)]="selectedExerciseIndex" name="selectedExerciseIndex"
(ionChange)="reviewOldExercise(+selectedExerciseIndex - 1)">
<ion-select-option *ngFor="let number of Array.from(Array(getExerciseCount()).keys())">
{{number + 1}}
</ion-select-option>
</ion-select>
</ion-col>
</ion-row>
<ion-row *ngIf="!results?.length">
<ion-row *ngIf="currentState == TestModuleState.inProgress">
<ion-col>
<ion-label>{{ 'TEST_MODULE_PROGRESS_PART' | translate }} {{getCurrentExercisePartIndex() + 1}}</ion-label>
<ion-progress-bar value="{{progressBarValue}}"></ion-progress-bar>
......@@ -109,10 +110,8 @@
<div class="h5p-container"></div>
</ion-col>
</ion-row>
<a id="evaluateNgIf"></a>
<!-- step 6: show results -->
<div *ngIf="results?.length">
<div *ngIf="currentState == TestModuleState.showResults">
<ion-row>
<ion-col>
<ion-card>
......@@ -151,8 +150,10 @@
</ion-row>
</div>
</ion-grid>
<!-- Do not delete this! It is necessary to refresh the UI. -->
<a id="refreshUI"></a>
</ion-content>
<ion-footer *ngIf="results?.length">
<ion-footer *ngIf="currentState != TestModuleState.inProgress">
<ion-toolbar>
<ion-tabs>
<ion-tab-bar slot="bottom">
......
This diff is collapsed.
......@@ -4,7 +4,7 @@ import {VocabularyCorpus} from 'src/app/models/enum';
import {Vocabulary} from 'src/app/models/vocabulary';
import {Sentence} from 'src/app/models/sentence';
import {HelperService} from 'src/app/helper.service';
import Score from "src/app/models/xAPI/Score";
import StatementBase from "src/app/models/xAPI/StatementBase";
@Injectable({
providedIn: 'root'
......@@ -12,7 +12,7 @@ import Score from "src/app/models/xAPI/Score";
export class VocabularyService {
currentReferenceVocabulary: VocabularyCorpus = VocabularyCorpus.bws;
currentSentences: Sentence[] = [];
currentTestResults: { [exerciseIndex: number]: Score } = [];
currentTestResults: { [exerciseIndex: number]: StatementBase } = {};
// desiredMatchingPercentage: number = 50;
desiredSentenceCount = 10;
frequencyUpperBound = 500;
......
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