SEBSERV-408 fixed cache issue
This commit is contained in:
parent
4ceaf50385
commit
eac6bccb5f
5 changed files with 19 additions and 9 deletions
|
@ -163,6 +163,11 @@ public class ExamFormConfigs implements TemplateComposer {
|
|||
.noEventPropagation()
|
||||
.publishIf(() -> examConfigEnabled && editable && !configurationTable.hasAnyContent())
|
||||
|
||||
.newAction(ActionDefinition.EXAM_CONFIGURATION_EXAM_CONFIG_VIEW_PROP)
|
||||
.withParentEntityKey(entityKey)
|
||||
.withEntityKey(configKey)
|
||||
.publishIf(() -> examConfigEnabled && readGrant && configurationTable.hasAnyContent(), false)
|
||||
|
||||
.newAction(ActionDefinition.EXAM_CONFIGURATION_MODIFY_FROM_LIST)
|
||||
.withParentEntityKey(entityKey)
|
||||
.withSelect(
|
||||
|
@ -172,11 +177,6 @@ public class ExamFormConfigs implements TemplateComposer {
|
|||
.noEventPropagation()
|
||||
.publishIf(() -> examConfigEnabled && editable && configurationTable.hasAnyContent(), false)
|
||||
|
||||
.newAction(ActionDefinition.EXAM_CONFIGURATION_EXAM_CONFIG_VIEW_PROP)
|
||||
.withParentEntityKey(entityKey)
|
||||
.withEntityKey(configKey)
|
||||
.publishIf(() -> examConfigEnabled && readGrant && configurationTable.hasAnyContent(), false)
|
||||
|
||||
.newAction(ActionDefinition.EXAM_CONFIGURATION_DELETE_FROM_LIST)
|
||||
.withEntityKey(entityKey)
|
||||
.withSelect(
|
||||
|
|
|
@ -216,7 +216,9 @@ public interface ExamDAO extends ActivatableEntityDAO<Exam, Exam>, BulkActionSup
|
|||
*
|
||||
* @param examId the Exam identifier */
|
||||
@CacheEvict(
|
||||
cacheNames = ExamSessionCacheService.CACHE_NAME_RUNNING_EXAM,
|
||||
cacheNames = {
|
||||
ExamSessionCacheService.CACHE_NAME_RUNNING_EXAM,
|
||||
ExamSessionCacheService.CACHE_NAME_SEB_CONFIG_EXAM },
|
||||
key = "#examId")
|
||||
void markUpdate(Long examId);
|
||||
|
||||
|
|
|
@ -10,11 +10,9 @@ package ch.ethz.seb.sebserver.webservice.servicelayer.session.impl;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.security.Principal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
|
|
@ -13,6 +13,8 @@ import java.util.List;
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.mybatis.dynamic.sql.SqlTable;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.validation.FieldError;
|
||||
|
@ -57,6 +59,8 @@ import ch.ethz.seb.sebserver.webservice.servicelayer.validation.BeanValidationSe
|
|||
@RequestMapping("${sebserver.webservice.api.admin.endpoint}" + API.EXAM_CONFIGURATION_MAP_ENDPOINT)
|
||||
public class ExamConfigurationMappingController extends EntityController<ExamConfigurationMap, ExamConfigurationMap> {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(ExamConfigurationMappingController.class);
|
||||
|
||||
private final ExamDAO examDao;
|
||||
private final ConfigurationNodeDAO configurationNodeDAO;
|
||||
private final ExamConfigUpdateService examConfigUpdateService;
|
||||
|
@ -139,6 +143,12 @@ public class ExamConfigurationMappingController extends EntityController<ExamCon
|
|||
.map(this::checkPasswordMatch);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Result<ExamConfigurationMap> notifySaved(final ExamConfigurationMap entity) {
|
||||
examDao.markUpdate(entity.examId);
|
||||
return super.notifySaved(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
|
|
|
@ -679,7 +679,7 @@ sebserver.exam.configuration.list.pleaseSelect=At first please select an exam co
|
|||
sebserver.exam.configuration.action.noconfig.message=There is currently no exam configuration to select.<br/>Please create one in Exam Configurations
|
||||
|
||||
sebserver.exam.configuration.action.list.new=Add Exam Configuration
|
||||
sebserver.exam.configuration.action.list.modify=Edit Exam Configuration
|
||||
sebserver.exam.configuration.action.list.modify=Edit Encryption Password
|
||||
sebserver.exam.configuration.action.list.view=View Exam Configuration
|
||||
sebserver.exam.configuration.action.list.delete=Remove Exam Configuration
|
||||
sebserver.exam.configuration.action.save=Save Exam Configuration
|
||||
|
|
Loading…
Reference in a new issue