use of org.olat.modules.qpool.QuestionItemView in project OpenOLAT by OpenOLAT.
the class QuestionItemDetailsController method reloadData.
private void reloadData(UserRequest ureq) {
Long itemKey = metadatasCtrl.getItem().getKey();
QuestionItemView itemView = itemSource.getItemWithoutRestrictions(itemKey);
if (itemView != null) {
qItemSecurityCallback.setQuestionItemView(itemView);
initTools();
setCommentsController(ureq);
QuestionItem reloadedItem = qpoolService.loadItemById(itemView.getKey());
metadatasCtrl.setItem(reloadedItem, qItemSecurityCallback);
reviewActionCtrl.setSecurityCallback(qItemSecurityCallback);
setQuestionController(ureq, reloadedItem, qItemSecurityCallback);
}
}
use of org.olat.modules.qpool.QuestionItemView in project OpenOLAT by OpenOLAT.
the class AbstractItemListController method reload.
@Override
public List<ItemRow> reload(List<ItemRow> rows) {
List<Long> itemToReload = new ArrayList<>();
for (ItemRow row : rows) {
itemToReload.add(row.getKey());
}
List<QuestionItemView> reloadedItems = itemsSource.getItems(itemToReload);
List<ItemRow> reloadedRows = new ArrayList<>(reloadedItems.size());
List<ResourceLicense> licenses = licenseService.loadLicenses(reloadedItems);
for (QuestionItemView item : reloadedItems) {
ItemRow reloadedRow = forgeRow(item, licenses);
reloadedRows.add(reloadedRow);
}
return reloadedRows;
}
use of org.olat.modules.qpool.QuestionItemView in project OpenOLAT by OpenOLAT.
the class ItemListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (selectLink == source) {
Set<Integer> selections = getItemsTable().getMultiSelectedIndex();
if (!selections.isEmpty()) {
List<QuestionItemView> items = getItemViews(selections);
fireEvent(ureq, new QItemViewEvent("select-item", items));
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.modules.qpool.QuestionItemView in project OpenOLAT by OpenOLAT.
the class CollectionOfItemsSource method getItems.
@Override
public List<QuestionItemView> getItems(Collection<Long> key) {
SearchQuestionItemParams params = new SearchQuestionItemParams(identity, roles);
params.setItemKeys(key);
if (StringHelper.containsNonWhitespace(restrictToFormat)) {
params.setFormat(restrictToFormat);
}
ResultInfos<QuestionItemView> items = qpoolService.getItemsOfCollection(collection, params, 0, -1);
return items.getObjects();
}
use of org.olat.modules.qpool.QuestionItemView in project OpenOLAT by OpenOLAT.
the class SharedItemsSource method getItems.
@Override
public List<QuestionItemView> getItems(Collection<Long> keys) {
SearchQuestionItemParams params = new SearchQuestionItemParams(identity, roles);
params.setItemKeys(keys);
if (StringHelper.containsNonWhitespace(restrictToFormat)) {
params.setFormat(restrictToFormat);
}
ResultInfos<QuestionItemView> items = qpoolService.getSharedItemByResource(group.getResource(), params, 0, -1);
return items.getObjects();
}
Aggregations