use of org.olat.course.assessment.model.TransientAssessmentMode in project openolat by klemens.
the class AssessmentModeListController method event.
@Override
public void event(Event event) {
if (event instanceof AssessmentModeNotificationEvent) {
AssessmentModeNotificationEvent amne = (AssessmentModeNotificationEvent) event;
TransientAssessmentMode mode = amne.getAssessementMode();
if (mode.getRepositoryEntryKey().equals(entry.getKey()) && model.updateModeStatus(amne.getAssessementMode())) {
tableEl.getComponent().setDirty(true);
}
}
}
use of org.olat.course.assessment.model.TransientAssessmentMode in project openolat by klemens.
the class AssessmentModeCoordinationServiceImpl method sendEvent.
private void sendEvent(String cmd, AssessmentMode mode, Set<Long> assessedIdentityKeys) {
TransientAssessmentMode transientMode = new TransientAssessmentMode(mode);
AssessmentModeNotificationEvent event = new AssessmentModeNotificationEvent(cmd, transientMode, assessedIdentityKeys);
coordinatorManager.getCoordinator().getEventBus().fireEventToListenersOf(event, AssessmentModeNotificationEvent.ASSESSMENT_MODE_NOTIFICATION);
}
use of org.olat.course.assessment.model.TransientAssessmentMode in project openolat by klemens.
the class AssessmentModeGuardController method syncAssessmentModes.
private void syncAssessmentModes(UserRequest ureq) {
List<ResourceGuard> modeWrappers = new ArrayList<ResourceGuard>();
for (TransientAssessmentMode mode : modes) {
if (mode != null) {
ResourceGuard wrapper = syncAssessmentMode(ureq, mode);
if (wrapper != null) {
modeWrappers.add(wrapper);
}
}
}
guards.setList(modeWrappers);
mainContinueButton.setVisible(modeWrappers.isEmpty());
mainVC.setDirty(true);
}
use of org.olat.course.assessment.model.TransientAssessmentMode in project openolat by klemens.
the class AssessmentModeGuardController method processAssessmentModeNotificationEvent.
private void processAssessmentModeNotificationEvent(AssessmentModeNotificationEvent event) {
if (getIdentity() != null && event.getAssessedIdentityKeys() != null && event.getAssessedIdentityKeys().contains(getIdentity().getKey())) {
boolean update = false;
TransientAssessmentMode mode = event.getAssessementMode();
List<TransientAssessmentMode> updatedModes = new ArrayList<TransientAssessmentMode>();
for (TransientAssessmentMode currentMode : modes) {
if (currentMode.getModeKey().equals(mode.getModeKey())) {
updatedModes.add(mode);
update |= (currentMode.getStatus() != mode.getStatus());
} else {
updatedModes.add(currentMode);
update |= true;
}
}
modes = updatedModes;
pushUpdate |= update;
}
}
Aggregations