Examples of findCourseNodeProperty()


Examples of org.olat.course.properties.CoursePropertyManager.findCourseNodeProperty()

    final CoursePropertyManager cpm = userCourseEnv.getCourseEnvironment().getCoursePropertyManager();
    final CourseNode thisCourseNode = this;
    Forum theForum = null;
   
    Codepoint.codepoint(FOCourseNode.class, "findCourseNodeProperty")
    Property forumKeyProp = cpm.findCourseNodeProperty(thisCourseNode, null, null, FORUM_KEY);
    //System.out.println("System.out.println - findCourseNodeProperty");
    if(forumKeyProp!=null) {
      // Forum does already exist, load forum with key from properties
      Long forumKey = forumKeyProp.getLongValue();
      theForum = fom.loadForum(forumKey);
View Full Code Here

Examples of org.olat.course.properties.CoursePropertyManager.findCourseNodeProperty()

        public Forum execute() {
        Forum forum = null;
        Long forumKey;             
        Codepoint.codepoint(FOCourseNode.class,"doInSync");
        //System.out.println("Codepoint - doInSync");
        Property forumKeyProperty = cpm.findCourseNodeProperty(thisCourseNode, null, null, FORUM_KEY);       
        if (forumKeyProperty == null) {
          // First call of forum, create new forum and save forum key as property         
          forum = fom.addAForum();
          forumKey = forum.getKey();
          forumKeyProperty = cpm.createCourseNodePropertyInstance(thisCourseNode, null, null, FORUM_KEY, null, forumKey, null, null);
View Full Code Here

Examples of org.olat.course.properties.CoursePropertyManager.findCourseNodeProperty()

   *
   * @see org.olat.course.nodes.CourseNode#archiveNodeData(java.util.Locale, org.olat.course.ICourse, java.io.File, java.lang.String)
   */
  public void archiveNodeData(Locale locale, ICourse course, File exportDirectory, String charset) {
    CoursePropertyManager cpm = course.getCourseEnvironment().getCoursePropertyManager();
    Property forumKeyProperty = cpm.findCourseNodeProperty(this, null, null, FORUM_KEY);
    if(forumKeyProperty != null){
      Long forumKey = forumKeyProperty.getLongValue();
      String forumName = Formatter.makeStringFilesystemSave(this.getShortTitle());

      // append export timestamp to avoid overwriting previous export
View Full Code Here

Examples of org.olat.course.properties.CoursePropertyManager.findCourseNodeProperty()

   * @see org.olat.course.nodes.CourseNode#informOnDelete(org.olat.core.gui.UserRequest,
   *      org.olat.course.ICourse)
   */
  public String informOnDelete(Locale locale, ICourse course) {
    CoursePropertyManager cpm = PersistingCoursePropertyManager.getInstance(course);
    Property forumKeyProperty = cpm.findCourseNodeProperty(this, null, null, FORUM_KEY);
    if (forumKeyProperty == null) return null; // no forum created yet
    return new PackageTranslator(PACKAGE_FO, locale).translate("warn.forumdelete");
  }

  /**
 
View Full Code Here

Examples of org.olat.course.properties.CoursePropertyManager.findCourseNodeProperty()

    SubscriptionContext forumSubContext = CourseModule.createTechnicalSubscriptionContext(course.getCourseEnvironment(), this);
    NotificationsManager.getInstance().delete(forumSubContext);

    // delete the forum, if there is one (is created on demand only)
    CoursePropertyManager cpm = PersistingCoursePropertyManager.getInstance(course);
    Property forumKeyProperty = cpm.findCourseNodeProperty(this, null, null, FORUM_KEY);
    if (forumKeyProperty == null) return; // no forum created yet
    Long forumKey = forumKeyProperty.getLongValue();
    ForumManager.getInstance().deleteForum(forumKey); // delete the forum
    cpm.deleteProperty(forumKeyProperty); // delete the property
  }
View Full Code Here

Examples of org.olat.course.properties.CoursePropertyManager.findCourseNodeProperty()

    // if (node == null) return new Double(Double.NEGATIVE_INFINITY);

    CoursePropertyManager pm = getUserCourseEnv().getCourseEnvironment().getCoursePropertyManager();
    Identity identity = getUserCourseEnv().getIdentityEnvironment().getIdentity();

    Property firstTime = pm.findCourseNodeProperty(node, identity, null, ENCourseNode.PROPERTY_INITIAL_ENROLLMENT_DATE);

    if (firstTime != null) {
      String firstTimeMillis = firstTime.getStringValue();
      return Double.valueOf(firstTimeMillis);
    } else {
View Full Code Here

Examples of org.olat.course.properties.CoursePropertyManager.findCourseNodeProperty()

  private void doIndexForum(SearchResourceContext parentResourceContext, ICourse course, CourseNode courseNode, OlatFullIndexer indexWriter) throws IOException,InterruptedException  {
    if (log.isDebug()) log.debug("Index Course Forum...");
    ForumManager fom = ForumManager.getInstance();
    CoursePropertyManager cpm = course.getCourseEnvironment().getCoursePropertyManager();

    Property forumKeyProperty = cpm.findCourseNodeProperty(courseNode, null, null, FOCourseNode.FORUM_KEY);
    // Check if forum-property exist
    if (forumKeyProperty != null) {
      Long forumKey = forumKeyProperty.getLongValue();
      Forum forum = fom.loadForum(forumKey);
//      SearchResourceContext forumSearchResourceContext = new SearchResourceContext(parentResourceContext);
View Full Code Here

Examples of org.olat.course.properties.CoursePropertyManager.findCourseNodeProperty()

  public void loadStatusFormData(StatusForm statusForm, CourseNode node, UserCourseEnvironment userCourseEnv) {
    Identity identity = userCourseEnv.getIdentityEnvironment().getIdentity();
    CoursePropertyManager cpm = userCourseEnv.getCourseEnvironment().getCoursePropertyManager();
    Property statusProperty;

    statusProperty = cpm.findCourseNodeProperty(node, identity, null, PROPERTY_KEY_STATUS);
    if (statusProperty == null) {
      // found no status property => init DEFAULT value
      statusForm.setSelectedStatus(StatusForm.STATUS_VALUE_INITIAL);
    } else {
      String value = statusProperty.getStringValue();
View Full Code Here

Examples of org.olat.course.properties.CoursePropertyManager.findCourseNodeProperty()

    String selectedKey = statusForm.getSelectedStatus();
   
    CoursePropertyManager cpm = userCourseEnv.getCourseEnvironment().getCoursePropertyManager();
    Property statusProperty;

    statusProperty = cpm.findCourseNodeProperty(node, identity, null, PROPERTY_KEY_STATUS);
    if (statusProperty == null) {
      statusProperty = cpm.createCourseNodePropertyInstance(node, identity, null, PROPERTY_KEY_STATUS, null, null,selectedKey, null);
      cpm.saveProperty(statusProperty);
    } else {
      statusProperty.setStringValue(selectedKey);
View Full Code Here

Examples of org.olat.course.properties.CoursePropertyManager.findCourseNodeProperty()

    //if (node == null) return new Double(Double.NEGATIVE_INFINITY);

    CoursePropertyManager pm = getUserCourseEnv().getCourseEnvironment().getCoursePropertyManager();
    Identity identity = getUserCourseEnv().getIdentityEnvironment().getIdentity();
   
    Property recentTime = pm.findCourseNodeProperty(node,
        identity, null, ENCourseNode.PROPERTY_RECENT_ENROLLMENT_DATE);

    if (recentTime != null) {
      String firstTimeMillis = recentTime.getStringValue();
      return Double.valueOf(firstTimeMillis);
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.