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

OO-2776: persists the default configuration in course element configuration...

OO-2776: persists the default configuration in course element configuration before switch auto / manual configuration
parent 8553c2da
No related branches found
No related tags found
No related merge requests found
......@@ -354,6 +354,7 @@ public class QTI21EditLayoutForm extends FormBasicController {
if(configEl.isOneSelected()) {
modConfig.setBooleanEntry(IQEditController.CONFIG_KEY_CONFIG_REF, configEl.isSelected(0));
if(configEl.isSelected(1)) {// manual configuration
persistConfiguration();
long maxTime = getMaxTimeLimit();
if(maxTime > 0) {
modConfig.setIntValue(IQEditController.CONFIG_KEY_TIME_LIMIT, (int)maxTime);
......@@ -375,6 +376,11 @@ public class QTI21EditLayoutForm extends FormBasicController {
@Override
protected void formOK(UserRequest ureq) {
persistConfiguration();
fireEvent(ureq, Event.DONE_EVENT);
}
protected void persistConfiguration() {
modConfig.setBooleanEntry(IQEditController.CONFIG_KEY_CONFIG_REF, configEl.isSelected(0));
modConfig.setBooleanEntry(IQEditController.CONFIG_FULLWINDOW, fullWindowEl.isSelected(0));
if(limitAttemptsEl.isSelected(0)) {
......@@ -418,7 +424,5 @@ public class QTI21EditLayoutForm extends FormBasicController {
} else {
modConfig.remove(IQEditController.CONFIG_KEY_TIME_LIMIT);
}
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