Examples of overrideResourceableId()


Examples of org.olat.fileresource.types.FileResource.overrideResourceableId()

        // message
        deleteFileResource(tempFr);
        throw exception;
      }

      tempFr.overrideResourceableId(resourceableId);
    }

    // add olat resource
    OLATResourceManager rm = OLATResourceManager.getInstance();
    OLATResource ores = rm.findOrPersistResourceable(tempFr);
View Full Code Here

Examples of org.olat.fileresource.types.FileResource.overrideResourceableId()

    return new FileDetailsForm("fileDetails", translator, res);
  }

  private FileResource getAsGenericFileResource(OLATResourceable res) {
    FileResource fr = new FileResource();
    fr.overrideResourceableId(res.getResourceableId());
    return fr;
  }

  /**
   * Creates a copy of the given resourceable.
View Full Code Here

Examples of org.olat.fileresource.types.FileResource.overrideResourceableId()

         
          //these are eiterh surveys or tests
          //try it as testresource then as survey, after this give up
          Long oresId = new Long(folderOfResource.getName());
          FileResource fr = new TestFileResource();
          fr.overrideResourceableId(oresId);
          myEntry = rm.lookupRepositoryEntry(fr,false);
          if(myEntry==null){
            //no qti test found, try the qti survey
            fr = new SurveyFileResource();
            fr.overrideResourceableId(oresId);
View Full Code Here

Examples of org.olat.fileresource.types.FileResource.overrideResourceableId()

          fr.overrideResourceableId(oresId);
          myEntry = rm.lookupRepositoryEntry(fr,false);
          if(myEntry==null){
            //no qti test found, try the qti survey
            fr = new SurveyFileResource();
            fr.overrideResourceableId(oresId);
            myEntry = rm.lookupRepositoryEntry(fr,false);
          }
          //
          if(myEntry!=null){
            List identites = manager.getVisibleIdentitiesByPowerSearch(folderOfUser.getName(),null,false, null,null,null,null,null);
View Full Code Here

Examples of org.olat.fileresource.types.SurveyFileResource.overrideResourceableId()

    } else {
      RepositoryEntry repositoryEntry = ne.getCourseNode().getReferencedRepositoryEntry();
      OLATResourceable ores = repositoryEntry.getOlatResource();
      Long resId = ores.getResourceableId();
      SurveyFileResource fr = new SurveyFileResource();
      fr.overrideResourceableId(resId);
      if(!CoordinatorManager.getCoordinator().getLocker().isLocked(fr, null)) {
        AssessmentManager am = userCourseEnv.getCourseEnvironment().getAssessmentManager();
        IQSecurityCallback sec = new CourseIQSecurityCallback(this, am, ureq.getIdentity());
        controller = new IQRunController(userCourseEnv, this.getModuleConfiguration(), sec, ureq, wControl, this);
      } else {
View Full Code Here

Examples of org.olat.fileresource.types.SurveyFileResource.overrideResourceableId()

  /**
   * @see org.olat.repository.handlers.RepositoryHandler#getEditorController(org.olat.core.id.OLATResourceable org.olat.core.gui.UserRequest, org.olat.core.gui.control.WindowControl)
   */
  public Controller getEditorController(OLATResourceable res, UserRequest ureq, WindowControl wControl) {
    SurveyFileResource fr = new SurveyFileResource();
    fr.overrideResourceableId(res.getResourceableId());
   
    //check if we can edit in restricted mode -> only typos
    ReferenceManager refM = ReferenceManager.getInstance();
    List referencees = refM.getReferencesTo(res);
    //String referencesSummary = refM.getReferencesToSummary(res, ureq.getLocale());
View Full Code Here

Examples of org.olat.fileresource.types.TestFileResource.overrideResourceableId()

         
          //these are eiterh surveys or tests
          //try it as testresource then as survey, after this give up
          Long oresId = new Long(folderOfResource.getName());
          FileResource fr = new TestFileResource();
          fr.overrideResourceableId(oresId);
          myEntry = rm.lookupRepositoryEntry(fr,false);
          if(myEntry==null){
            //no qti test found, try the qti survey
            fr = new SurveyFileResource();
            fr.overrideResourceableId(oresId);
View Full Code Here

Examples of org.olat.fileresource.types.TestFileResource.overrideResourceableId()

          fr.overrideResourceableId(oresId);
          myEntry = rm.lookupRepositoryEntry(fr,false);
          if(myEntry==null){
            //no qti test found, try the qti survey
            fr = new SurveyFileResource();
            fr.overrideResourceableId(oresId);
            myEntry = rm.lookupRepositoryEntry(fr,false);
          }
          //
          if(myEntry!=null){
            List identites = manager.getVisibleIdentitiesByPowerSearch(folderOfUser.getName(),null,false, null,null,null,null,null);
View Full Code Here

Examples of org.olat.fileresource.types.TestFileResource.overrideResourceableId()

      IQSecurityCallback sec = new CourseIQSecurityCallback(this, am, ureq.getIdentity());
      RepositoryEntry repositoryEntry = ne.getCourseNode().getReferencedRepositoryEntry();
      OLATResourceable ores = repositoryEntry.getOlatResource();
      Long resId = ores.getResourceableId();
      TestFileResource fr = new TestFileResource();
      fr.overrideResourceableId(resId);
      if(!CoordinatorManager.getCoordinator().getLocker().isLocked(fr, null)) {
        //QTI1
        controller = new IQRunController(userCourseEnv, this.getModuleConfiguration(), sec, ureq, wControl, this);
      } else {
        Translator trans = new PackageTranslator(PACKAGE, ureq.getLocale());
View Full Code Here

Examples of org.olat.fileresource.types.TestFileResource.overrideResourceableId()

  /**
   * @see org.olat.repository.handlers.RepositoryHandler#getEditorController(org.olat.core.id.OLATResourceable org.olat.core.gui.UserRequest, org.olat.core.gui.control.WindowControl)
   */
  public Controller getEditorController(OLATResourceable res, UserRequest ureq, WindowControl wControl) {
    TestFileResource fr = new TestFileResource();
    fr.overrideResourceableId(res.getResourceableId());
   
    //check if we can edit in restricted mode -> only typos
    ReferenceManager refM = ReferenceManager.getInstance();
    List referencees = refM.getReferencesTo(res);
    //String referencesSummary = refM.getReferencesToSummary(res, ureq.getLocale());
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.