diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamIndicatorsList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamIndicatorsList.java index 599824b1..24b16f87 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamIndicatorsList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamIndicatorsList.java @@ -57,6 +57,8 @@ public class ExamIndicatorsList implements TemplateComposer { new LocTextKey("sebserver.exam.indicator.list.pleaseSelect"); private static final LocTextKey INDICATOR_EMPTY_LIST_MESSAGE = new LocTextKey("sebserver.exam.indicator.list.empty"); + private static final LocTextKey CONFIRM_MESSAGE_REMOVE_INDICATOR = + new LocTextKey("sebserver.exam.indicator.list.delete.confirm"); private final PageService pageService; private final ResourceService resourceService; @@ -144,6 +146,7 @@ public class ExamIndicatorsList implements TemplateComposer { indicatorTable::getMultiSelection, this::deleteSelectedIndicator, INDICATOR_EMPTY_SELECTION_TEXT_KEY) + .withConfirm(() -> CONFIRM_MESSAGE_REMOVE_INDICATOR) .publishIf(() -> indicatorEnabled && !isLight && editable && indicatorTable.hasAnyContent(), false) .newAction(ActionDefinition.EXAM_INDICATOR_NEW) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/converter/RealNumberConverter.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/converter/RealNumberConverter.java index 982874b2..275ef83b 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/converter/RealNumberConverter.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/converter/RealNumberConverter.java @@ -32,11 +32,12 @@ import ch.ethz.seb.sebserver.webservice.servicelayer.sebconfig.AttributeValueCon @WebServiceProfile public class RealNumberConverter implements AttributeValueConverter { - private static final Logger log = LoggerFactory.getLogger(IntegerConverter.class); + private static final Logger log = LoggerFactory.getLogger(RealNumberConverter.class); public static final Set SUPPORTED_ATTR_NAMES = Utils.immutableSetOf( "defaultPageZoomLevel", - "defaultTextZoomLevel"); + "defaultTextZoomLevel", + "screenProctoringImageDownscale"); private static final String XML_TEMPLATE = "%s%s"; private static final String JSON_TEMPLATE = "\"%s\":%s"; @@ -89,6 +90,12 @@ public class RealNumberConverter implements AttributeValueConverter { realVal = 0; } + // NOTE: this is a special case for screenProctoringImageDownscale selector to get the selected real value + // from the selection-index instead using the index. See SEBSERV-527 + if ("screenProctoringImageDownscale".equals(attribute.name)) { + realVal = realVal / 10.0 + 1.0; + } + out.write(Utils.toByteArray(String.format( template, AttributeValueConverter.extractName(attribute), diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties index 434fdaee..8de1f7bd 100644 --- a/src/main/resources/messages.properties +++ b/src/main/resources/messages.properties @@ -709,6 +709,7 @@ sebserver.exam.indicator.list.column.thresholds=Thresholds sebserver.exam.indicator.list.column.thresholds.tooltip=The thresholds of the indicator sebserver.exam.indicator.list.empty=There is currently no indicator defined for this exam. Please create a new one sebserver.exam.indicator.list.pleaseSelect=At first please select an indicator from the list +sebserver.exam.indicator.list.delete.confirm=Are you sure to delete the selected Indicator from the Exam? sebserver.exam.clientgroup.list.actions=  sebserver.exam.clientgroup.list.title=Client Groups