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
bc1abc2b
Commit
bc1abc2b
authored
5 years ago
by
Lukas Mauß
Browse files
Options
Downloads
Patches
Plain Diff
Fix content choice creation
parent
4837ee58
1 merge request
!186
Resolve "Fix content creation"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/components/creator/content-choice-creator/content-choice-creator.component.ts
+7
-7
7 additions, 7 deletions
...ontent-choice-creator/content-choice-creator.component.ts
with
7 additions
and
7 deletions
src/app/components/creator/content-choice-creator/content-choice-creator.component.ts
+
7
−
7
View file @
bc1abc2b
...
@@ -138,6 +138,11 @@ export class ContentChoiceCreatorComponent implements OnInit {
...
@@ -138,6 +138,11 @@ export class ContentChoiceCreatorComponent implements OnInit {
}
}
saveChanges
(
index
:
number
,
answer
:
DisplayAnswer
,
matDialogOutput
:
boolean
)
{
saveChanges
(
index
:
number
,
answer
:
DisplayAnswer
,
matDialogOutput
:
boolean
)
{
if
(
this
.
singleChoice
)
{
for
(
const
option
of
this
.
content
.
options
)
{
option
.
points
=
-
10
;
}
}
this
.
content
.
options
[
index
].
label
=
answer
.
answerOption
.
label
;
this
.
content
.
options
[
index
].
label
=
answer
.
answerOption
.
label
;
this
.
content
.
options
[
index
].
points
=
(
answer
.
correct
)
?
10
:
-
10
;
this
.
content
.
options
[
index
].
points
=
(
answer
.
correct
)
?
10
:
-
10
;
const
indexInCorrectOptionIndexes
=
this
.
content
.
correctOptionIndexes
.
indexOf
(
index
);
const
indexInCorrectOptionIndexes
=
this
.
content
.
correctOptionIndexes
.
indexOf
(
index
);
...
@@ -238,13 +243,8 @@ export class ContentChoiceCreatorComponent implements OnInit {
...
@@ -238,13 +243,8 @@ export class ContentChoiceCreatorComponent implements OnInit {
});
});
return
;
return
;
}
}
if
(
this
.
singleChoice
)
{
this
.
content
.
multiple
=
!
this
.
singleChoice
;
this
.
content
.
multiple
=
false
;
this
.
content
.
format
=
ContentType
.
BINARY
;
this
.
content
.
format
=
ContentType
.
BINARY
;
}
else
{
this
.
content
.
multiple
=
true
;
this
.
content
.
format
=
ContentType
.
CHOICE
;
}
let
contentGroup
:
string
;
let
contentGroup
:
string
;
if
(
this
.
contentCol
===
'
Default
'
)
{
if
(
this
.
contentCol
===
'
Default
'
)
{
contentGroup
=
''
;
contentGroup
=
''
;
...
...
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