public void saveStatusFormData(StatusForm statusForm, CourseNode node, UserCourseEnvironment userCourseEnv) {
Identity identity = userCourseEnv.getIdentityEnvironment().getIdentity();
String selectedKey = statusForm.getSelectedStatus();
CoursePropertyManager cpm = userCourseEnv.getCourseEnvironment().getCoursePropertyManager();
Property statusProperty;
statusProperty = cpm.findCourseNodeProperty(node, identity, null, PROPERTY_KEY_STATUS);
if (statusProperty == null) {
statusProperty = cpm.createCourseNodePropertyInstance(node, identity, null, PROPERTY_KEY_STATUS, null, null,selectedKey, null);
cpm.saveProperty(statusProperty);
} else {
statusProperty.setStringValue(selectedKey);
cpm.updateProperty(statusProperty);
}
}