fix messages and remove started quiz check on import
This commit is contained in:
parent
7702a6649c
commit
e195007c82
8 changed files with 18 additions and 17 deletions
|
@ -47,6 +47,7 @@ management.endpoints.web.base-path=/actuator
|
||||||
management.endpoints.web.exposure.include=logfile,loggers
|
management.endpoints.web.exposure.include=logfile,loggers
|
||||||
|
|
||||||
# GUI server configuration
|
# GUI server configuration
|
||||||
|
sebserver.gui.external.messages=file:/sebserver/messages
|
||||||
sebserver.gui.entrypoint=/gui
|
sebserver.gui.entrypoint=/gui
|
||||||
sebserver.gui.webservice.protocol=http
|
sebserver.gui.webservice.protocol=http
|
||||||
sebserver.gui.webservice.address=${server.address}
|
sebserver.gui.webservice.address=${server.address}
|
||||||
|
|
|
@ -27,7 +27,6 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./application-demo.properties:/sebserver/application-demo.properties
|
- ./application-demo.properties:/sebserver/application-demo.properties
|
||||||
- ./messages_en.properties:/sebserver/messages_en.properties
|
- ./messages_en.properties:/sebserver/messages_en.properties
|
||||||
- ./messages.properties:/sebserver/messages.properties
|
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
- 9090:9090
|
- 9090:9090
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
|
|
|
@ -15,7 +15,6 @@ import javax.servlet.ServletException;
|
||||||
import org.eclipse.rap.rwt.engine.RWTServlet;
|
import org.eclipse.rap.rwt.engine.RWTServlet;
|
||||||
import org.eclipse.rap.rwt.engine.RWTServletContextListener;
|
import org.eclipse.rap.rwt.engine.RWTServletContextListener;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
||||||
import org.springframework.boot.web.servlet.ServletContextInitializer;
|
import org.springframework.boot.web.servlet.ServletContextInitializer;
|
||||||
import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
|
import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
|
||||||
import org.springframework.boot.web.servlet.ServletRegistrationBean;
|
import org.springframework.boot.web.servlet.ServletRegistrationBean;
|
||||||
|
@ -33,6 +32,9 @@ public class RAPSpringConfig {
|
||||||
@Value("${sebserver.gui.entrypoint}")
|
@Value("${sebserver.gui.entrypoint}")
|
||||||
private String entrypoint;
|
private String entrypoint;
|
||||||
|
|
||||||
|
@Value("${sebserver.gui.external.messages:messages}")
|
||||||
|
private String externalMessagesPath;
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public ServletContextInitializer initializer() {
|
public ServletContextInitializer initializer() {
|
||||||
return new RAPServletContextInitializer();
|
return new RAPServletContextInitializer();
|
||||||
|
@ -52,9 +54,15 @@ public class RAPSpringConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConfigurationProperties("spring.messages")
|
|
||||||
public MessageSource messageSource() {
|
public MessageSource messageSource() {
|
||||||
return new ReloadableResourceBundleMessageSource();
|
final ReloadableResourceBundleMessageSource reloadableResourceBundleMessageSource =
|
||||||
|
new ReloadableResourceBundleMessageSource();
|
||||||
|
|
||||||
|
reloadableResourceBundleMessageSource.setBasenames(
|
||||||
|
this.externalMessagesPath,
|
||||||
|
"classpath:messages");
|
||||||
|
|
||||||
|
return reloadableResourceBundleMessageSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class RAPServletContextInitializer implements ServletContextInitializer {
|
private static class RAPServletContextInitializer implements ServletContextInitializer {
|
||||||
|
|
|
@ -233,9 +233,9 @@ public class QuizDiscoveryList implements TemplateComposer {
|
||||||
action.getSingleSelection();
|
action.getSingleSelection();
|
||||||
final QuizData selectedROWData = table.getSelectedROWData();
|
final QuizData selectedROWData = table.getSelectedROWData();
|
||||||
|
|
||||||
if (selectedROWData.startTime != null) {
|
if (selectedROWData.endTime != null) {
|
||||||
final DateTime now = DateTime.now(DateTimeZone.UTC);
|
final DateTime now = DateTime.now(DateTimeZone.UTC);
|
||||||
if (selectedROWData.startTime.isBefore(now)) {
|
if (selectedROWData.endTime.isBefore(now)) {
|
||||||
throw new PageMessageException(NO_IMPORT_OF_OUT_DATED_QUIZ);
|
throw new PageMessageException(NO_IMPORT_OF_OUT_DATED_QUIZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,10 +25,12 @@
|
||||||
<Logger name="ch.ethz.seb.sebserver.gui" level="INFO" additivity="true" />
|
<Logger name="ch.ethz.seb.sebserver.gui" level="INFO" additivity="true" />
|
||||||
<Logger name="ch.ethz.seb.sebserver.webservice" level="INFO" additivity="true" />
|
<Logger name="ch.ethz.seb.sebserver.webservice" level="INFO" additivity="true" />
|
||||||
<Logger name="org.apache.ibatis.datasource" level="INFO" additivity="true" />
|
<Logger name="org.apache.ibatis.datasource" level="INFO" additivity="true" />
|
||||||
<Logger name="org.mybatis" level="DEBUG" additivity="true" />
|
<Logger name="org.mybatis" level="INFO" additivity="true" />
|
||||||
<Logger name="org.mybatis.generator" level="INFO" additivity="true" />
|
<Logger name="org.mybatis.generator" level="INFO" additivity="true" />
|
||||||
<Logger name="org.springframework.boot" level="INFO" additivity="true" />
|
<Logger name="org.springframework.boot" level="INFO" additivity="true" />
|
||||||
<Logger name="org.springframework.security" level="INFO" additivity="true" />
|
<Logger name="org.springframework.security" level="INFO" additivity="true" />
|
||||||
|
|
||||||
|
<Logger name="org.springframework.context.support.ResourceBundleMessageSource" level="DEBUG" additivity="true" />
|
||||||
|
|
||||||
<Logger name="org.springframework.web" level="INFO" additivity="true" />
|
<Logger name="org.springframework.web" level="INFO" additivity="true" />
|
||||||
<Logger name="org.springframework.security.oauth2" level="INFO" additivity="true" />
|
<Logger name="org.springframework.security.oauth2" level="INFO" additivity="true" />
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
################################
|
################################
|
||||||
|
|
||||||
sebserver.overall.version=SEB Server Version : {0}
|
sebserver.overall.version=SEB Server Version : {0}
|
||||||
sebserver.overall.imprint=
|
|
||||||
sebserver.overall.imprint.markup=
|
|
||||||
sebserver.overall.about=
|
|
||||||
sebserver.overall.about.markup=
|
|
||||||
sebserver.overall.help=Documentation
|
sebserver.overall.help=Documentation
|
||||||
sebserver.overall.help.link=https://www.safeexambrowser.org/news_en.html
|
sebserver.overall.help.link=https://www.safeexambrowser.org/news_en.html
|
||||||
|
|
||||||
|
@ -258,7 +254,7 @@ sebserver.quizdiscovery.info.pleaseSelect=Please Select a Quiz first
|
||||||
|
|
||||||
sebserver.quizdiscovery.action.list=Quiz Discovery
|
sebserver.quizdiscovery.action.list=Quiz Discovery
|
||||||
sebserver.quizdiscovery.action.import=Import as Exam
|
sebserver.quizdiscovery.action.import=Import as Exam
|
||||||
sebserver.quizdiscovery.quiz.import.out.dated=The Selected Quiz is in the past and can't be imported
|
sebserver.quizdiscovery.quiz.import.out.dated=The Selected Quiz is is already finished and can't be imported
|
||||||
sebserver.quizdiscovery.action.details=Show Details
|
sebserver.quizdiscovery.action.details=Show Details
|
||||||
|
|
||||||
sebserver.quizdiscovery.quiz.details.title=Quiz Details
|
sebserver.quizdiscovery.quiz.details.title=Quiz Details
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
################################
|
################################
|
||||||
|
|
||||||
sebserver.overall.version=SEB Server Version : {0}
|
sebserver.overall.version=SEB Server Version : {0}
|
||||||
sebserver.overall.imprint=
|
|
||||||
sebserver.overall.imprint.markup=
|
|
||||||
sebserver.overall.about=
|
|
||||||
sebserver.overall.about.markup=
|
|
||||||
sebserver.overall.help=Documentation
|
sebserver.overall.help=Documentation
|
||||||
sebserver.overall.help.link=https://www.safeexambrowser.org/news_en.html
|
sebserver.overall.help.link=https://www.safeexambrowser.org/news_en.html
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue