Package org.olat.core.commons.modules.bc

Examples of org.olat.core.commons.modules.bc.FolderRunController


  }

  private Controller createController(String uobject, UserRequest ureq) {
    if (uobject.equals(MENU_BC)) {
      titleStr = translate("menu.bc");
      return new FolderRunController(PersonalFolderManager.getInstance().getContainer(ureq.getIdentity()), true, true, ureq, getWindowControl());
    } else if (uobject.equals(MENU_MYSETTINGS)) {
      titleStr = translate("menu.mysettings");
      return new PersonalSettingsController(ureq, getWindowControl());
    } else if (uobject.equals(MENU_CALENDAR)) {
      titleStr = translate("menu.calendar");
View Full Code Here


    PackageTranslator trans = new PackageTranslator(PACKAGE, ureq.getLocale());
    String relPath = getFolderRelPath();
    OlatRootFolderImpl rootContainer = new OlatRootFolderImpl(relPath, null);
    OlatNamedContainerImpl namedContainer = new OlatNamedContainerImpl(trans.translate("folder"), rootContainer);
    namedContainer.setLocalSecurityCallback(new CollabSecCallback(relPath, subsContext));
    FolderRunController frc = new FolderRunController(namedContainer, true, true, ureq, wControl);
    return frc;
  }
View Full Code Here

    if (item == null) item = sharedFolder.resolve(DEFAULTDOTHTML);
    if (item == null) item = sharedFolder.resolve(DEFAULTDOTHTM);

    if (item == null) {
      sharedFolder.setLocalSecurityCallback(new ReadOnlyCallback());
      controller = new FolderRunController(sharedFolder, true, true, ureq, getWindowControl());
      controller.addControllerListener(this);
    } else {
      controller = new WebsiteDisplayController(ureq, getWindowControl(), sharedFolder, item.getName());
    }
    vcDisplay.put("displayer", controller.getInitialComponent());
View Full Code Here

    vcEdit = new VelocityContainer("main", VELOCITY_ROOT + "/index.html", translator, this);
    previewButton = LinkFactory.createButtonSmall("command.preview", vcEdit, this);
   
    re = RepositoryManager.getInstance().lookupRepositoryEntry(res, true);
    sharedFolder = SharedFolderManager.getInstance().getNamedSharedFolder(re);
    folderRunController = new FolderRunController(sharedFolder, true, true, ureq, getWindowControl());
    vcEdit.put("folder", folderRunController.getInitialComponent());
   
    setInitialComponent(vcEdit);

  }
View Full Code Here

        previewController.activate();
       
      } else if (event.getCommand().equals(CMD_COURSEFOLDER)) {
        // folder for course
        VFSContainer namedCourseFolder = new NamedContainerImpl(translate(NLS_COURSEFOLDER_NAME), course.getCourseFolderContainer());
        FolderRunController bcrun = new FolderRunController(namedCourseFolder, true, ureq, getWindowControl());
        bcrun.addLoggingResourceable(LoggingResourceable.wrap(course));
        Component folderComponent = bcrun.getInitialComponent();
        CloseableModalController clc = new CloseableModalController(getWindowControl(), translate(NLS_COURSEFOLDER_CLOSE),
            folderComponent);
        clc.activate();
       
      }
