Examples of CourseGroupManager


Examples of org.olat.course.groupsandrights.CourseGroupManager

   *         administrators and course coaches
   */
  private boolean canSubscribeForAssessmentNotification(Identity ident, ICourse course) {
    if (ident == null) return false;

    CourseGroupManager grpMan = course.getCourseEnvironment().getCourseGroupManager();
   
    boolean isInstitutionalResourceManager = ManagerFactory.getManager().isIdentityInSecurityGroup(ident, ManagerFactory.getManager().findSecurityGroupByName(Constants.GROUP_INST_ORES_MANAGER));
    return isInstitutionalResourceManager || grpMan.isIdentityCourseAdministrator(ident) || grpMan.isIdentityCourseCoach(ident) || grpMan.hasRight(ident, CourseRights.RIGHT_ASSESSMENT);
  }
View Full Code Here

Examples of org.olat.course.groupsandrights.CourseGroupManager

        Long courseId = new Long(p.getData());
        final ICourse course = loadCourseFromId(courseId);
        if (course != null) {
          // course admins or users with the course right to have full access to
          // the assessment tool will have full access to user tests
          CourseGroupManager cgm = course.getCourseEnvironment().getCourseGroupManager();
          final boolean hasFullAccess = (cgm.isIdentityCourseAdministrator(identity) ? true : cgm.hasRight(identity,
              CourseRights.RIGHT_ASSESSMENT));
          final List<Identity> coachedUsers = new ArrayList<Identity>();
          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()));
            }
View Full Code Here

Examples of org.olat.course.groupsandrights.CourseGroupManager

    List<KalendarRenderWrapper> calendars = new ArrayList<KalendarRenderWrapper>();
    CalendarManager calendarManager = CalendarManagerFactory.getInstance().getCalendarManager();
    // add course calendar
    ICourse course = CourseFactory.loadCourse(ores);
    KalendarRenderWrapper courseKalendarWrapper = calendarManager.getCourseCalendar(course);
    CourseGroupManager cgm = course.getCourseEnvironment().getCourseGroupManager();
    Identity identity = ureq.getIdentity();
    boolean isPrivileged = cgm.isIdentityCourseAdministrator(identity)
        || cgm.hasRight(identity, CourseRights.RIGHT_COURSEEDITOR)
        || RepositoryManager.getInstance().isInstitutionalRessourceManagerFor(
            RepositoryManager.getInstance().lookupRepositoryEntry(course, false), identity);
    if (isPrivileged) {
      courseKalendarWrapper.setAccess(KalendarRenderWrapper.ACCESS_READ_WRITE);
    } else {
      courseKalendarWrapper.setAccess(KalendarRenderWrapper.ACCESS_READ_ONLY);
    }
    KalendarConfig config = calendarManager.findKalendarConfigForIdentity(courseKalendarWrapper.getKalendar(), ureq);
    if (config != null) {
      courseKalendarWrapper.getKalendarConfig().setCss(config.getCss());
      courseKalendarWrapper.getKalendarConfig().setVis(config.isVis());
    }
    // add link provider
    CourseLinkProviderController clpc = new CourseLinkProviderController(course, ureq, wControl);
    courseKalendarWrapper.setLinkProvider(clpc);
    calendars.add(courseKalendarWrapper);

    // add course group calendars
    boolean isGroupManager = cgm.isIdentityCourseAdministrator(identity) || cgm.hasRight(identity, CourseRights.RIGHT_GROUPMANAGEMENT);
    if (isGroupManager) {
      // learning groups
      List<BusinessGroup> allGroups = cgm.getAllLearningGroupsFromAllContexts();
      addCalendars(ureq, allGroups, true, clpc, calendars);
      // right groups
      allGroups = cgm.getAllRightGroupsFromAllContexts();
      addCalendars(ureq, allGroups, true, clpc, calendars);
    } else {
      // learning groups
      List<BusinessGroup> ownerGroups = cgm.getOwnedLearningGroupsFromAllContexts(identity);
      addCalendars(ureq, ownerGroups, true, clpc, calendars);
      List<BusinessGroup> attendedGroups = cgm.getParticipatingLearningGroupsFromAllContexts(identity);
      for (BusinessGroup ownerGroup : ownerGroups) {
        if (attendedGroups.contains(ownerGroup)) attendedGroups.remove(ownerGroup);
      }
      addCalendars(ureq, attendedGroups, false, clpc, calendars);

      // right groups
      List<BusinessGroup> rightGroups = cgm.getParticipatingRightGroupsFromAllContexts(identity);
      addCalendars(ureq, rightGroups, false, clpc, calendars);
    }
    return new CourseCalendars(courseKalendarWrapper, calendars);
  }
View Full Code Here

