summaryrefslogtreecommitdiffstats
path: root/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java
diff options
context:
space:
mode:
authorSimon Rettberg2016-01-20 16:45:22 +0100
committerSimon Rettberg2016-01-20 16:45:22 +0100
commit7ab92261a2f55662d191165fef3ac69ed9aa6e07 (patch)
treec215d3baf4fb0261485bfc3487ba53f5a722d255 /dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java
parent[server] Add section entry to xml (diff)
downloadtutor-module-7ab92261a2f55662d191165fef3ac69ed9aa6e07.tar.gz
tutor-module-7ab92261a2f55662d191165fef3ac69ed9aa6e07.tar.xz
tutor-module-7ab92261a2f55662d191165fef3ac69ed9aa6e07.zip
[server] Don't use section strings, instead use flags for isTemplate and isForLocation
Diffstat (limited to 'dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java')
-rw-r--r--dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java15
1 files changed, 3 insertions, 12 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 cf057a39..2cc4ff48 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,21 +485,12 @@ 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, 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";
- }
+ boolean isTemplate = rs.getBoolean("istemplate");
+ int prio = 100;
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"), "", section));
+ rs.getString("osname"), "", isForThisLocation, isTemplate));
}
return list;
} catch (SQLException e) {