View Full Code Here

    // returnbox display
    OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(
      SolutionController.getSolutionPathRelToFolderRoot(userCourseEnv.getCourseEnvironment(), node), null);
    OlatNamedContainerImpl namedContainer = new OlatNamedContainerImpl("solutions", rootFolder);
    namedContainer.setLocalSecurityCallback(new ReadOnlyCallback());
    solutionFolderRunController = new FolderRunController(namedContainer, false, ureq, wControl);
    solutionFolderRunController.addControllerListener(this);
    myContent.put("solutionbox", solutionFolderRunController.getInitialComponent());
    if ( !previewMode) {
      // offer subscription, but not to guests
      subsContext = SolutionFileUploadNotificationHandler.getSubscriptionContext(userCourseEnv, node);
View Full Code Here

    // dropbox display
    String assesseeName = userCourseEnv.getIdentityEnvironment().getIdentity().getName();
    OlatRootFolderImpl rootDropbox = new OlatRootFolderImpl(getDropboxFilePath(assesseeName), null);
    OlatNamedContainerImpl namedDropbox = new OlatNamedContainerImpl(getDropboxRootFolderName(assesseeName), rootDropbox);
    namedDropbox.setLocalSecurityCallback(new ReadOnlyAndDeleteCallback());
    dropboxFolderRunController = new FolderRunController(namedDropbox, false, ureq, getWindowControl());
    dropboxFolderRunController.addControllerListener(this);
    myContent.put("dropbox", dropboxFolderRunController.getInitialComponent());

    // returnbox display
    OlatRootFolderImpl rootReturnbox = new OlatRootFolderImpl(getReturnboxFilePath(assesseeName), null);
    OlatNamedContainerImpl namedReturnbox = new OlatNamedContainerImpl(getReturnboxRootFolderName(assesseeName), rootReturnbox);
    namedReturnbox.setLocalSecurityCallback(new ReturnboxFullAccessCallback(rootReturnbox.getRelPath(),userCourseEnv, node));
    returnboxFolderRunController = new FolderRunController(namedReturnbox, false, ureq, getWindowControl());

    returnboxFolderRunController.addControllerListener(this);
    myContent.put("returnbox", returnboxFolderRunController.getInitialComponent());

    // insert Status Pull-Down Menu depending on user role == author
View Full Code Here

        quota = QuotaManager.getInstance().createQuota(namedContainer.getRelPath(), defQuota.getQuotaKB(), defQuota.getUlLimitKB());
      }
      VFSSecurityCallback secCallback = new FullAccessWithQuotaCallback(quota);
      namedContainer.setLocalSecurityCallback(secCallback);
      CloseableModalController cmc = new CloseableModalController(getWindowControl(), translate("close"),
          new FolderRunController(namedContainer, false, ureq, getWindowControl()).getInitialComponent());
      cmc.activate();
      return;
    }
  }
