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
af9ea051
Commit
af9ea051
authored
10 years ago
by
Christoph Thelen
Browse files
Options
Downloads
Patches
Plain Diff
Fix import of public pool sessions
parent
c8026e83
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/de/thm/arsnova/entities/Session.java
+12
-0
12 additions, 0 deletions
src/main/java/de/thm/arsnova/entities/Session.java
src/main/java/de/thm/arsnova/entities/transport/ImportExportSession.java
+141
-0
141 additions, 0 deletions
...e/thm/arsnova/entities/transport/ImportExportSession.java
with
153 additions
and
0 deletions
src/main/java/de/thm/arsnova/entities/Session.java
+
12
−
0
View file @
af9ea051
...
...
@@ -71,6 +71,18 @@ public class Session implements Serializable {
copy
.
courseId
=
original
.
courseId
;
copy
.
creationTime
=
original
.
creationTime
;
copy
.
learningProgressType
=
original
.
learningProgressType
;
// public pool
copy
.
ppAuthorName
=
original
.
ppAuthorName
;
copy
.
ppAuthorMail
=
original
.
ppAuthorMail
;
copy
.
ppUniversity
=
original
.
ppUniversity
;
copy
.
ppLogo
=
original
.
ppLogo
;
copy
.
ppSubject
=
original
.
ppSubject
;
copy
.
ppLicense
=
original
.
ppLicense
;
copy
.
ppDescription
=
original
.
ppDescription
;
copy
.
ppFaculty
=
original
.
ppFaculty
;
copy
.
ppLevel
=
original
.
ppLevel
;
copy
.
sessionType
=
original
.
sessionType
;
copy
.
_id
=
original
.
_id
;
copy
.
_rev
=
original
.
_rev
;
return
copy
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/de/thm/arsnova/entities/transport/ImportExportSession.java
+
141
−
0
View file @
af9ea051
...
...
@@ -62,6 +62,24 @@ public class ImportExportSession {
s
.
setActive
(
session
.
isActive
());
s
.
setName
(
session
.
getName
());
s
.
setShortName
(
session
.
getShortName
());
// public pool
if
(
session
.
getPublicPool
()
!=
null
)
{
// overwrite name and shortname
s
.
setName
(
session
.
getPublicPool
().
getName
());
s
.
setShortName
(
session
.
getPublicPool
().
getShortName
());
// set pool fields
s
.
setPpAuthorMail
(
session
.
getPublicPool
().
getPpAuthorMail
());
s
.
setPpAuthorName
(
session
.
getPublicPool
().
getPpAuthorName
());
s
.
setPpDescription
(
session
.
getPublicPool
().
getPpDescription
());
s
.
setPpFaculty
(
session
.
getPublicPool
().
getPpFaculty
());
s
.
setPpLevel
(
session
.
getPublicPool
().
getPpLevel
());
s
.
setPpLicense
(
session
.
getPublicPool
().
getPpLicense
());
s
.
setPpLogo
(
session
.
getPublicPool
().
getPpLogo
());
s
.
setPpSubject
(
session
.
getPublicPool
().
getPpSubject
());
s
.
setPpUniversity
(
session
.
getPublicPool
().
getPpUniversity
());
// mark as public pool session
s
.
setSessionType
(
"public_pool"
);
}
// other fields
s
.
setType
(
"session"
);
s
.
setCreator
(
user
.
getUsername
());
...
...
@@ -90,6 +108,8 @@ public class ImportExportSession {
private
boolean
active
;
private
PublicPool
publicPool
;
public
String
getName
()
{
return
name
;
}
...
...
@@ -113,5 +133,126 @@ public class ImportExportSession {
public
void
setActive
(
boolean
active
)
{
this
.
active
=
active
;
}
public
PublicPool
getPublicPool
()
{
return
publicPool
;
}
public
void
setPublicPool
(
PublicPool
publicPool
)
{
this
.
publicPool
=
publicPool
;
}
}
public
static
class
PublicPool
{
private
String
ppAuthorName
;
private
String
ppAuthorMail
;
private
String
ppUniversity
;
private
String
ppLogo
;
private
String
ppSubject
;
private
String
ppLicense
;
private
String
ppLevel
;
private
String
ppDescription
;
private
String
ppFaculty
;
private
String
name
;
private
String
shortName
;
public
String
getPpAuthorName
()
{
return
ppAuthorName
;
}
public
void
setPpAuthorName
(
String
ppAuthorName
)
{
this
.
ppAuthorName
=
ppAuthorName
;
}
public
String
getPpAuthorMail
()
{
return
ppAuthorMail
;
}
public
void
setPpAuthorMail
(
String
ppAuthorMail
)
{
this
.
ppAuthorMail
=
ppAuthorMail
;
}
public
String
getPpUniversity
()
{
return
ppUniversity
;
}
public
void
setPpUniversity
(
String
ppUniversity
)
{
this
.
ppUniversity
=
ppUniversity
;
}
public
String
getPpLogo
()
{
return
ppLogo
;
}
public
void
setPpLogo
(
String
ppLogo
)
{
this
.
ppLogo
=
ppLogo
;
}
public
String
getPpSubject
()
{
return
ppSubject
;
}
public
void
setPpSubject
(
String
ppSubject
)
{
this
.
ppSubject
=
ppSubject
;
}
public
String
getPpLicense
()
{
return
ppLicense
;
}
public
void
setPpLicense
(
String
ppLicense
)
{
this
.
ppLicense
=
ppLicense
;
}
public
String
getPpLevel
()
{
return
ppLevel
;
}
public
void
setPpLevel
(
String
ppLevel
)
{
this
.
ppLevel
=
ppLevel
;
}
public
String
getPpDescription
()
{
return
ppDescription
;
}
public
void
setPpDescription
(
String
ppDescription
)
{
this
.
ppDescription
=
ppDescription
;
}
public
String
getPpFaculty
()
{
return
ppFaculty
;
}
public
void
setPpFaculty
(
String
ppFaculty
)
{
this
.
ppFaculty
=
ppFaculty
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getShortName
()
{
return
shortName
;
}
public
void
setShortName
(
String
shortName
)
{
this
.
shortName
=
shortName
;
}
}
}
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