From ec0ff202ecb5af11875418a310e9f76484cee95f Mon Sep 17 00:00:00 2001 From: Daniel Gerhardt <daniel.gerhardt@mni.thm.de> Date: Mon, 19 May 2014 17:29:34 +0200 Subject: [PATCH] Add configuration option for answer option limit --- .../de/thm/arsnova/controller/ConfigurationController.java | 5 +++++ src/main/webapp/arsnova.properties.example | 3 +++ src/test/resources/arsnova.properties.example | 3 +++ 3 files changed, 11 insertions(+) diff --git a/src/main/java/de/thm/arsnova/controller/ConfigurationController.java b/src/main/java/de/thm/arsnova/controller/ConfigurationController.java index 560813c41..e69c6fd30 100644 --- a/src/main/java/de/thm/arsnova/controller/ConfigurationController.java +++ b/src/main/java/de/thm/arsnova/controller/ConfigurationController.java @@ -72,6 +72,9 @@ public class ConfigurationController extends AbstractController { @Value("${features.question-format.grid-square.enabled:false}") private String gridSquareEnabled; + @Value("${answerOptionLimit:8}") + private String answerOptionLimit; + @RequestMapping(value = { "/" }, method = RequestMethod.GET) @ResponseBody public final HashMap<String, Object> getConfiguration(HttpServletRequest request) { @@ -103,6 +106,8 @@ public class ConfigurationController extends AbstractController { config.put("privacyPolicyUrl", privacyPolicyUrl); } + config.put("answerOptionLimit", Integer.valueOf(answerOptionLimit)); + config.put("features", features); features.put("mathJax", "true".equals(mathJaxEnabled)); diff --git a/src/main/webapp/arsnova.properties.example b/src/main/webapp/arsnova.properties.example index 5a0bca244..7f398986a 100644 --- a/src/main/webapp/arsnova.properties.example +++ b/src/main/webapp/arsnova.properties.example @@ -63,6 +63,9 @@ feedback.cleanup=10 # maximal filesize in bytes upload.filesize_b=1048576 +# maximal number of answer options allowed for a skill question +question.answerOptionLimit=8 + couchdb.host=localhost couchdb.port=5984 couchdb.name=arsnova diff --git a/src/test/resources/arsnova.properties.example b/src/test/resources/arsnova.properties.example index 5a0bca244..7f398986a 100644 --- a/src/test/resources/arsnova.properties.example +++ b/src/test/resources/arsnova.properties.example @@ -63,6 +63,9 @@ feedback.cleanup=10 # maximal filesize in bytes upload.filesize_b=1048576 +# maximal number of answer options allowed for a skill question +question.answerOptionLimit=8 + couchdb.host=localhost couchdb.port=5984 couchdb.name=arsnova -- GitLab