use of org.olat.course.nodes.pf.ui.DropBoxRow in project OpenOLAT by OpenOLAT.
the class PFManager method getParticipants.
/**
* Gets the participants for different group or course coaches as TableModel.
*
* @param id the identity
* @param pfNode
* @param userPropertyHandlers
* @param locale
* @param courseEnv
* @param admin
* @return the participants
*/
public List<DropBoxRow> getParticipants(Identity id, PFCourseNode pfNode, List<UserPropertyHandler> userPropertyHandlers, Locale locale, CourseEnvironment courseEnv, boolean admin) {
List<Identity> identityList = getParticipants(id, courseEnv, admin);
Set<Identity> duplicates = new HashSet<>();
List<DropBoxRow> participants = new ArrayList<>(identityList.size());
for (Identity identity : identityList) {
if (duplicates.contains(identity)) {
continue;
}
duplicates.add(identity);
VFSContainer dropbox = resolveOrCreateDropFolder(courseEnv, pfNode, identity);
int filecount = countFiles(dropbox);
VFSContainer returnbox = resolveOrCreateReturnFolder(courseEnv, pfNode, identity);
int filecountR = countFiles(returnbox);
Date lastModified = getLastUpdated(courseEnv, pfNode, identity, FILENAME_DROPBOX);
Date lastModifiedR = getLastUpdated(courseEnv, pfNode, identity, FILENAME_RETURNBOX);
UserPropertiesRow urow = new UserPropertiesRow(identity, userPropertyHandlers, locale);
participants.add(new DropBoxRow(urow, "status", filecount, filecountR, pfNode.getLimitCount(), lastModified, lastModifiedR));
}
return participants;
}
use of org.olat.course.nodes.pf.ui.DropBoxRow in project openolat by klemens.
the class PFManager method getParticipants.
/**
* Gets the participants for different group or course coaches as TableModel.
*
* @param id the identity
* @param pfNode
* @param userPropertyHandlers
* @param locale
* @param courseEnv
* @param admin
* @return the participants
*/
public List<DropBoxRow> getParticipants(Identity id, PFCourseNode pfNode, List<UserPropertyHandler> userPropertyHandlers, Locale locale, CourseEnvironment courseEnv, boolean admin) {
List<Identity> identityList = getParticipants(id, courseEnv, admin);
Set<Identity> duplicates = new HashSet<>();
List<DropBoxRow> participants = new ArrayList<>(identityList.size());
for (Identity identity : identityList) {
if (duplicates.contains(identity)) {
continue;
}
duplicates.add(identity);
VFSContainer dropbox = resolveOrCreateDropFolder(courseEnv, pfNode, identity);
int filecount = countFiles(dropbox);
VFSContainer returnbox = resolveOrCreateReturnFolder(courseEnv, pfNode, identity);
int filecountR = countFiles(returnbox);
Date lastModified = getLastUpdated(courseEnv, pfNode, identity, FILENAME_DROPBOX);
Date lastModifiedR = getLastUpdated(courseEnv, pfNode, identity, FILENAME_RETURNBOX);
UserPropertiesRow urow = new UserPropertiesRow(identity, userPropertyHandlers, locale);
participants.add(new DropBoxRow(urow, "status", filecount, filecountR, pfNode.getLimitCount(), lastModified, lastModifiedR));
}
return participants;
}
Aggregations