Package org.olat.course.run.environment

Examples of org.olat.course.run.environment.CourseEnvironment


    final AssessmentManager am = new PreviewAssessmentManager();
    final CoursePropertyManager cpm = new PreviewCoursePropertyManager();
    final Structure runStructure = course.getEditorTreeModel().createStructureForPreview();
    final String title = course.getCourseTitle();

    CourseEnvironment previewCourseEnvironment = new PreviewCourseEnvironment(title, runStructure, new Date(), course.getCourseFolderContainer(),
        course.getCourseBaseContainer(),course.getResourceableId(), cpm, cgm, auditman, am);     
   
    return previewCourseEnvironment;
  }
View Full Code Here


      if (NotificationsManager.getInstance().isPublisherValid(p) && compareDate.before(latestNews)) {
        OLATResourceable ores = null;
        if (p.getResName().equals( CourseModule.getCourseTypeName() ) ) {
          // resId = CourseResourceableId           p.getSubidentifier() = wikiCourseNode.getIdent()
          ICourse course = CourseFactory.loadCourse(resId);
          CourseEnvironment cenv = course.getCourseEnvironment();
          CourseNode courseNode = cenv.getRunStructure().getNode(p.getSubidentifier());
          if(courseNode == null){
            //OLAT-3356 because removing wikicoursenodes was not propagated to
            // disable subcriptions, we may end up here with a NULL wikicoursenode
            // Best we can do here -> return noSubsInfo and clean up
            NotificationsManager.getInstance().deactivate(p);
View Full Code Here

    if (publisher.getResName().equals( CourseModule.getCourseTypeName() ) ) {
      // resId = CourseResourceableId           p.getSubidentifier() = wikiCourseNode.getIdent()
      CourseNode courseNode = null;
      try {
        ICourse course = CourseFactory.loadCourse(resId);
        CourseEnvironment cenv = course.getCourseEnvironment();
        courseNode = cenv.getRunStructure().getNode(publisher.getSubidentifier());
      } catch (Exception e) {
        Log.warn("Could not load course with resid: "+resId, e);
        return null;
      }
      if(courseNode == null){
View Full Code Here

  public Object getValue() {
    CourseEditorEnv cev = getUserCourseEnv().getCourseEditorEnv();
    if(cev!=null) {
      return new Double(0);
    }
    CourseEnvironment ce = getUserCourseEnv().getCourseEnvironment();
    long time = ce.getCurrentTimeMillis();
    return new Double(time);
  }
View Full Code Here

        sctx = subsContexts.get(courseId);
        if (sctx == null) {
          // a subscription context showing to the root node (the course's root
          // node is started when clicking such a notification)
          CourseNode cn = course.getRunStructure().getRootNode();
          CourseEnvironment ce = course.getCourseEnvironment();
          //FIXME:fg:b little problem is that the assessment tool and the course are not "the same" anymore, that is you can open the same course twice in the
          // dynamic tabs by a) klicking e.g. via repo, and b via notifications link to the assementtool
          sctx = new SubscriptionContext(CourseModule.ORES_COURSE_ASSESSMENT, ce.getCourseResourceableId(), cn.getIdent());
          subsContexts.put(courseId, sctx);
        }
      }
    }
View Full Code Here

    summaryTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("summary.column.header.date", 0, null, ureq.getLocale()));
    summaryTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("summary.column.header.duration", 1, null, ureq.getLocale()));
    summaryTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("summary.column.header.assesspoints", 2, null, ureq.getLocale()));
    summaryTableCtr.addColumnDescriptor(new StaticColumnDescriptor("sel", "summary.column.header.details", getTranslator().translate("select")));

    CourseEnvironment courseEnv = userCourseEnvironment.getCourseEnvironment();

    String username = userCourseEnvironment.getIdentityEnvironment().getIdentity().getName();
    rawDatas = ScormAssessmentManager.getInstance().visitScoDatas(username, courseEnv, node);
    sequencerModel = ScormAssessmentManager.getInstance().getSequencerModel(username, courseEnv, node);
View Full Code Here

        // File cpRoot =
        // FileResourceManager.getInstance().unzipFileResource(re.getOlatResource());
        Identity ident = ureq.getIdentity();
        boolean isOlatAdmin = ureq.getUserSession().getRoles().isOLATAdmin();
        boolean isResourceOwner = RepositoryManager.getInstance().isOwnerOfRepositoryEntry(ident, re);
        CourseEnvironment cenv = course.getCourseEnvironment();
        SubscriptionContext subsContext = WikiManager.createTechnicalSubscriptionContextForCourse(cenv, wikiCourseNode);
        WikiSecurityCallback callback = new WikiSecurityCallbackImpl(null, isOlatAdmin, false, false, isResourceOwner,subsContext);
        wikiCtr = WikiManager.getInstance().createWikiMainController(ureq, getWindowControl(), re.getOlatResource(), callback, null);
        cmcWikiCtr = new CloseableModalController(getWindowControl(), translate("command.close"), wikiCtr.getInitialComponent());       
        this.listenTo(cmcWikiCtr);
View Full Code Here

    Visitor visitor = new NodeDeletionVisitor(course);
    TreeVisitor tv = new TreeVisitor(visitor, course.getRunStructure().getRootNode(), true);
    tv.visitAll();
    // delete assessment notifications
    CourseNode cn = course.getRunStructure().getRootNode();
    CourseEnvironment ce = course.getCourseEnvironment();
    SubscriptionContext sc = new SubscriptionContext(CourseModule.ORES_COURSE_ASSESSMENT, ce.getCourseResourceableId(), cn.getIdent());
    NotificationsManager.getInstance().delete(sc);
   
    clearCalenderSubscriptions(course);
    // delete course configuration
    CourseConfigManagerImpl.getInstance().deleteConfigOf(course);
View Full Code Here

  public void testEnroll() throws Exception {
    System.out.println("testEnroll: start...");
    EnrollmentManager enrollmentManager = EnrollmentManager.getInstance();
    ENCourseNode enNode = new ENCourseNode();
    OLATResourceable ores = OresHelper.createOLATResourceableTypeWithoutCheck("TestCourse");
    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();
View Full Code Here

TOP

Related Classes of org.olat.course.run.environment.CourseEnvironment

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.