use of org.olat.repository.RepositoryEntryOrder in project openolat by klemens.
the class RepositoryPortletRunController method getAllEntries.
private List<RepositoryEntryLight> getAllEntries(SortingCriteria criteria) {
int maxResults = criteria == null ? -1 : criteria.getMaxEntries();
RepositoryEntryOrder orderBy = RepositoryEntryOrder.nameAsc;
if (criteria != null && !criteria.isAscending()) {
orderBy = RepositoryEntryOrder.nameDesc;
}
List<RepositoryEntryLight> entries;
if (studentView) {
entries = RepositoryManager.getInstance().getParticipantRepositoryEntry(getIdentity(), maxResults, orderBy);
} else {
List<RepositoryEntry> fullEntries = RepositoryManager.getInstance().getLearningResourcesAsTeacher(getIdentity(), 0, maxResults, orderBy);
entries = new ArrayList<RepositoryEntryLight>();
for (RepositoryEntry fullEntry : fullEntries) {
entries.add(new FullReWrapper(fullEntry));
}
}
return entries;
}
use of org.olat.repository.RepositoryEntryOrder in project OpenOLAT by OpenOLAT.
the class RepositoryPortletRunController method getAllEntries.
private List<RepositoryEntryLight> getAllEntries(SortingCriteria criteria) {
int maxResults = criteria == null ? -1 : criteria.getMaxEntries();
RepositoryEntryOrder orderBy = RepositoryEntryOrder.nameAsc;
if (criteria != null && !criteria.isAscending()) {
orderBy = RepositoryEntryOrder.nameDesc;
}
List<RepositoryEntryLight> entries;
if (studentView) {
entries = RepositoryManager.getInstance().getParticipantRepositoryEntry(getIdentity(), maxResults, orderBy);
} else {
List<RepositoryEntry> fullEntries = RepositoryManager.getInstance().getLearningResourcesAsTeacher(getIdentity(), 0, maxResults, orderBy);
entries = new ArrayList<RepositoryEntryLight>();
for (RepositoryEntry fullEntry : fullEntries) {
entries.add(new FullReWrapper(fullEntry));
}
}
return entries;
}
Aggregations