View Full Code Here

        // no task assigned
        String relPath = TACourseNode.getTaskFolderPathRelToFolderRoot(course, node);
        OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(relPath, null);
        OlatNamedContainerImpl namedFolder = new OlatNamedContainerImpl(translate("taskfolder"), rootFolder);
        namedFolder.setLocalSecurityCallback(getTaskFolderSecCallback(relPath));
        frc = new FolderRunController(namedFolder, false, ureq, getWindowControl());
        CloseableModalController cmc = new CloseableModalController(getWindowControl(), translate("folder.close"), frc
            .getInitialComponent());
        cmc.activate();
      } else {
        // already assigned task => open dialog with warn
        String[] args = new String[] { new Integer(assignedProps.size()).toString() };       
        dialogBoxController = this.activateOkCancelDialog(ureq, "", getTranslator().translate("taskfolder.overwriting.confirm", args), dialogBoxController);
        List cs = new ArrayList();
        cs.add(dialogBoxController);
        LayoutController vcc = new LayoutController(Layouts.VERTICAL, cs);             
      }
    } else if (source == modulesForm) {
      if (event == Form.EVNT_FORM_CANCELLED) {
        return;
      } else if (event == Form.EVNT_VALIDATION_OK) {
        config.set(TACourseNode.CONF_TASK_ENABLED, new Boolean(modulesForm.hasTask()));
        config.set(TACourseNode.CONF_DROPBOX_ENABLED, new Boolean(modulesForm.hasDropbox()));       
        config.set(TACourseNode.CONF_RETURNBOX_ENABLED, new Boolean(modulesForm.hasReturnbox()));       
        config.set(TACourseNode.CONF_SCORING_ENABLED, new Boolean(modulesForm.hasScoring()));
        config.set(TACourseNode.CONF_SOLUTION_ENABLED, new Boolean(modulesForm.hasSolution()));
        myTabbedPane.setEnabled(taskTabPosition, modulesForm.hasTask());
        if (modulesForm.hasTask()) {
          accessabilityVC.put("taskCondition", taskConditionC.getInitialComponent());
        } else {
          accessabilityVC.remove(taskConditionC.getInitialComponent());
        }
        myTabbedPane.setEnabled(dropboxTabPosition, modulesForm.hasDropbox());
        if (modulesForm.hasDropbox()) {
          accessabilityVC.put("dropCondition", dropConditionC.getInitialComponent());
        } else {
          accessabilityVC.remove(dropConditionC.getInitialComponent());
        }
        //add/remove returnboxConditionC     
        if (modulesForm.hasReturnbox()) {
          accessabilityVC.put("returnboxCondition", returnboxConditionC.getInitialComponent());
        } else {
          accessabilityVC.remove(returnboxConditionC.getInitialComponent());
        }       
        myTabbedPane.setEnabled(scoringTabPosition, modulesForm.hasScoring());
        if (modulesForm.hasScoring()) {
          accessabilityVC.put("scoringCondition", scoringConditionC.getInitialComponent());
        } else {
          accessabilityVC.remove(scoringConditionC.getInitialComponent());
        }
        myTabbedPane.setEnabled(solutionTabPosition, modulesForm.hasSolution());
        if (modulesForm.hasSolution()) {
          accessabilityVC.put("solutionCondition", solutionConditionC.getInitialComponent());
        } else {
          accessabilityVC.remove(solutionConditionC.getInitialComponent());
        }
       
        fireEvent(ureq, NodeEditController.NODECONFIG_CHANGED_EVENT);
        return;
      }
    } else if (source == dropboxForm) {
      if (event == Form.EVNT_FORM_CANCELLED) {
        return;
      } else if (event == Form.EVNT_VALIDATION_OK) {
        config.set(TACourseNode.CONF_DROPBOX_ENABLEMAIL, new Boolean(dropboxForm.mailEnabled()));
        config.set(TACourseNode.CONF_DROPBOX_CONFIRMATION, dropboxForm.getConfirmation());
        fireEvent(ureq, NodeEditController.NODECONFIG_CHANGED_EVENT);
        return;
      }
    } else if (source == vfButton) {     
      if (log.isDebug()) log.debug("Event for sampleVC");
      // switch to new dialog
      OlatNamedContainerImpl namedContainer = TACourseNode.getNodeFolderContainer(node, course.getCourseEnvironment());
      Quota quota = QuotaManager.getInstance().getCustomQuota(namedContainer.getRelPath());
      if (quota == null) {
        Quota defQuota = QuotaManager.getInstance().getDefaultQuota(QuotaConstants.IDENTIFIER_DEFAULT_NODES);
        quota = QuotaManager.getInstance().createQuota(namedContainer.getRelPath(), defQuota.getQuotaKB(), defQuota.getUlLimitKB());
      }
      VFSSecurityCallback secCallback = new FullAccessWithQuotaCallback(quota);
      namedContainer.setLocalSecurityCallback(secCallback);
      CloseableModalController cmc = new CloseableModalController(getWindowControl(), translate("close"),
        new FolderRunController(namedContainer, false, ureq, getWindowControl()).getInitialComponent());
      cmc.activate();
     
      if (log.isDebug()) log.debug("Switch to sample folder dialog : DONE");
      return;
    } else if (source == editScoringConfigButton){
View Full Code Here

        // ok: open task folder
        String relPath = TACourseNode.getTaskFolderPathRelToFolderRoot(course, node);
        OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(relPath, null);
        OlatNamedContainerImpl namedFolder = new OlatNamedContainerImpl(translate("taskfolder"), rootFolder);
        namedFolder.setLocalSecurityCallback(getTaskFolderSecCallback(relPath));
        frc = new FolderRunController(namedFolder, false, urequest, getWindowControl());
        CloseableModalController cmc = new CloseableModalController(getWindowControl(), translate("folder.close"), frc
            .getInitialComponent());
        cmc.activate();
        fireEvent(urequest, Event.CHANGED_EVENT);
      }
View Full Code Here

TOP

Related Classes of org.olat.core.commons.modules.bc.FolderRunController

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.