public ActionForward edit(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws FenixActionException {
DynaActionForm editStudentGroupForm = (DynaActionForm) form;
User userView = getUserView(request);
String studentGroupCodeString = request.getParameter("studentGroupCode");
String groupPropertiesCodeString = request.getParameter("groupPropertiesCode");
String groupPropertiesCode = groupPropertiesCodeString;
String studentGroupCode = studentGroupCodeString;
String newShiftString = (String) editStudentGroupForm.get("shift");
if (newShiftString.equals("")) {
ActionErrors actionErrors = new ActionErrors();
ActionError error = null;
error = new ActionError("errors.invalid.shift.groupEnrolment");
actionErrors.add("errors.invalid.shift.groupEnrolment", error);
saveErrors(request, actionErrors);
return prepareEdit(mapping, form, request, response);
}
String newShiftCode = newShiftString;
try {
EditGroupShift.run(studentGroupCode, groupPropertiesCode, newShiftCode, userView.getUsername());
} catch (NotAuthorizedException e) {
ActionErrors actionErrors2 = new ActionErrors();
ActionError error2 = null;
error2 = new ActionError("errors.noStudentInAttendsSet");
actionErrors2.add("errors.noStudentInAttendsSet", error2);