Examples of org.olat.course.groupsandrights.CourseGroupManager

    this.calCourseNode = calCourseNode;

    main = new Panel("calmain");

    editAccessVc = createVelocityContainer("edit_access");
    CourseGroupManager groupMgr = course.getCourseEnvironment().getCourseGroupManager();
    CourseEditorTreeModel editorModel = course.getEditorTreeModel();
    // Accessibility precondition
    Condition accessCondition = calCourseNode.getPreConditionAccess();
    accessCondContr = new ConditionEditController(ureq, getWindowControl(), groupMgr, accessCondition, "accessConditionForm",
        AssessmentHelper.getAssessableNodes(editorModel, calCourseNode), euce);
View Full Code Here

Examples of org.olat.course.groupsandrights.CourseGroupManager

    this.msNode = msNode;
   
    configurationVC = this.createVelocityContainer("edit");
    editScoringConfigButton = LinkFactory.createButtonSmall("scoring.config.enable.button", configurationVC, this);
   
    CourseGroupManager groupMgr = course.getCourseEnvironment().getCourseGroupManager();
    UserNodeAuditManager auditManager = course.getCourseEnvironment().getAuditManager();
    CourseEditorTreeModel editorModel = course.getEditorTreeModel();

    // Accessibility precondition
    Condition accessCondition = msNode.getPreConditionAccess();
View Full Code Here

Examples of org.olat.course.groupsandrights.CourseGroupManager

    // set up single page init parameters
    this.fileName = (String) config.get(SPEditController.CONFIG_KEY_FILE);
    if (fileName == null) throw new AssertException("bad configuration at lauchtime: fileName cannot be null in SinglePage!");
    this.courseFolderContainer = courseFolderContainer;
   
    CourseGroupManager cgm = userCourseEnv.getCourseEnvironment().getCourseGroupManager();
    hasEditRights = isFileTypeEditable(fileName)
        && (cgm.isIdentityCourseAdministrator(ureq.getIdentity()) || cgm.hasRight(ureq.getIdentity(), CourseRights.RIGHT_COURSEEDITOR));

    if (hasEditRights) {
      linkTreeModel = new CourseInternalLinkTreeModel(userCourseEnv.getCourseEnvironment().getRunStructure().getRootNode());
    }
   
View Full Code Here

Examples of org.olat.course.groupsandrights.CourseGroupManager

    super(ureq, wControl);
    this.foNode = forumNode;
   
    myContent = this.createVelocityContainer("edit");   

    CourseGroupManager groupMgr = course.getCourseEnvironment().getCourseGroupManager();
    CourseEditorTreeModel editorModel = course.getEditorTreeModel();
    // Reader precondition
    Condition readerCondition = foNode.getPreConditionReader();
    readerCondContr = new ConditionEditController(ureq, getWindowControl(), groupMgr, readerCondition, "readerConditionForm",
        AssessmentHelper.getAssessableNodes(editorModel, forumNode), euce);   
View Full Code Here

Examples of org.olat.course.groupsandrights.CourseGroupManager

    fcPanel = new Panel("filechoosecreateedit");
    Component fcContent = fccecontr.getInitialComponent();
    fcPanel.setContent(fcContent);
    myContent.put(fcPanel.getComponentName(), fcPanel);
   
    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, spCourseNode), euce);   
View Full Code Here

Examples of org.olat.course.groupsandrights.CourseGroupManager

    setTranslatorAndFallback(ureq.getLocale());

    this.getClass().getSuperclass();
    // Accessibility tab
    accessVC = new VelocityContainer("accessVC", FeedNodeEditController.class, "access", getTranslator(), this);
    CourseGroupManager groupMgr = course.getCourseEnvironment().getCourseGroupManager();
    CourseEditorTreeModel editorModel = course.getEditorTreeModel();

    // Moderator precondition
    Condition moderatorCondition = node.getPreConditionModerator();
    moderatroCtr = new ConditionEditController(ureq, getWindowControl(), groupMgr, moderatorCondition, "moderatorConditionForm",
View Full Code Here

Examples of org.olat.course.groupsandrights.CourseGroupManager

      putInitialPanel(mCtr.getInitialComponent());
    }
  }

  private ContactList retrieveCoaches() {
    CourseGroupManager cgm = this.userCourseEnv.getCourseEnvironment().getCourseGroupManager();
    List<Identity> coaches = cgm.getCoachesFromLearningGroup(null);
    Set<Identity> coachesWithoutDuplicates = new HashSet<Identity>(coaches);
    coaches = new ArrayList<Identity>(coachesWithoutDuplicates);
    ContactList cl = new ContactList(translate("form.message.chckbx.coaches"));
    cl.addAllIdentites(coaches);
    return cl;
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.