Skip to content
Snippets Groups Projects
Commit aa294d09 authored by srosse's avatar srosse
Browse files

OO-4593: only save the number of user in high score if option selected

parent e8bcdaec
No related branches found
No related tags found
No related merge requests found
......@@ -267,8 +267,13 @@ public class HighScoreEditController extends FormBasicController {
config.set(CONFIG_KEY_DATESTART, dateStart.getDate());
config.set(CONFIG_KEY_ANONYMIZE, displayAnonymous.isSelected(0));
if (showListing.isSelected(0)) {
config.set(CONFIG_KEY_BESTONLY, bestOnlyEl.getSelected());
config.set(CONFIG_KEY_NUMUSER, numTableRows.getIntValue());
int bestOnly = bestOnlyEl.getSelected();
config.set(CONFIG_KEY_BESTONLY, bestOnly);
if(bestOnly == 1) {
config.set(CONFIG_KEY_NUMUSER, numTableRows.getIntValue());
} else {
config.remove(CONFIG_KEY_NUMUSER);
}
}
fireEvent(ureq, Event.DONE_EVENT);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment