use of org.olat.course.assessment.AssessmentModeNotificationEvent in project OpenOLAT by OpenOLAT.
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.AssessmentModeNotificationEvent in project OpenOLAT by OpenOLAT.
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.AssessmentModeNotificationEvent in project OpenOLAT by OpenOLAT.
the class BaseFullWebappController method event.
@Override
public void event(Event event) {
if (event == Window.AFTER_VALIDATING) {
// now update the guimessage
List<ZIndexWrapper> places = getWindowControl().getWindowBackOffice().getGuiMessages();
Panel winnerP = null;
int maxZ = -1;
if (places != null) {
// we have places where we can put the gui message
for (Iterator<ZIndexWrapper> it_places = places.iterator(); it_places.hasNext(); ) {
ZIndexWrapper ziw = it_places.next();
int cind = ziw.getZindex();
if (cind > maxZ) {
maxZ = cind;
winnerP = ziw.getPanel();
}
}
} else {
winnerP = guimsgHolder;
}
if (winnerP != null && winnerP != currentMsgHolder) {
currentMsgHolder.setContent(null);
winnerP.setContent(guimsgPanel);
currentMsgHolder = winnerP;
} else {
currentMsgHolder = guimsgHolder;
currentMsgHolder.setContent(guimsgPanel);
currentMsgHolder.setDirty(guimsgPanel.isDirty());
}
} else if (event instanceof LanguageChangedEvent) {
LanguageChangedEvent lce = (LanguageChangedEvent) event;
UserRequest ureq = lce.getCurrentUreq();
getTranslator().setLocale(lce.getNewLocale());
initialize(ureq);
WindowManager winman = Windows.getWindows(ureq).getWindowManager();
initializeBase(ureq, winman, initialPanel);
initialPanel.setContent(mainVc);
reload = Boolean.TRUE;
} else if (event instanceof ChiefControllerMessageEvent) {
// msg can be set to show only on one node or on all nodes
updateStickyMessage();
} else if (event instanceof AssessmentModeNotificationEvent) {
try {
processAssessmentModeNotificationEvent((AssessmentModeNotificationEvent) event);
} catch (Exception e) {
logError("", e);
}
}
}
use of org.olat.course.assessment.AssessmentModeNotificationEvent in project openolat by klemens.
the class BaseFullWebappController method event.
@Override
public void event(Event event) {
if (event == Window.AFTER_VALIDATING) {
// now update the guimessage
List<ZIndexWrapper> places = getWindowControl().getWindowBackOffice().getGuiMessages();
Panel winnerP = null;
int maxZ = -1;
if (places != null) {
// we have places where we can put the gui message
for (Iterator<ZIndexWrapper> it_places = places.iterator(); it_places.hasNext(); ) {
ZIndexWrapper ziw = it_places.next();
int cind = ziw.getZindex();
if (cind > maxZ) {
maxZ = cind;
winnerP = ziw.getPanel();
}
}
} else {
winnerP = guimsgHolder;
}
if (winnerP != null && winnerP != currentMsgHolder) {
currentMsgHolder.setContent(null);
winnerP.setContent(guimsgPanel);
currentMsgHolder = winnerP;
} else {
currentMsgHolder = guimsgHolder;
currentMsgHolder.setContent(guimsgPanel);
currentMsgHolder.setDirty(guimsgPanel.isDirty());
}
} else if (event instanceof LanguageChangedEvent) {
LanguageChangedEvent lce = (LanguageChangedEvent) event;
UserRequest ureq = lce.getCurrentUreq();
getTranslator().setLocale(lce.getNewLocale());
initialize(ureq);
WindowManager winman = Windows.getWindows(ureq).getWindowManager();
initializeBase(ureq, winman, initialPanel);
initialPanel.setContent(mainVc);
reload = Boolean.TRUE;
} else if (event instanceof ChiefControllerMessageEvent) {
// msg can be set to show only on one node or on all nodes
updateStickyMessage();
} else if (event instanceof AssessmentModeNotificationEvent) {
try {
processAssessmentModeNotificationEvent((AssessmentModeNotificationEvent) event);
} catch (Exception e) {
logError("", e);
}
}
}
use of org.olat.course.assessment.AssessmentModeNotificationEvent 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);
}
}
}
Aggregations