update docker and fix quiz discovery filter

This commit is contained in:
anhefti 2019-09-12 16:40:28 +02:00
parent 3a0ac74bb9
commit 56d11b8e64
2 changed files with 8 additions and 4 deletions

View file

@ -32,7 +32,7 @@ services:
dockerfile: sebserver.Dockerfile dockerfile: sebserver.Dockerfile
args: args:
- GIT_TAG= - GIT_TAG=
- SEBSERVER_VERSION=0.4.1-beta-SNAPSHOT - SEBSERVER_VERSION=0.4.2-beta-SNAPSHOT
container_name: seb-server container_name: seb-server
volumes: volumes:

View file

@ -25,6 +25,7 @@ import ch.ethz.seb.sebserver.gbl.model.exam.QuizData;
import ch.ethz.seb.sebserver.gbl.model.institution.LmsSetup; import ch.ethz.seb.sebserver.gbl.model.institution.LmsSetup;
import ch.ethz.seb.sebserver.gbl.model.user.UserRole; import ch.ethz.seb.sebserver.gbl.model.user.UserRole;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile; import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gbl.util.Utils;
import ch.ethz.seb.sebserver.gui.content.action.ActionDefinition; import ch.ethz.seb.sebserver.gui.content.action.ActionDefinition;
import ch.ethz.seb.sebserver.gui.form.FormBuilder; import ch.ethz.seb.sebserver.gui.form.FormBuilder;
import ch.ethz.seb.sebserver.gui.service.ResourceService; import ch.ethz.seb.sebserver.gui.service.ResourceService;
@ -90,8 +91,6 @@ public class QuizDiscoveryList implements TemplateComposer {
private final TableFilterAttribute lmsFilter; private final TableFilterAttribute lmsFilter;
private final TableFilterAttribute nameFilter = private final TableFilterAttribute nameFilter =
new TableFilterAttribute(CriteriaType.TEXT, QuizData.FILTER_ATTR_NAME); new TableFilterAttribute(CriteriaType.TEXT, QuizData.FILTER_ATTR_NAME);
private final TableFilterAttribute startTimeFilter =
new TableFilterAttribute(CriteriaType.DATE, QuizData.FILTER_ATTR_START_TIME);
// dependencies // dependencies
private final WidgetFactory widgetFactory; private final WidgetFactory widgetFactory;
@ -175,7 +174,12 @@ public class QuizDiscoveryList implements TemplateComposer {
"sebserver.quizdiscovery.list.column.starttime", "sebserver.quizdiscovery.list.column.starttime",
i18nSupport.getUsersTimeZoneTitleSuffix()), i18nSupport.getUsersTimeZoneTitleSuffix()),
QuizData::getStartTime) QuizData::getStartTime)
.withFilter(this.startTimeFilter) .withFilter(new TableFilterAttribute(
CriteriaType.DATE,
QuizData.FILTER_ATTR_START_TIME,
Utils.toDateTimeUTC(Utils.getMillisecondsNow())
.minusYears(1)
.toString()))
.sortable()) .sortable())
.withColumn(new ColumnDefinition<>( .withColumn(new ColumnDefinition<>(