summaryrefslogtreecommitdiffstats
path: root/dozentenmodulserver/src
diff options
context:
space:
mode:
authorSimon Rettberg2016-01-19 17:33:23 +0100
committerSimon Rettberg2016-01-19 17:33:23 +0100
commit782cba04831c1e23e73f01d4856503744511e802 (patch)
tree38d444677dda63e5d720fc484e6ffb6137174c5c /dozentenmodulserver/src
parent[server] Fill location info in LectureRead, set maxLocationsPerLecture to 4 (diff)
downloadtutor-module-782cba04831c1e23e73f01d4856503744511e802.tar.gz
tutor-module-782cba04831c1e23e73f01d4856503744511e802.tar.xz
tutor-module-782cba04831c1e23e73f01d4856503744511e802.zip
[server] Add section entry to xml
Diffstat (limited to 'dozentenmodulserver/src')
-rw-r--r--dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java7
-rw-r--r--dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/VmChooserEntryXml.java5
2 files changed, 9 insertions, 3 deletions
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java
index ace13b05..cf057a39 100644
--- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java
+++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java
@@ -485,18 +485,21 @@ public class DbLecture {
boolean isForThisLocation = rs.getString("loctest") != null;
if (!isForThisLocation && rs.getBoolean("islocationprivate"))
continue; // Is limited to location, and we're not in one of the required locations
- String prio;
+ String prio, section;
if (isForThisLocation) {
prio = "40";
+ section = "Speziell für diesen Raum";
} else if (rs.getBoolean("istemplate")) {
+ section = "Vorlagen";
prio = "60";
} else {
+ section = "Veranstaltungen";
prio = "80";
}
list.add(new VmChooserEntryXml(rs.getString("filepath"), prio, "-",
rs.getString("lecturename"), rs.getString("description"), rs.getString("lectureid"),
rs.getString("virtid"), rs.getString("virtname"), rs.getString("virtoskeyword"),
- rs.getString("osname"), ""));
+ rs.getString("osname"), "", section));
}
return list;
} catch (SQLException e) {
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/VmChooserEntryXml.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/VmChooserEntryXml.java
index fdf27653..dcfa8a66 100644
--- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/VmChooserEntryXml.java
+++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/VmChooserEntryXml.java
@@ -29,10 +29,12 @@ public class VmChooserEntryXml {
private VmChooserParamXml virtualizer_name;
@Element
private VmChooserParamXml os_name;
+ @Element
+ private VmChooserParamXml section;
public VmChooserEntryXml(String imageFilePath, String priority, String creator, String short_description,
String long_description, String uuid, String virtId, String virtualizerName, String osVirtName,
- String osDisplayName, String icon) {
+ String osDisplayName, String icon, String section) {
this.image_name = new VmChooserParamXml(imageFilePath);
this.priority = new VmChooserParamXml(priority);
this.creator = new VmChooserParamXml(creator);
@@ -44,6 +46,7 @@ public class VmChooserEntryXml {
this.icon = new VmChooserParamXml(icon);
this.virtualizer_name = new VmChooserParamXml(virtualizerName);
this.os_name = new VmChooserParamXml(osDisplayName);
+ this.section = new VmChooserParamXml(section);
}
private static class VmChooserParamXml {