use of org.olat.modules.qpool.ui.events.QPoolEvent in project openolat by klemens.
the class QuestionItemDetailsController method doShareItemsWithGroup.
private void doShareItemsWithGroup(UserRequest ureq, QuestionItemShort item, List<BusinessGroup> groups) {
qpoolService.shareItemsWithGroups(Collections.singletonList(item), groups, false);
fireEvent(ureq, new QPoolEvent(QPoolEvent.ITEM_SHARED));
}
use of org.olat.modules.qpool.ui.events.QPoolEvent in project openolat by klemens.
the class QuestionItemDetailsController method doChangeQuestionStatus.
private void doChangeQuestionStatus(UserRequest ureq, QuestionItem item, QuestionStatus newStatus) {
if (!newStatus.equals(item.getQuestionStatus()) && item instanceof QuestionItemImpl) {
QuestionItemImpl itemImpl = (QuestionItemImpl) item;
QuestionItemAuditLogBuilder builder = qpoolService.createAuditLogBuilder(getIdentity(), Action.STATUS_CHANGED);
builder.withBefore(itemImpl);
builder.withMessage("New status: " + newStatus);
itemImpl.setQuestionStatus(newStatus);
qpoolService.updateItem(itemImpl);
builder.withAfter(item);
qpoolService.persist(builder.create());
fireEvent(ureq, new QPoolEvent(QPoolEvent.ITEM_STATUS_CHANGED, item.getKey()));
}
reloadData(ureq);
}
use of org.olat.modules.qpool.ui.events.QPoolEvent in project openolat by klemens.
the class QuestionItemDetailsController method doRate.
private void doRate(UserRequest ureq, float rating, String comment) {
QuestionItem item = metadatasCtrl.getItem();
qpoolService.rateItemInReview(item, getIdentity(), rating, comment);
reloadData(ureq);
setCommentsController(ureq);
fireEvent(ureq, new QPoolEvent(QPoolEvent.ITEM_STATUS_CHANGED, item.getKey()));
}
Aggregations