Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
callidus
mc_frontend
Commits
1f2e44d9
Commit
1f2e44d9
authored
May 10, 2019
by
Konstantin Schulz
Browse files
test module now offers review for every exercise after the test is finished
parent
63a19a6b
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
src/app/models/enum.ts
View file @
1f2e44d9
...
...
@@ -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
'
,
...
...
src/app/models/xAPI/Definition.ts
View file @
1f2e44d9
...
...
@@ -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
;
src/app/models/xAPI/Result.ts
View file @
1f2e44d9
...
...
@@ -4,6 +4,7 @@ import Score from "src/app/models/xAPI/Score";
interface
Result
{
duration
?:
string
;
extensions
?:
Extensions
;
response
?:
string
;
score
?:
Score
;
}
...
...
src/app/test/test.page.html
View file @
1f2e44d9
...
...
@@ -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"
>
...
...
src/app/test/test.page.ts
View file @
1f2e44d9
This diff is collapsed.
Click to expand it.
src/app/vocabulary.service.ts
View file @
1f2e44d9
...
...
@@ -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
S
cor
e
from
"
src/app/models/xAPI/S
cor
e
"
;
import
S
tatementBas
e
from
"
src/app/models/xAPI/S
tatementBas
e
"
;
@
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
]:
S
cor
e
}
=
[]
;
currentTestResults
:
{
[
exerciseIndex
:
number
]:
S
tatementBas
e
}
=
{}
;
// desiredMatchingPercentage: number = 50;
desiredSentenceCount
=
10
;
frequencyUpperBound
=
500
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment