Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arsnova-lite
Manage
Activity
Members
Labels
Plan
Issues
24
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
ARSnova
arsnova-lite
Commits
71bdea69
Commit
71bdea69
authored
6 years ago
by
Lukas Mauß
Browse files
Options
Downloads
Patches
Plain Diff
Implement skeleton for switch-bar-colors
parent
38d5f7bd
1 merge request
!138
Resolve "Refine answer statistics"
Pipeline
#23759
passed with stages
in 3 minutes and 17 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/components/shared/statistic/statistic.component.ts
+19
-0
19 additions, 0 deletions
src/app/components/shared/statistic/statistic.component.ts
with
19 additions
and
0 deletions
src/app/components/shared/statistic/statistic.component.ts
+
19
−
0
View file @
71bdea69
...
...
@@ -35,6 +35,8 @@ export class StatisticComponent implements OnInit {
subject
:
string
;
maxLength
:
number
;
isLoading
=
true
;
showsCorrect
=
false
;
correctIndexes
:
number
[];
constructor
(
protected
route
:
ActivatedRoute
,
private
contentService
:
ContentService
,
...
...
@@ -50,6 +52,7 @@ export class StatisticComponent implements OnInit {
this
.
labels
=
new
Array
<
string
>
();
this
.
answerList
=
new
Array
<
AnswerList
>
();
this
.
data
=
new
Array
<
number
>
();
this
.
correctIndexes
=
new
Array
<
number
>
();
this
.
route
.
params
.
subscribe
(
params
=>
{
this
.
contentId
=
params
[
'
contentId
'
];
});
...
...
@@ -59,6 +62,22 @@ export class StatisticComponent implements OnInit {
});
}
switchAnswers
()
{
if
(
this
.
showsCorrect
===
false
)
{
this
.
showCorrect
();
}
else
{
this
.
showNormal
();
}
}
showCorrect
()
{
this
.
showsCorrect
=
true
;
}
showNormal
()
{
this
.
showsCorrect
=
false
;
}
getData
(
content
:
ContentChoice
)
{
this
.
subject
=
content
.
subject
;
const
length
=
content
.
options
.
length
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment