// empty selection
showWarning("msg.selectionempty");
return;
}
selectedIdentities = tdm.getIdentities(tmse.getSelection());
final UserBulkChangeManager ubcMan = UserBulkChangeManager.getInstance();
// valid selection: load in wizard
Step start = new UserBulkChangeStep00(ureq, selectedIdentities);
Roles roles = ureq.getUserSession().getRoles();
isAdministrativeUser = (roles.isAuthor() || roles.isGroupManager() || roles.isUserManager() || roles.isOLATAdmin());
// callback executed in case wizard is finished.
StepRunnerCallback finish = new StepRunnerCallback() {
public Step execute(UserRequest ureq1, WindowControl wControl1, StepsRunContext runContext) {
// all information to do now is within the runContext saved
boolean hasChanges = false;
try {
if (runContext.containsKey("validChange") && ((Boolean) runContext.get("validChange")).booleanValue()) {
HashMap<String, String> attributeChangeMap = (HashMap<String, String>) runContext.get("attributeChangeMap");
HashMap<String, String> roleChangeMap = (HashMap<String, String>) runContext.get("roleChangeMap");
if (!(attributeChangeMap.size()==0 && roleChangeMap.size()==0)){
ubcMan.changeSelectedIdentities(selectedIdentities, attributeChangeMap, roleChangeMap, notUpdatedIdentities,
isAdministrativeUser, getTranslator());
hasChanges = true;
}
}
} catch (Exception any) {