diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/admin/UserAccountList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/admin/UserAccountList.java index 78be8811..6d499537 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/admin/UserAccountList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/admin/UserAccountList.java @@ -150,7 +150,7 @@ public class UserAccountList implements TemplateComposer { restService.getRestCall(GetUserAccountPage.class)) .withEmptyMessage(EMPTY_TEXT_KEY) .withPaging(this.pageSize) - .withDefaultSort(isSEBAdmin ? Domain.USER.ATTR_INSTITUTION_ID : Domain.USER.ATTR_NAME) + .withDefaultSort(Domain.USER.ATTR_NAME) .withColumnIf( () -> isSEBAdmin && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), () -> new ColumnDefinition<>( diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/admin/UserActivityLogs.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/admin/UserActivityLogs.java index 068ea3d0..18e7daaf 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/admin/UserActivityLogs.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/admin/UserActivityLogs.java @@ -194,7 +194,9 @@ public class UserActivityLogs implements TemplateComposer { ? UserActivityLog.FILTER_ATTR_INSTITUTION : UserActivityLog.ATTR_USER_NAME) .withColumnIf( - () -> isSEBAdmin.getAsBoolean() && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), + () -> isSEBAdmin.getAsBoolean() + && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) + && !pageService.isSEBServerLightSetup(), () -> new ColumnDefinition<>( UserActivityLog.FILTER_ATTR_INSTITUTION, INSTITUTION_TEXT_KEY, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/ConfigTemplateList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/ConfigTemplateList.java index 5fe9a07d..a2f68b82 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/ConfigTemplateList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/ConfigTemplateList.java @@ -119,9 +119,7 @@ public class ConfigTemplateList implements TemplateComposer { ConfigurationType.TEMPLATE.name()) .withEmptyMessage(EMPTY_TEMPLATE_LIST_TEXT_KEY) .withPaging(this.pageSize) - .withDefaultSort(isSEBAdmin && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) - ? Domain.LMS_SETUP.ATTR_INSTITUTION_ID - : Domain.CONFIGURATION_NODE.ATTR_NAME) + .withDefaultSort(Domain.CONFIGURATION_NODE.ATTR_NAME) .withColumnIf( () -> isSEBAdmin && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), () -> new ColumnDefinition<>( diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/SEBClientConfigList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/SEBClientConfigList.java index 19018e09..afae6f33 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/SEBClientConfigList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/SEBClientConfigList.java @@ -125,11 +125,11 @@ public class SEBClientConfigList implements TemplateComposer { this.pageService.entityTableBuilder(this.restService.getRestCall(GetClientConfigPage.class)) .withEmptyMessage(EMPTY_LIST_TEXT_KEY) .withPaging(this.pageSize) - .withDefaultSort(isSEBAdmin - ? Domain.LMS_SETUP.ATTR_INSTITUTION_ID - : Domain.SEB_CLIENT_CONFIGURATION.ATTR_NAME) + .withDefaultSort(Domain.SEB_CLIENT_CONFIGURATION.ATTR_NAME) .withColumnIf( - () -> isSEBAdmin && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), + () -> isSEBAdmin + && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) + && !pageService.isSEBServerLightSetup(), () -> new ColumnDefinition<>( Domain.LMS_SETUP.ATTR_INSTITUTION_ID, INSTITUTION_TEXT_KEY, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/SEBExamConfigList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/SEBExamConfigList.java index 55e69c8d..674f7c6f 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/SEBExamConfigList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/SEBExamConfigList.java @@ -142,11 +142,11 @@ public class SEBExamConfigList implements TemplateComposer { ConfigurationType.EXAM_CONFIG.name()) .withEmptyMessage(EMPTY_CONFIG_LIST_TEXT_KEY) .withPaging(this.pageSize) - .withDefaultSort(isSEBAdmin && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) - ? Domain.LMS_SETUP.ATTR_INSTITUTION_ID - : Domain.CONFIGURATION_NODE.ATTR_NAME) + .withDefaultSort(Domain.CONFIGURATION_NODE.ATTR_NAME) .withColumnIf( - () -> isSEBAdmin && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), + () -> isSEBAdmin + && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) + && !pageService.isSEBServerLightSetup(), () -> new ColumnDefinition<>( Domain.LMS_SETUP.ATTR_INSTITUTION_ID, INSTITUTION_TEXT_KEY, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamList.java index 532d437a..3f31b036 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamList.java @@ -172,12 +172,12 @@ public class ExamList implements TemplateComposer { .withPaging(this.pageSize) .withRowDecorator(decorateOnExamConsistency(this.pageService)) .withStaticFilter(Exam.FILTER_ATTR_ACTIVE, Constants.TRUE_STRING) - .withDefaultSort(isSEBAdmin.getAsBoolean() && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) - ? Domain.EXAM.ATTR_INSTITUTION_ID - : Domain.EXAM.ATTR_LMS_SETUP_ID) + .withDefaultSort(Domain.EXAM.ATTR_QUIZ_NAME) .withColumnIf( - () -> isSEBAdmin.getAsBoolean() && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), + () -> isSEBAdmin.getAsBoolean() + && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) + && !pageService.isSEBServerLightSetup(), () -> new ColumnDefinition( Domain.EXAM.ATTR_INSTITUTION_ID, COLUMN_TITLE_INSTITUTION_KEY, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamTemplateList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamTemplateList.java index 11576792..de0eab47 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamTemplateList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamTemplateList.java @@ -135,12 +135,11 @@ public class ExamTemplateList implements TemplateComposer { this.pageService.entityTableBuilder(restService.getRestCall(GetExamTemplatePage.class)) .withEmptyMessage(EMPTY_LIST_TEXT_KEY) .withPaging(this.pageSize) - .withDefaultSort(isSEBAdmin.getAsBoolean() && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) - ? Domain.EXAM_TEMPLATE.ATTR_INSTITUTION_ID - : Domain.EXAM_TEMPLATE.ATTR_NAME) + .withDefaultSort(Domain.EXAM_TEMPLATE.ATTR_NAME) .withColumnIf( - () -> isSEBAdmin.getAsBoolean() && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), + () -> isSEBAdmin.getAsBoolean() + && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), () -> new ColumnDefinition( Domain.EXAM_TEMPLATE.ATTR_INSTITUTION_ID, COLUMN_TITLE_INSTITUTION_KEY, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/LmsSetupList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/LmsSetupList.java index 0c2c525d..0abf4126 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/LmsSetupList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/LmsSetupList.java @@ -124,11 +124,11 @@ public class LmsSetupList implements TemplateComposer { this.pageService.entityTableBuilder(restService.getRestCall(GetLmsSetupPage.class)) .withEmptyMessage(EMPTY_LIST_TEXT_KEY) .withPaging(this.pageSize) - .withDefaultSort(isSEBAdmin && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) - ? Domain.LMS_SETUP.ATTR_INSTITUTION_ID - : Domain.LMS_SETUP.ATTR_NAME) + .withDefaultSort(Domain.LMS_SETUP.ATTR_NAME) .withColumnIf( - () -> !isLight && isSEBAdmin && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), + () -> !isLight + && isSEBAdmin + && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), () -> new ColumnDefinition<>( Domain.LMS_SETUP.ATTR_INSTITUTION_ID, INSTITUTION_TEXT_KEY, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/QuizLookupList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/QuizLookupList.java index b297e400..89a63ff6 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/QuizLookupList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/QuizLookupList.java @@ -193,7 +193,9 @@ public class QuizLookupList implements TemplateComposer { .withPaging(this.pageSize) .withColumnIf( - () -> isSEBAdmin.getAsBoolean() && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), + () -> isSEBAdmin.getAsBoolean() + && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) + && !pageService.isSEBServerLightSetup(), () -> new ColumnDefinition( QuizData.QUIZ_ATTR_INSTITUTION_ID, INSTITUTION_TEXT_KEY,