Package org.olat.repository.controllers

Examples of org.olat.repository.controllers.ReferencableEntriesSearchController


   *      org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
   */
  public void event(UserRequest ureq, Component source, Event event) {
    if (source == chooseCPButton || source == changeCPButton) { // those must be links
      removeAsListenerAndDispose(searchController);
      searchController = new ReferencableEntriesSearchController(getWindowControl(), ureq,
          ScormCPFileResource.TYPE_NAME, translate("command.choosecp"));     
      listenTo(searchController);
      removeAsListenerAndDispose(cmc);
      cmc = new CloseableModalController(getWindowControl(), translate("close"), searchController.getInitialComponent(), true, translate("command.importcp"));
      listenTo(cmc);
View Full Code Here


   *      org.olat.core.gui.components.Component,
   *      org.olat.core.gui.control.Event)
   */
  public void event(UserRequest ureq, Component source, Event event) {
    if (source == addCommand) {
      repoSearchCtr = new ReferencableEntriesSearchController(getWindowControl(), ureq, GlossaryResource.TYPE_NAME, translate("select"));     
      listenTo(repoSearchCtr);
      cmc = new CloseableModalController(getWindowControl(), translate("close"), repoSearchCtr.getInitialComponent());
      cmc.activate();
    } else if (source == removeCommand) {
      doRemoveGlossary(ureq);
View Full Code Here

   *      org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
   */
  public void event(UserRequest ureq, Component source, Event event) {
    if (source == selectSFResButton || source == changeSFResButton) { // select or change shared folder
      // let user choose a shared folder
      searchController = new ReferencableEntriesSearchController(getWindowControl(), ureq,
          SharedFolderFileResource.TYPE_NAME, translator.translate("command.choose"));
      searchController.addControllerListener(this);
      cmc = new CloseableModalController(getWindowControl(), translator.translate("close"), searchController.getInitialComponent());
      cmc.activate();   
    } else if (source == unselectSFResButton) { // unselect shared folder     
View Full Code Here

   * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
   *      org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
   */
  public void event(UserRequest ureq, Component source, Event event) {
    if (source == chooseCPButton || source == changeCPButton) {
      searchController = new ReferencableEntriesSearchController(getWindowControl(), ureq,
          ImsCPFileResource.TYPE_NAME, translate(NLS_COMMAND_CHOOSECP));     
      listenTo(searchController);
      cmc = new CloseableModalController(getWindowControl(), translate("close"), searchController.getInitialComponent(), true, translate(NLS_COMMAND_CREATECP));
      cmc.activate();
    } else if (source == previewLink){
View Full Code Here

          showError("resource.error.isDefault",null);
          this.contextController.setValues(this.groupContext);
          return;
        }
      }
      this.repoSearchCtr = new ReferencableEntriesSearchController(getWindowControl(), ureq,
          CourseModule.getCourseTypeName(), translate("resources.add"));
      listenTo(this.repoSearchCtr);
      this.cmc = new CloseableModalController(getWindowControl(), translate("close"), this.repoSearchCtr.getInitialComponent(), true, translate("resources.add.title"));
      this.cmc.activate();
    }
View Full Code Here

   *      org.olat.core.gui.control.Event)
   */
  @Override
  protected void event(UserRequest ureq, Component source, Event event) {
    if (source == chooseButton || source == changeButton) {
      searchController = new ReferencableEntriesSearchController(getWindowControl(), ureq, resourceTypeName, translate(BUTTON_CHOOSE_FEED));
      this.listenTo(searchController);
      cmc = new CloseableModalController(getWindowControl(), translate("close"), searchController.getInitialComponent(), true,
          translate(BUTTON_CREATE_FEED));
      cmc.activate();
    } else if (source == previewLink) {
View Full Code Here

      previewLayoutCtr.addDisposableChildController(previewController);
      previewLayoutCtr.activate();
     
    } else if (source == chooseTestButton){// initiate search controller
      if (type.equals(AssessmentInstance.QMD_ENTRY_TYPE_SURVEY)) {
        searchController = new ReferencableEntriesSearchController(getWindowControl(), ureq,
            SurveyFileResource.TYPE_NAME, translate("command.chooseSurvey"));
      } else { // test and selftest use same repository resource type
        searchController = new ReferencableEntriesSearchController(getWindowControl(), ureq,
            TestFileResource.TYPE_NAME, translate("command.chooseTest"));
      }     
      this.listenTo(searchController);
      cmc = new CloseableModalController(getWindowControl(), translate("close"), searchController.getInitialComponent(), true, translate("command.chooseRepFile"));
      cmc.activate();
    }
    else if (source == changeTestButton) {//change associated test
      if(type.equals(AssessmentInstance.QMD_ENTRY_TYPE_SELF)) {//selftest
        String[] types = new String[]{TestFileResource.TYPE_NAME};
        searchController = new ReferencableEntriesSearchController(getWindowControl(), ureq, types, translate("command.chooseTest"));
        cmc = new CloseableModalController(getWindowControl(), translate("close"), searchController.getInitialComponent());
        this.listenTo(searchController);
      } else if(type.equals(AssessmentInstance.QMD_ENTRY_TYPE_ASSESS) | type.equals(AssessmentInstance.QMD_ENTRY_TYPE_SURVEY)) {//test, survey
        String[] types;
        if(type.equals(AssessmentInstance.QMD_ENTRY_TYPE_ASSESS)) {//test
          types = new String[]{TestFileResource.TYPE_NAME};
        } else {//survey
          types = new String[]{SurveyFileResource.TYPE_NAME};
        }
        RepositoryEntry re = courseNode.getReferencedRepositoryEntry();
        //look if there are PASSED entries in changelog
        //if yes create archive of results and all users can be notified about the changed test configuration
        String repositorySoftKey = (String) courseNode.getModuleConfiguration().get(IQEditController.CONFIG_KEY_REPOSITORY_SOFTKEY);
        Long repKey = RepositoryManager.getInstance().lookupRepositoryEntryBySoftkey(repositorySoftKey, true).getKey();
        List<QTIResult> results = QTIResultManager.getInstance().selectResults(course.getResourceableId(), courseNode.getIdent(), repKey, 1);
        // test was passed from an user
        boolean passed = (results != null && results.size() > 0) ? true : false;
        // test was started and not passed
        // it exists partly results for this test
        List<Identity> identitiesWithQtiSerEntry = IQManager.getInstance().getIdentitiesWithQtiSerEntry(course.getResourceableId(), courseNode.getIdent());
        if(passed || identitiesWithQtiSerEntry.size() > 0) {
          learners = new ArrayList<Identity>();
          for(QTIResult result : results) {
            Identity identity = result.getResultSet().getIdentity();
            if(identity != null && !learners.contains(identity)) learners.add(identity);
          }
          // add identities with qti.ser entry
          for (Identity identity : identitiesWithQtiSerEntry) {
            if(!learners.contains(identity)) learners.add(identity);
          }
          replaceWizard = new IQEditReplaceWizard(ureq, getWindowControl(), course, courseNode, types, learners, results, identitiesWithQtiSerEntry.size());
          replaceWizard.addControllerListener(this);
          cmc = new CloseableModalController(getWindowControl(), translate("close"), replaceWizard.getInitialComponent());
        } else {
          if(type.equals(AssessmentInstance.QMD_ENTRY_TYPE_ASSESS)) {//test         
            searchController = new ReferencableEntriesSearchController(getWindowControl(), ureq, types, translate("command.chooseTest"));
          } else {//survey
            searchController = new ReferencableEntriesSearchController(getWindowControl(), ureq, types, translate("command.chooseSurvey"));
          }
          this.listenTo(searchController);
          cmc = new CloseableModalController(getWindowControl(), translate("close"), searchController.getInitialComponent());
        }
      }
View Full Code Here

      doStep2(ureq);
    }
  }
 
  private void doStep1(UserRequest ureq) {
    searchCtr = new ReferencableEntriesSearchController(getWindowControl(), ureq, types, translator.translate("command.chooseTest"));
    searchCtr.addControllerListener(this);
    vcStep1 = new VelocityContainer("replacewizard_step1", VELOCITY_ROOT + "/replacewizard_step1.html", translator, this);
    vcStep1.put("search", searchCtr.getInitialComponent());
    this.setNextWizardStep(translator.translate("replace.wizard.title.step1"), vcStep1);
  }
View Full Code Here

        this.listenTo(cmcWikiCtr);
        cmcWikiCtr.insertHeaderCss();
        cmcWikiCtr.activate();
      }
    } else if (source == chooseButton || source == changeButton) {
      searchController = new ReferencableEntriesSearchController(getWindowControl(), ureq,
          WikiResource.TYPE_NAME, translate("command.choose"));     
      this.listenTo(searchController);
      cmcSearchController = new CloseableModalController(getWindowControl(), translate("close"), searchController.getInitialComponent(), true, translate("command.create"));
      cmcSearchController.activate();     
    } else if (source == displayForm) {
View Full Code Here

   * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
   */
  public void event(UserRequest ureq, Component source, Event event) {
    ICourse course = CourseFactory.loadCourse(ores);
    if (source == reattachButton) {
      searchController = new ReferencableEntriesSearchController(getWindowControl(), ureq,
          SharedFolderFileResource.TYPE_NAME, getTranslator().translate("command.linkresource"));
      searchController.addControllerListener(this);
      main.setContent(ComponentUtil.createTitledComponent("command.linkresource", null, getTranslator(), searchController.getInitialComponent()));
     
    } else if (source == importButton) {
View Full Code Here

TOP

Related Classes of org.olat.repository.controllers.ReferencableEntriesSearchController

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.