public List getStudentSectionMembershipNames(String gradebookUid, String studentUid) { List sectionNames = new ArrayList(); List sections = findStudentSectionMemberships(gradebookUid, studentUid); if (sections != null && !sections.isEmpty()) { Iterator sectionIter = sections.iterator(); while (sectionIter.hasNext()) { Group myGroup = (Group) sectionIter.next(); sectionNames.add(myGroup.getTitle()); } } return sectionNames; }
public List getStudentSectionMembershipNames(String gradebookUid, String studentUid) { List sectionNames = new ArrayList(); List sections = findStudentSectionMemberships(gradebookUid, studentUid); if (sections != null && !sections.isEmpty()) { Iterator sectionIter = sections.iterator(); while (sectionIter.hasNext()) { Group myGroup = (Group) sectionIter.next(); sectionNames.add(myGroup.getTitle()); } } return sectionNames; }
private Map getGroupsForSite(String siteId){ Map sortedGroups = new TreeMap(); Site site; try { site = SiteService.getSite(siteId); Collection groups = site.getGroups(); if (groups != null && groups.size() > 0) { Iterator groupIter = groups.iterator(); while (groupIter.hasNext()) { Group group = (Group) groupIter.next(); sortedGroups.put(group.getId(), group.getTitle()); } } } catch (IdUnusedException ex) { // No site available } return sortedGroups; } }
/** * added by Sam Ottenhoff Feb 2010 * Returns all groups for site * @param siteId * @return */ private Map getGroupsForSite(String siteId){ Map sortedGroups = new TreeMap(); Site site; try { site = siteService.getSite(siteId); Collection groups = site.getGroups(); if (groups != null && groups.size() > 0) { Iterator groupIter = groups.iterator(); while (groupIter.hasNext()) { Group group = (Group) groupIter.next(); sortedGroups.put(group.getId(), group.getTitle()); } } } catch (IdUnusedException ex) { // No site available } return sortedGroups; }
/** * @inheritDoc */ public int compareTo(Object obj) { if (!(obj instanceof Group)) throw new ClassCastException(); // if the object are the same, say so if (obj == this) return 0; // start the compare by comparing their title int compare = getTitle().compareTo(((Group) obj).getTitle()); // if these are the same if (compare == 0) { // sort based on (unique) id compare = getId().compareTo(((Group) obj).getId()); } return compare; }
/** * added by Sam Ottenhoff Feb 2010 * Returns all groups for site * @param siteId * @return */ private Map getGroupsForSite(String siteId){ Map sortedGroups = new TreeMap(); Site site; try { site = siteService.getSite(siteId); Collection groups = site.getGroups(); if (groups != null && groups.size() > 0) { Iterator groupIter = groups.iterator(); while (groupIter.hasNext()) { Group group = (Group) groupIter.next(); sortedGroups.put(group.getId(), group.getTitle()); } } } catch (IdUnusedException ex) { // No site available } return sortedGroups; }
/** * Finds a group in a particular site, by group title * @param site the site * @param groupTitle the group title * @return the id of the group with the matching title, or empty string if not found */ public static String getSiteGroupByTitle(Site site, String groupTitle) { String groupId = ""; Collection<Group> siteGroups = site.getGroups(); if (groupTitle != null && siteGroups != null) { for (Group g : siteGroups) { if (g != null && groupTitle.equals(g.getTitle())) { groupId = g.getId(); break; } } } return groupId; } }
public String getSiteGroupTitle(String groupId) { try{ Placement placement = M_tm.getCurrentPlacement(); Site site = M_ss.getSite(placement.getContext()); return site.getGroup(groupId).getTitle(); }catch(IdUnusedException e){ LOG.warn("ReportManager: unable to get group title with id: " + groupId); } return null; }
if (paths[4].equalsIgnoreCase(g.getTitle()))
M_log.debug("Checking submission for group: " + _g.getTitle()); submission = getSubmission(a.getReference(), _g.getId()); if (submission != null && allowGetSubmission(submission.getReference()))
rv = _site.getGroup(_submission.getSubmitterId()).getTitle(); } catch (Throwable _dfd) { } } else {
this.uuid = group.getReference(); this.course = new CourseImpl(group.getContainingSite()); this.title = group.getTitle(); this.description = group.getDescription(); this.isLocked = group.isLocked();
this.uuid = group.getReference(); this.course = new CourseImpl(group.getContainingSite()); this.title = group.getTitle(); this.description = group.getDescription(); this.isLocked = group.isLocked(Group.LockMode.ALL);
sgrp.setTitle(grp.getTitle()); groupList.add(sgrp);