Package org.olat.course.groupsandrights

Examples of org.olat.course.groupsandrights.CourseGroupManager


      } else if (event == Event.BACK_EVENT) {
        // show context list again
        // reinitialize context list since it could be dirty
        List groupContexts;
        ICourse course = CourseFactory.loadCourse(ores);
        CourseGroupManager groupManager = course.getCourseEnvironment().getCourseGroupManager();
        if (BusinessGroup.TYPE_LEARNINGROUP.equals(groupType)) {
          groupContexts = groupManager.getLearningGroupContexts();
        } else {
          groupContexts = groupManager.getRightGroupContexts();
        }
        doInitContextList(ureq, groupContexts);
        content.setContent(columnLayoutCtr.getInitialComponent());
      }
    } else if (source == contextListCtr) {
View Full Code Here


      } catch (Exception e) {
        log.error("Could not load Course! OlatResourcable: "+entry.getOlatResource(), e);
        continue;
      }
     
      CourseGroupManager groupManager = course.getCourseEnvironment().getCourseGroupManager();
      List<BusinessGroup> groups = groupManager.getAllLearningGroupsFromAllContexts();
        for (Iterator<BusinessGroup> iter = groups.iterator(); iter.hasNext();) {
          BusinessGroup group = iter.next();
          if (!synchonizeBuddyRoster(group)) {
            log.error("couldn't sync group: "+group.getResourceableTypeName());
          }
View Full Code Here

      Boolean allowRelativeLinks = getModuleConfiguration().getBooleanEntry(STCourseNodeEditController.CONFIG_KEY_ALLOW_RELATIVE_LINKS);
      OLATResourceable ores = OresHelper.createOLATResourceableInstance(CourseModule.class, userCourseEnv.getCourseEnvironment().getCourseResourceableId());
      SinglePageController spCtr = new SinglePageController(ureq, wControl, true, userCourseEnv.getCourseEnvironment().getCourseFolderContainer(), relPath, null, allowRelativeLinks
          .booleanValue(), ores);
      // check if user is allowed to edit the page in the run view
      CourseGroupManager cgm = userCourseEnv.getCourseEnvironment().getCourseGroupManager();
      boolean hasEditRights = (cgm.isIdentityCourseAdministrator(ureq.getIdentity()) || cgm.hasRight(ureq.getIdentity(),
          CourseRights.RIGHT_COURSEEDITOR));
      if (hasEditRights) {
        spCtr.allowPageEditing();
        // set the link tree model to internal for the HTML editor
        CustomLinkTreeModel linkTreeModel = new CourseInternalLinkTreeModel(userCourseEnv.getCourseEnvironment().getRunStructure().getRootNode());
View Full Code Here

    /*
     * the real function evaluation which is used during run time
     */
    Identity ident = getUserCourseEnv().getIdentityEnvironment().getIdentity();
   
    CourseGroupManager cgm = getUserCourseEnv().getCourseEnvironment().getCourseGroupManager();
   
    return cgm.isIdentityInLearningArea(ident,areaName) ? ConditionInterpreter.INT_TRUE: ConditionInterpreter.INT_FALSE;
  }
View Full Code Here

    /*
     * the real function evaluation which is used during run time
     */
    Identity ident = getUserCourseEnv().getIdentityEnvironment().getIdentity();
   
    CourseGroupManager cgm = getUserCourseEnv().getCourseEnvironment().getCourseGroupManager();
    //System.out.println("todo: check if "+(ident==null? "n/a":ident.getName())+" is in group "+groupName);
   
    return cgm.isIdentityInLearningGroup(ident,groupName) ? ConditionInterpreter.INT_TRUE: ConditionInterpreter.INT_FALSE;
  }
View Full Code Here

    /*
     * the real function evaluation which is used during run time
     */
    Identity ident = getUserCourseEnv().getIdentityEnvironment().getIdentity();
   
    CourseGroupManager cgm = getUserCourseEnv().getCourseEnvironment().getCourseGroupManager();
   
    return cgm.isIdentityInRightGroup(ident,groupName) ? ConditionInterpreter.INT_TRUE: ConditionInterpreter.INT_FALSE;
  }
View Full Code Here

      // return a valid value to continue with condition evaluation test
      return defaultValue();
    }

    Identity ident = getUserCourseEnv().getIdentityEnvironment().getIdentity();
    CourseGroupManager cgm = getUserCourseEnv().getCourseEnvironment().getCourseGroupManager();
    boolean isCourseAdmin = cgm.isIdentityCourseAdministrator(ident);
    if (Tracing.isDebugEnabled(IsCourseAdministratorFunction.class)) {
      Tracing.logDebug("identity "+ident.getName()+", courseadministrator:"+isCourseAdmin+", in course "+getUserCourseEnv().getCourseEnvironment().getCourseResourceableId(), IsCourseAdministratorFunction.class);
    }
   
    return isCourseAdmin ? ConditionInterpreter.INT_TRUE: ConditionInterpreter.INT_FALSE;
View Full Code Here

   * @return List of all course groups if identity is course admin, else groups that
   * are coached by this identity
   */
  private List<BusinessGroup> getAllowedGroupsFromGroupmanagement(Identity identity) {
    ICourse course = CourseFactory.loadCourse(ores);
    CourseGroupManager gm = course.getCourseEnvironment().getCourseGroupManager();
    if (callback.mayAssessAllUsers() || callback.mayViewAllUsersAssessments()) {
      return gm.getAllLearningGroupsFromAllContexts();
    } else if (callback.mayAssessCoachedUsers()) {
      return  gm.getOwnedLearningGroupsFromAllContexts(identity);
    } else {
      throw new OLATSecurityException("No rights to assess or even view any groups");
    }
  }
View Full Code Here

    tableConfig.setTableEmptyMessage(translate("groupchoose.nogroups"));
    groupListCtr = new TableController(tableConfig, ureq, getWindowControl(), getTranslator(), null);
    listenTo(groupListCtr);
    groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.group.name", 0, CMD_CHOOSE_GROUP, ureq.getLocale()));
    groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.group.desc", 1, null, ureq.getLocale()));
    CourseGroupManager gm = course.getCourseEnvironment().getCourseGroupManager();
    if (gm.getLearningGroupContexts().size() > 1) {
    // show groupcontext row only if multiple contexts are found
      groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.group.context", 2, null, ureq.getLocale()));
    }
   
    Translator defaultContextTranslator = new PackageTranslator(Util.getPackageName(BGContextTableModel.class), ureq.getLocale());
View Full Code Here

   
    tuConfigForm = new TUConfigForm("tuConfigForm", getTranslator(), config, false);
    tuConfigForm.addListener(this);
    myContent.put(tuConfigForm.getComponentName(), tuConfigForm);

    CourseGroupManager groupMgr = course.getCourseEnvironment().getCourseGroupManager();
    CourseEditorTreeModel editorModel = course.getEditorTreeModel();
    //Accessibility precondition
    Condition accessCondition = courseNode.getPreConditionAccess();
    accessibilityCondContr = new ConditionEditController(ureq, getWindowControl(), groupMgr, accessCondition, "accessabilityConditionForm",
        AssessmentHelper.getAssessableNodes(editorModel, tuCourseNode), euce);   
View Full Code Here

TOP

Related Classes of org.olat.course.groupsandrights.CourseGroupManager

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.