diff options
author | Simon Rettberg | 2016-01-19 17:33:23 +0100 |
---|---|---|
committer | Simon Rettberg | 2016-01-19 17:33:23 +0100 |
commit | 782cba04831c1e23e73f01d4856503744511e802 (patch) | |
tree | 38d444677dda63e5d720fc484e6ffb6137174c5c /dozentenmodulserver/src | |
parent | [server] Fill location info in LectureRead, set maxLocationsPerLecture to 4 (diff) | |
download | tutor-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.java | 7 | ||||
-rw-r--r-- | dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/VmChooserEntryXml.java | 5 |
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 { |