Skip to content
Snippets Groups Projects
Commit a4bb697f authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Add configuration property to enable/disable parseing of answer options

parent 158e6965
No related merge requests found
...@@ -72,9 +72,12 @@ public class ConfigurationController extends AbstractController { ...@@ -72,9 +72,12 @@ public class ConfigurationController extends AbstractController {
@Value("${features.question-format.grid-square.enabled:false}") @Value("${features.question-format.grid-square.enabled:false}")
private String gridSquareEnabled; private String gridSquareEnabled;
@Value("${answerOptionLimit:8}") @Value("${question.answerOptionLimit:8}")
private String answerOptionLimit; private String answerOptionLimit;
@Value("${question.parse-answer-option-formatting:false}")
private String parseAnswerOptionFormatting;
@RequestMapping(value = { "/" }, method = RequestMethod.GET) @RequestMapping(value = { "/" }, method = RequestMethod.GET)
@ResponseBody @ResponseBody
public final HashMap<String, Object> getConfiguration(HttpServletRequest request) { public final HashMap<String, Object> getConfiguration(HttpServletRequest request) {
...@@ -107,6 +110,7 @@ public class ConfigurationController extends AbstractController { ...@@ -107,6 +110,7 @@ public class ConfigurationController extends AbstractController {
} }
config.put("answerOptionLimit", Integer.valueOf(answerOptionLimit)); config.put("answerOptionLimit", Integer.valueOf(answerOptionLimit));
config.put("parseAnswerOptionFormatting", Boolean.valueOf(parseAnswerOptionFormatting));
config.put("features", features); config.put("features", features);
......
...@@ -66,6 +66,11 @@ upload.filesize_b=1048576 ...@@ -66,6 +66,11 @@ upload.filesize_b=1048576
# maximal number of answer options allowed for a skill question # maximal number of answer options allowed for a skill question
question.answerOptionLimit=8 question.answerOptionLimit=8
# Enable Markdown and MathJax parsing in answer options. Formatting in answer options should
# be used cautiously since it could lead to display errors. Answer options will still not
# be parsed in diagrams. This setting has no effect if neither MathJax nor Markdown are enabled.
question.parse-answer-option-formatting=false
couchdb.host=localhost couchdb.host=localhost
couchdb.port=5984 couchdb.port=5984
couchdb.name=arsnova couchdb.name=arsnova
......
...@@ -66,6 +66,11 @@ upload.filesize_b=1048576 ...@@ -66,6 +66,11 @@ upload.filesize_b=1048576
# maximal number of answer options allowed for a skill question # maximal number of answer options allowed for a skill question
question.answerOptionLimit=8 question.answerOptionLimit=8
# Enable Markdown and MathJax parsing in answer options. Formatting in answer options should
# be used cautiously since it could lead to display errors. Answer options will still not
# be parsed in diagrams. This setting has no effect if neither MathJax nor Markdown are enabled.
question.parse-answer-option-formatting=false
couchdb.host=localhost couchdb.host=localhost
couchdb.port=5984 couchdb.port=5984
couchdb.name=arsnova couchdb.name=arsnova
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment