Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Plan
Issues
27
Issue boards
Milestones
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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 Backend
Commits
0247140b
Commit
0247140b
authored
6 years ago
by
Daniel Gerhardt
Browse files
Options
Downloads
Patches
Plain Diff
Fix answer migration handling for serialization
The format for answers is now set based on the content's format.
parent
8f0ec8f5
Branches
Branches containing commit
No related merge requests found
Pipeline
#20469
passed with warnings with stages
Stage:
Stage:
Stage:
in 2 minutes and 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/thm/arsnova/model/migration/FromV2Migrator.java
+6
-2
6 additions, 2 deletions
...n/java/de/thm/arsnova/model/migration/FromV2Migrator.java
with
6 additions
and
2 deletions
src/main/java/de/thm/arsnova/model/migration/FromV2Migrator.java
+
6
−
2
View file @
0247140b
...
@@ -229,12 +229,16 @@ public class FromV2Migrator {
...
@@ -229,12 +229,16 @@ public class FromV2Migrator {
}
}
public
de
.
thm
.
arsnova
.
model
.
Answer
migrate
(
final
Answer
from
,
final
de
.
thm
.
arsnova
.
model
.
Content
content
)
{
public
de
.
thm
.
arsnova
.
model
.
Answer
migrate
(
final
Answer
from
,
final
de
.
thm
.
arsnova
.
model
.
Content
content
)
{
de
.
thm
.
arsnova
.
model
.
Answer
answer
;
if
(
content
instanceof
ChoiceQuestionContent
)
{
if
(
content
instanceof
ChoiceQuestionContent
)
{
ChoiceQuestionContent
choiceQuestionContent
=
(
ChoiceQuestionContent
)
content
;
ChoiceQuestionContent
choiceQuestionContent
=
(
ChoiceQuestionContent
)
content
;
return
migrate
(
from
,
choiceQuestionContent
.
getOptions
(),
choiceQuestionContent
.
isMultiple
());
answer
=
migrate
(
from
,
choiceQuestionContent
.
getOptions
(),
choiceQuestionContent
.
isMultiple
());
}
else
{
}
else
{
return
migrate
(
from
);
answer
=
migrate
(
from
);
}
}
answer
.
setFormat
(
content
.
getFormat
());
return
answer
;
}
}
public
ChoiceAnswer
migrate
(
final
Answer
from
,
final
List
<
ChoiceQuestionContent
.
AnswerOption
>
options
,
final
boolean
multiple
)
{
public
ChoiceAnswer
migrate
(
final
Answer
from
,
final
List
<
ChoiceQuestionContent
.
AnswerOption
>
options
,
final
boolean
multiple
)
{
...
...
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