Examples of BusinessGroup


Examples of org.olat.group.BusinessGroup

          if (!hasFullAccess) {
            // initialize list of users, only when user has not full access
            List<BusinessGroup> coachedGroups = cgm.getOwnedLearningGroupsFromAllContexts(identity);
            Manager securityManager = ManagerFactory.getManager();
            for (Iterator<BusinessGroup> iter = coachedGroups.iterator(); iter.hasNext();) {
              BusinessGroup group = iter.next();
              coachedUsers.addAll(securityManager.getIdentitiesOfSecurityGroup(group.getPartipiciantGroup()));
            }
          }

          List<IQTESTCourseNode> testNodes = getCourseTestNodes(course);
          Translator translator = Util.createPackageTranslator(AssessmentNotificationsHandler.class, locale);
View Full Code Here

Examples of org.olat.group.BusinessGroup

        // do logging
        if (this.inAreaGroups.size()==0) {
          ThreadLocalUserActivityLogger.log(GroupLoggingAction.BGAREA_UPDATED_NOW_EMPTY, getClass());
        } else {
          for (Iterator it = inAreaGroups.iterator(); it.hasNext();) {
            BusinessGroup aGroup = (BusinessGroup) it.next();
            ThreadLocalUserActivityLogger.log(GroupLoggingAction.BGAREA_UPDATED_MEMBER_GROUP, getClass(),
                LoggingResourceable.wrap(aGroup));
          }
        }
      }
View Full Code Here

Examples of org.olat.group.BusinessGroup

    // 1) add groups to area
    List addedGroups = groupsChoice.getAddedRows();
    Iterator iterator = addedGroups.iterator();
    while (iterator.hasNext()) {
      Integer position = (Integer) iterator.next();
      BusinessGroup group = groupsDataModel.getGroup(position.intValue());
      // refresh group to prevent stale object exception and context proxy
      // issues
      group = BusinessGroupManagerImpl.getInstance().loadBusinessGroup(group);
      // refresh group also in table model
      this.allGroups.set(position.intValue(), group);
      // add group now to area and update in area group list
      areaManager.addBGToBGArea(group, area);
      this.inAreaGroups.add(group);
    }
    // 2) remove groups from area
    List removedGroups = groupsChoice.getRemovedRows();
    iterator = removedGroups.iterator();
    while (iterator.hasNext()) {
      Integer position = (Integer) iterator.next();
      BusinessGroup group = groupsDataModel.getGroup(position.intValue());
      areaManager.removeBGFromArea(group, area);
      this.inAreaGroups.remove(group);
    }
  }
View Full Code Here

Examples of org.olat.group.BusinessGroup

      // collect all learning groups
      lstGroups.addAll(cgm.getAllLearningGroupsFromAllContexts());
    } else if(cgm.isIdentityCourseCoach(identity)) {
      HashSet<Identity> identitiesInGroups = new HashSet<Identity>();
      for( Object obj : cgm.getAllLearningGroupsFromAllContexts() ) {
        BusinessGroup group = (BusinessGroup) obj;
        if(cgm.getCoachesFromLearningGroup(group.getName()).contains(identity)) {
          lstGroups.add(group);
          identitiesInGroups.addAll(cgm.getParticipantsFromLearningGroup(group.getName()));
        }
      }
      allIdentities.addAll(identitiesInGroups);
    }
   
View Full Code Here

