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

Merge OpenOLAT 10.4 to OpenOLAT default branch with b8f300baec759056b863ac3e7c30db90b22a5b14

parents 91a5b1e1 cc5bd355
No related branches found
No related tags found
No related merge requests found
......@@ -105,14 +105,14 @@ public class ChooseColumnsStepForm extends StepFormBasicController {
userNameColumnEl = uifactory.addDropdownSingleselect("table.header.identifier", choosersCont, usernameKeys, usernameValues, null);
if(columnsSettings != null && columnsSettings.getUsernameColumn() < usernameKeys.length) {
userNameColumnEl.select(getSelectedKey(pos++, columnsSettings.getUsernameColumn(), usernameKeys), true);
} else {
} else if(usernameKeys.length > 0){
userNameColumnEl.select(usernameKeys[Math.min(pos++, usernameKeys.length - 1)], true);
}
if(settings.isHasScore()) {
scoreColumnEl = uifactory.addDropdownSingleselect("table.header.score", choosersCont, otherKeys, otherValues, null);
if(columnsSettings != null && columnsSettings.getScoreColumn() < otherKeys.length) {
scoreColumnEl.select(getSelectedKey(pos++, columnsSettings.getScoreColumn(), otherKeys), true);
} else {
} else if(otherKeys.length > 0) {
scoreColumnEl.select(otherKeys[Math.min(pos++, otherKeys.length - 1)], true);
}
}
......@@ -120,7 +120,7 @@ public class ChooseColumnsStepForm extends StepFormBasicController {
passedColumnEl = uifactory.addDropdownSingleselect("table.header.passed", choosersCont, otherKeys, otherValues, null);
if(columnsSettings != null && columnsSettings.getPassedColumn() < otherKeys.length) {
passedColumnEl.select(getSelectedKey(pos++, columnsSettings.getPassedColumn(), otherKeys), true);
} else {
} else if(otherKeys.length > 0) {
passedColumnEl.select(otherKeys[Math.min(pos++, otherKeys.length - 1)], true);
}
}
......@@ -128,7 +128,7 @@ public class ChooseColumnsStepForm extends StepFormBasicController {
commentColumnEl = uifactory.addDropdownSingleselect("table.header.comment", choosersCont, otherKeys, otherValues, null);
if(columnsSettings != null && columnsSettings.getCommentColumn() < otherKeys.length) {
commentColumnEl.select(getSelectedKey(pos++, columnsSettings.getCommentColumn(), otherKeys), true);
} else {
} else if(otherKeys.length > 0) {
commentColumnEl.select(otherKeys[Math.min(pos++, otherKeys.length - 1)], true);
}
}
......@@ -157,6 +157,19 @@ public class ChooseColumnsStepForm extends StepFormBasicController {
//
}
@Override
protected boolean validateFormLogic(UserRequest ureq) {
boolean allOk = true;
userNameColumnEl.clearError();
if(userNameColumnEl != null && !userNameColumnEl.isOneSelected()) {
userNameColumnEl.setErrorKey("form.legende.mandatory", null);
allOk &= false;
}
return allOk & super.validateFormLogic(ureq);
}
@Override
protected void formOK(UserRequest ureq) {
BulkAssessmentDatas datas = (BulkAssessmentDatas)getFromRunContext("datas");
......
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