Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
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
Paul-Christian Volkmer
ARSnova Backend
Commits
998c5e97
Commit
998c5e97
authored
9 years ago
by
Tom Käsler
Browse files
Options
Downloads
Patches
Plain Diff
fix sessionFeature (move responsibility to session object)
parent
b51f5dc1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/de/thm/arsnova/dao/CouchDBDao.java
+0
-1
0 additions, 1 deletion
src/main/java/de/thm/arsnova/dao/CouchDBDao.java
src/main/java/de/thm/arsnova/entities/transport/ImportExportSession.java
+12
-2
12 additions, 2 deletions
...e/thm/arsnova/entities/transport/ImportExportSession.java
with
12 additions
and
3 deletions
src/main/java/de/thm/arsnova/dao/CouchDBDao.java
+
0
−
1
View file @
998c5e97
...
@@ -2108,7 +2108,6 @@ public class CouchDBDao implements IDatabaseDao, ApplicationEventPublisherAware
...
@@ -2108,7 +2108,6 @@ public class CouchDBDao implements IDatabaseDao, ApplicationEventPublisherAware
@Override
@Override
public
SessionInfo
importSession
(
User
user
,
ImportExportSession
importSession
)
{
public
SessionInfo
importSession
(
User
user
,
ImportExportSession
importSession
)
{
final
Session
session
=
this
.
saveSession
(
user
,
importSession
.
generateSessionEntity
(
user
));
final
Session
session
=
this
.
saveSession
(
user
,
importSession
.
generateSessionEntity
(
user
));
sessionService
.
changeSessionFeatures
(
session
.
getKeyword
(),
importSession
.
getSessionFeature
());
List
<
Document
>
questions
=
new
ArrayList
<
Document
>();
List
<
Document
>
questions
=
new
ArrayList
<
Document
>();
// We need to remember which answers belong to which question.
// We need to remember which answers belong to which question.
// The answers need a questionId, so we first store the questions to get the IDs.
// The answers need a questionId, so we first store the questions to get the IDs.
...
...
This diff is collapsed.
Click to expand it.
src/main/java/de/thm/arsnova/entities/transport/ImportExportSession.java
+
12
−
2
View file @
998c5e97
...
@@ -45,7 +45,7 @@ public class ImportExportSession {
...
@@ -45,7 +45,7 @@ public class ImportExportSession {
private
List
<
Motd
>
motds
;
private
List
<
Motd
>
motds
;
private
SessionFeature
sessionFeature
;
private
SessionFeature
sessionFeature
=
new
SessionFeature
()
;
private
SessionInfo
sessionInfo
;
private
SessionInfo
sessionInfo
;
...
@@ -53,7 +53,6 @@ public class ImportExportSession {
...
@@ -53,7 +53,6 @@ public class ImportExportSession {
questions
=
new
ArrayList
<
ImportExportQuestion
>();
questions
=
new
ArrayList
<
ImportExportQuestion
>();
feedbackQuestions
=
new
ArrayList
<
InterposedQuestion
>();
feedbackQuestions
=
new
ArrayList
<
InterposedQuestion
>();
motds
=
new
ArrayList
<
Motd
>();
motds
=
new
ArrayList
<
Motd
>();
sessionFeature
=
null
;
sessionInfo
=
null
;
sessionInfo
=
null
;
}
}
...
@@ -132,6 +131,7 @@ public class ImportExportSession {
...
@@ -132,6 +131,7 @@ public class ImportExportSession {
s
.
setActive
(
session
.
isActive
());
s
.
setActive
(
session
.
isActive
());
s
.
setName
(
session
.
getName
());
s
.
setName
(
session
.
getName
());
s
.
setShortName
(
session
.
getShortName
());
s
.
setShortName
(
session
.
getShortName
());
s
.
setFeatures
(
session
.
getSessionFeature
());
// public pool
// public pool
if
(
session
.
getPublicPool
()
!=
null
)
{
if
(
session
.
getPublicPool
()
!=
null
)
{
// overwrite name and shortname
// overwrite name and shortname
...
@@ -236,6 +236,8 @@ public class ImportExportSession {
...
@@ -236,6 +236,8 @@ public class ImportExportSession {
private
PublicPool
publicPool
;
private
PublicPool
publicPool
;
private
SessionFeature
sessionFeature
;
@ApiModelProperty
(
required
=
true
,
value
=
"used to display short name"
)
@ApiModelProperty
(
required
=
true
,
value
=
"used to display short name"
)
public
String
getName
()
{
public
String
getName
()
{
return
name
;
return
name
;
...
@@ -271,6 +273,14 @@ public class ImportExportSession {
...
@@ -271,6 +273,14 @@ public class ImportExportSession {
public
void
setPublicPool
(
PublicPool
publicPool
)
{
public
void
setPublicPool
(
PublicPool
publicPool
)
{
this
.
publicPool
=
publicPool
;
this
.
publicPool
=
publicPool
;
}
}
public
SessionFeature
getSessionFeature
()
{
return
this
.
sessionFeature
;
}
public
void
setSessionFeature
(
SessionFeature
sF
)
{
this
.
sessionFeature
=
sF
;
}
}
}
public
static
class
PublicPool
{
public
static
class
PublicPool
{
...
...
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