Examples of org.olat.group.BusinessGroup

      if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        if (actionid.equals(CMD_LAUNCH)) {
          int rowid = te.getRowId();
          BusinessGroup currBusinessGroup = groupListModel.getBusinessGroupAt(rowid);
          boolean isInBusinessGroup = BusinessGroupManagerImpl.getInstance().isIdentityInBusinessGroup(ureq.getIdentity(), currBusinessGroup);
          if(isInBusinessGroup) {
            BGControllerFactory.getInstance().createRunControllerAsTopNavTab(currBusinessGroup, ureq, getWindowControl(), false, null);
          } else {
            showInfo("groupsPortlet.no_member");
View Full Code Here

Examples of org.olat.group.BusinessGroup

   * @return a Comparator for the input sortingCriteria
   */
  protected Comparator getComparator(final SortingCriteria sortingCriteria) {
    return new Comparator(){     
      public int compare(final Object o1, final Object o2) {
        BusinessGroup group1= (BusinessGroup)o1;
        BusinessGroup group2 = (BusinessGroup)o2;   
        int comparisonResult = 0;
        if(sortingCriteria.getSortingTerm()==SortingCriteria.ALPHABETICAL_SORTING) {         
          comparisonResult = collator.compare(group1.getName(), group2.getName());               
        } else if(sortingCriteria.getSortingTerm()==SortingCriteria.DATE_SORTING) {
          comparisonResult = group1.getCreationDate().compareTo(group2.getCreationDate());
        } else if(sortingCriteria.getSortingTerm()==SortingCriteria.TYPE_SORTING) {
          comparisonResult = group1.getType().compareTo(group2.getType());
        }
        if(!sortingCriteria.isAscending()) {
          //if not isAscending return (-comparisonResult)         
          return -comparisonResult;
        }
View Full Code Here

Examples of org.olat.group.BusinessGroup

      super(objects,2);
    }
   
    public Object getValueAt(int row, int col) {
      PortletEntry entry = getObject(row);
      BusinessGroup businessGroup = (BusinessGroup) entry.getValue();
      switch (col) {
        case 0:
          String name = businessGroup.getName();
          name = StringEscapeUtils.escapeHtml(name).toString();
          return name;
        case 1:
          return getTranslator().translate(businessGroup.getType());
        default:
          return "ERROR";
      }
    }
View Full Code Here

Examples of org.olat.group.BusinessGroup

    /**
     * @see org.olat.core.gui.components.table.TableDataModel#getValueAt(int, int)
     */
    public final Object getValueAt(int row, int col) {
      PortletEntry portletEntry = getObject(row);
      BusinessGroup group = (BusinessGroup) portletEntry.getValue();
      switch (col) {
        case 0:
          return group.getName();
        case 1:
          String description = group.getDescription();
          description = FilterFactory.getHtmlTagsFilter().filter(description);
          return (description == null ? "n/a" : description);
        case 2:
          String resType = group.getType();         
          return (resType == null ? "n/a" : translate(resType));
        case 3:
          Date date = group.getCreationDate();
          //return DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, getTranslator().getLocale()).format(date);
          return date;
        default:
          return "error";
      }
View Full Code Here

Examples of org.olat.group.BusinessGroup

  /**
   * @see org.olat.core.gui.components.table.TableDataModel#getValueAt(int, int)
   */
  public Object getValueAt(int row, int col) {
    BusinessGroup businessGroup = (BusinessGroup) objects.get(row);
    switch (col) {
      case 0:
        String name = businessGroup.getName();
        name = StringEscapeUtils.escapeHtml(name).toString();
        return name;
      case 1:
        return trans.translate(businessGroup.getType());
      default:
        return "ERROR";
    }
  }
View Full Code Here

Examples of org.olat.group.BusinessGroup

   * @see org.olat.core.gui.components.table.TableDataModel#getValueAt(int, int)
   */
  public Object getValueAt(int row, int col) {
    Object[] wrapped = (Object[]) objects.get(row);
    ;
    BusinessGroup businessGroup = (BusinessGroup) wrapped[0];
    switch (col) {
      case 0:
        String name = businessGroup.getName();
        name = StringEscapeUtils.escapeHtml(name).toString();
        return name;
      case 1:
        String description = businessGroup.getDescription();
        description = FilterFactory.getHtmlTagsFilter().filter(description);
        description = Formatter.truncate(description, 256);
        return description;
      case 2:
        return trans.translate(businessGroup.getType());
      case 3:
        return wrapped[1];
      case 4:
        return wrapped[2];
      default:
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.