Package org.olat.group

Examples of org.olat.group.BusinessGroup


   * @return true : YES, there are waiting-list<br>
   *         false: NO, no waiting-list
   */
  protected boolean hasAnyWaitingList(List groups) {
    for (Iterator iter = groups.iterator(); iter.hasNext();) {
      BusinessGroup businessGroup = (BusinessGroup) iter.next();
      if (businessGroup.getWaitingListEnabled().booleanValue()) { return true; }
    }
    return false;
  }
View Full Code Here


     if (source == tableCtr) {
      if (cmd.equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        int rowid = te.getRowId();
        BusinessGroup choosenGroup = groupListModel.getBusinessGroupAt(rowid);
        addLoggingResourceable(LoggingResourceable.wrap(choosenGroup));
       
        if (actionid.equals(CMD_ENROLL_IN_GROUP)) {
          if (Tracing.isDebugEnabled(this.getClass())) Tracing.logDebug("CMD_ENROLL_IN_GROUP ureq.getComponentID()=" + ureq.getComponentID() + "  ureq.getComponentTimestamp()=" + ureq.getComponentTimestamp(), this.getClass());
          EnrollStatus enrollStatus = enrollmentManager.doEnroll(ureq.getIdentity(), choosenGroup, enNode, coursePropertyManager, getWindowControl(), trans,
View Full Code Here

  /**
   * @see org.olat.core.gui.components.table.TableDataModel#getValueAt(int, int)
   */
  public final Object getValueAt(int row, int col) {
    BusinessGroup businessGroup = (BusinessGroup) getObject(row);
    switch (col) {
      case 0 :
        return businessGroup.getName();
      case 1 :
        String description = businessGroup.getDescription();
        description = FilterFactory.getHtmlTagsFilter().filter(description);
        return (description == null ? "n/a" : description);
      case 2 :
        String type= businessGroup.getType();
        return (type == null ? "n/a" : translator.translate(type));
      case 3 :
        Date lastUsage= businessGroup.getLastUsage();
        return (lastUsage == null ? "n/a" : lastUsage);
      case 4 :
        Date deleteEmail= LifeCycleManager.createInstanceFor(businessGroup).lookupLifeCycleEntry(GroupDeletionManager.SEND_DELETE_EMAIL_ACTION).getLcTimestamp();
        return (deleteEmail == null ? "n/a" : deleteEmail);
      default :
View Full Code Here

      while (ProjectBrokerManagerFactory.getProjectBrokerManager().existProjectName(projectBrokerId, projectTitle)) {
        projectTitle = translate("new.project.title") + i++;
      }
      String projectGroupName = translate("project.member.groupname", projectTitle);
      String projectGroupDescription = translate("project.member.groupdescription", projectTitle);
      BusinessGroup projectGroup = ProjectBrokerManagerFactory.getProjectGroupManager().createProjectGroupFor(projectBrokerId,ureq.getIdentity(), projectGroupName, projectGroupDescription, courseId);
      Project project = ProjectBrokerManagerFactory.getProjectBrokerManager().createAndSaveProjectFor(projectTitle, projectTitle, projectBrokerId, projectGroup);
      ProjectBrokerManagerFactory.getProjectGroupManager().sendGroupChangeEvent(project, courseId, ureq.getIdentity());
      getLogger().debug("Created a new project=" + project);
      projectController = new ProjectController(ureq, this.getWindowControl(), userCourseEnv, nodeEvaluation, project, true, moduleConfig);
      projectController.addControllerListener(this);
View Full Code Here

    if (cmd.indexOf(CMD_START_GROUP_PREFIX) == 0) {
      // launch the group in a new top nav tab
      String groupIdent = cmd.substring(CMD_START_GROUP_PREFIX.length());
      Long groupKey = new Long(Long.parseLong(groupIdent));
      BusinessGroupManager groupManager = BusinessGroupManagerImpl.getInstance();
      BusinessGroup group = groupManager.loadBusinessGroup(groupKey, false);
      // check if the group still exists and the user is really in this group
      // (security, changed group)
      if (group != null && groupManager.isIdentityInBusinessGroup(ureq.getIdentity(), group)) {
        Manager securityManager = ManagerFactory.getManager();
        boolean isCoach = securityManager.isIdentityInSecurityGroup(ureq.getIdentity(), group.getOwnerGroup());
        // create group without admin flag enabled eventhough the user might be
        // coach. the flag is not needed here
        // since the groups knows itself if the user is coach and the user sees
        // only his own groups.
        BGControllerFactory.getInstance().createRunControllerAsTopNavTab(group, ureq, getWindowControl(), /*ual, */false, null);
View Full Code Here

    // 2) add coached groups
    if (ownedGroups.size() > 0) {
      myTool.addHeader(translate("header.tools.ownerGroups"));
      Iterator iter = ownedGroups.iterator();
      while (iter.hasNext()) {
        BusinessGroup group = (BusinessGroup) iter.next();
        myTool.addLink(CMD_START_GROUP_PREFIX + group.getKey().toString(), group.getName());
      }
    }

    // 3) add participating groups
    if (participatedGroups.size() > 0) {
      myTool.addHeader(translate("header.tools.participatedGroups"));
      Iterator iter = participatedGroups.iterator();
      while (iter.hasNext()) {
        BusinessGroup group = (BusinessGroup) iter.next();
        myTool.addLink(CMD_START_GROUP_PREFIX + group.getKey().toString(), group.getName());
      }
    }

    // 4) add right groups
    if (rightGroups.size() > 0) {
      myTool.addHeader(translate("header.tools.rightGroups"));
      Iterator iter = rightGroups.iterator();
      while (iter.hasNext()) {
        BusinessGroup group = (BusinessGroup) iter.next();
        myTool.addLink(CMD_START_GROUP_PREFIX + group.getKey().toString(), group.getName());
      }
    }

    // 5) add waiting-list groups
    if (waitingListGroups.size() > 0) {
      myTool.addHeader(translate("header.tools.waitingListGroups"));
      Iterator iter = waitingListGroups.iterator();
      while (iter.hasNext()) {
        BusinessGroup group = (BusinessGroup) iter.next();
        BusinessGroupManager businessGroupManager = BusinessGroupManagerImpl.getInstance();
        int pos = businessGroupManager.getPositionInWaitingListFor(identity, group);
        myTool.addLink(CMD_START_GROUP_PREFIX + group.getKey().toString(), group.getName() + "(" + pos + ")", group
            .getKey().toString(), null);
        myTool.setEnabled(group.getKey().toString(), false);
      }
    }

    // new toolbox 'general'
    myTool.addHeader(translate("header.tools.general"));
View Full Code Here

    List groups = new ArrayList();
    BGContextManager contextManager = BGContextManagerImpl.getInstance();
    Iterator iterator = rightGroupContexts.iterator();
    while (iterator.hasNext()) {
      BGContext bgContext = (BGContext) iterator.next();
      BusinessGroup group = contextManager.findGroupOfBGContext(groupName, bgContext);
      if (group != null) groups.add(group);
    }
    return groups;
  }
View Full Code Here

    List groups = new ArrayList();
    BGContextManager contextManager = BGContextManagerImpl.getInstance();
    Iterator iterator = learningGroupContexts.iterator();
    while (iterator.hasNext()) {
      BGContext bgContext = (BGContext) iterator.next();
      BusinessGroup group = contextManager.findGroupOfBGContext(groupName, bgContext);
      if (group != null) groups.add(group);
    }
    return groups;
  }
View Full Code Here

    BGAreaManager areaManager = BGAreaManagerImpl.getInstance();
    BGContextManager contextManager = BGContextManagerImpl.getInstance();
    Iterator iterator = learningGroupContexts.iterator();
    while (iterator.hasNext()) {
      BGContext bgContext = (BGContext) iterator.next();
      BusinessGroup group = contextManager.findGroupOfBGContext(groupName, bgContext);
      if (group != null) {
        List groupAreas = areaManager.findBGAreasOfBusinessGroup(group);
        areas.addAll(groupAreas);
      }
    }
View Full Code Here

    BGContextManager contextManager = BGContextManagerImpl.getInstance();
    List groups = new ArrayList();
    Iterator iter = learningGroupContexts.iterator();
    while (iter.hasNext()) {
      BGContext context = (BGContext) iter.next();
      BusinessGroup group = contextManager.findGroupAttendedBy(identity, groupName, context);
      if (group != null) groups.add(group);
    }
    return groups;
  }
View Full Code Here

TOP

Related Classes of org.olat.group.BusinessGroup

Copyright © 2018 www.massapicom. 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.