Examples of CoursePropertyManager


Examples of org.olat.course.properties.CoursePropertyManager

        infoProjectBrokerRunMode = translate("info.projectbroker.runmode.accept.automatically.limited", Integer.toString(moduleConfig.getNbrParticipantsPerTopic()) );
      }     
    }
    contentVC.contextPut("infoProjectBrokerRunMode", infoProjectBrokerRunMode);
    mainPanel = new Panel("projectlist_panel");
    CoursePropertyManager cpm = userCourseEnv.getCourseEnvironment().getCoursePropertyManager();
    if (  (ProjectBrokerManagerFactory.getProjectGroupManager().isAccountManager(ureq.getIdentity(), cpm, ne.getCourseNode() ) && !previewMode)
        || userCourseEnv.getCourseEnvironment().getCourseGroupManager().isIdentityCourseAdministrator(ureq.getIdentity())
        || ureq.getUserSession().getRoles().isOLATAdmin()) {
      contentVC.contextPut("isAccountManager", true);
      createNewProjectButton = LinkFactory.createButtonSmall("create.new.project.button", contentVC, this);
View Full Code Here

Examples of org.olat.course.properties.CoursePropertyManager

   *      org.olat.core.id.Identity, org.olat.core.id.Identity,
   *      java.lang.String)
   */
  public void appendToUserNodeLog(CourseNode courseNode, Identity identity, Identity assessedIdentity, String logText) {
    ICourse course = CourseFactory.loadCourse(ores);
    CoursePropertyManager cpm = course.getCourseEnvironment().getCoursePropertyManager();
    // Forma log message
    Date now = new Date();
    SimpleDateFormat sdb = new SimpleDateFormat("yyyy-MM-dd HH:mm");
    String date = sdb.format(now);
    StringBuilder sb = new StringBuilder();
    sb.append(LOG_DELIMITER);
    sb.append("Date: ").append(date).append("\n");
    sb.append("User: ").append(identity.getName()).append("\n");
    sb.append(logText).append("\n");
    Property logProperty = cpm.findCourseNodeProperty(courseNode, assessedIdentity, null, LOG_IDENTIFYER);
    if (logProperty == null) {
      logProperty = cpm.createCourseNodePropertyInstance(courseNode, assessedIdentity, null, LOG_IDENTIFYER, null, null, null, sb.toString());
      cpm.saveProperty(logProperty);
    } else {
      String newLog = logProperty.getTextValue() + sb.toString();
      String limitedLogContent = createLimitedLogContent(newLog,60000);
      logProperty.setTextValue(limitedLogContent);
      cpm.updateProperty(logProperty);
    }

  }
View Full Code Here

Examples of org.olat.course.properties.CoursePropertyManager

  /**
   * @see org.olat.course.auditing.AuditManager#hasUserNodeLogs(org.olat.course.nodes.CourseNode)
   */
  public boolean hasUserNodeLogs(CourseNode node) {
    ICourse course = CourseFactory.loadCourse(ores);
    CoursePropertyManager cpm = course.getCourseEnvironment().getCoursePropertyManager();
    List<?> logsProperties = cpm.listCourseNodeProperties(node, null, null, LOG_IDENTIFYER);
    return logsProperties.size() == 0 ? false : true;
  }
View Full Code Here

Examples of org.olat.course.properties.CoursePropertyManager

   * @see org.olat.course.auditing.AuditManager#getUserNodeLog(org.olat.course.nodes.CourseNode,
   *      org.olat.core.id.Identity)
   */
  public String getUserNodeLog(CourseNode courseNode, Identity identity) {
    ICourse course = CourseFactory.loadCourse(ores);
    CoursePropertyManager cpm = course.getCourseEnvironment().getCoursePropertyManager();
    Property property = cpm.findCourseNodeProperty(courseNode, identity, null, LOG_IDENTIFYER);
    if (property == null) return null;
    String result = property.getTextValue();
    return result;
  }
View Full Code Here

Examples of org.olat.course.properties.CoursePropertyManager

      Iterator iter = entries.iterator();
      while (iter.hasNext()) {
        RepositoryEntry re = (RepositoryEntry) iter.next();
        // load course from entry
        ICourse course = CourseFactory.loadCourse(re.getOlatResource());
        CoursePropertyManager cpm = course.getCourseEnvironment().getCoursePropertyManager();
        List identities = cpm.getAllIdentitiesWithCourseAssessmentData();
        // now create all statements for this course
        esm.updateEfficiencyStatements(course,identities, false);
      }
      uhd.setBooleanDataValue(TASK_EFFICIENCY_STATEMENT_DONE, true);
      upgradeManager.setUpgradesHistory(uhd, VERSION);
View Full Code Here

Examples of org.olat.course.properties.CoursePropertyManager

    CourseEnvironment cenv = CourseFactory.createEmptyCourse(ores, "Test", "Test", "learningObjectives").getCourseEnvironment();
    // 1. enroll wg1 user
    IdentityEnvironment ienv = new IdentityEnvironment();
    ienv.setIdentity(wg1);
    UserCourseEnvironment userCourseEnv = new UserCourseEnvironmentImpl(ienv, cenv);
    CoursePropertyManager coursePropertyManager = userCourseEnv.getCourseEnvironment().getCoursePropertyManager();
    enrollmentManager.doEnroll(wg1,bgWithWaitingList, enNode, coursePropertyManager,this /*WindowControl mock*/,testTranslator,
        new ArrayList()/*enrollableGroupNames*/, new ArrayList()/*enrollableAreaNames*/, userCourseEnv.getCourseEnvironment().getCourseGroupManager())
    assertTrue("Enrollment failed, user='wg1'", BusinessGroupManagerImpl.getInstance().isIdentityInBusinessGroup(wg1,bgWithWaitingList))
    int participantsCounter = ManagerFactory.getManager().countIdentitiesOfSecurityGroup(bgWithWaitingList.getPartipiciantGroup());
    assertTrue("Wrong number of participants," + participantsCounter , participantsCounter == 1);
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.