From c211f875e636935b0e808308500ee3cc2017aceb Mon Sep 17 00:00:00 2001 From: uhensler <urs.hensler@frentix.com> Date: Tue, 22 Jan 2019 08:52:39 +0100 Subject: [PATCH] OO-3828: Heatmap grouping "location" had never entries --- .../quality/analysis/ui/GroupByNameCache.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/org/olat/modules/quality/analysis/ui/GroupByNameCache.java b/src/main/java/org/olat/modules/quality/analysis/ui/GroupByNameCache.java index 2b46875d109..ea0d10d6950 100644 --- a/src/main/java/org/olat/modules/quality/analysis/ui/GroupByNameCache.java +++ b/src/main/java/org/olat/modules/quality/analysis/ui/GroupByNameCache.java @@ -60,6 +60,7 @@ class GroupByNameCache { private Map<String, String> groupNamesContextCurriculumElement; private Map<String, String> groupNamesContextCurriculumOrganisation; private Map<String, String> groupNamesContextTaxonomyLevel; + private Map<String, String> groupNamesContextLocation; private Map<String, String> groupNamesDataCollection; private Map<GroupBy, Map<String, String>> cache = new HashMap<>(); @@ -122,6 +123,8 @@ class GroupByNameCache { return loadContextCurriculumOrganisationGroupNames(); case CONTEXT_TAXONOMY_LEVEL: return loadContextTaxonomyLevelGroupNames(); + case CONTEXT_LOCATION: + return loadContextLocationGroupNames(); case DATA_COLLECTION: return loadDataCollectionGroupNames(); default: @@ -238,6 +241,17 @@ class GroupByNameCache { } return groupNamesContextTaxonomyLevel; } + + private Map<String, String> loadContextLocationGroupNames() { + groupNamesContextLocation = new HashMap<>(); + List<String> contextLocations = analysisService.loadContextLocations(searchParams); + for (String location: contextLocations) { + String key = location; + String value = location; + groupNamesContextLocation.put(key, value); + } + return groupNamesContextLocation; + } private Map<String, String> loadDataCollectionGroupNames() { groupNamesDataCollection = new HashMap<>(); -- GitLab