Package org.olat.course.editor

Examples of org.olat.course.editor.EditorMainController


   * @return editor controller for the given course resourceable; if the editor
   *         is already locked, it returns a controller with a lock message
   */
  public static Controller createEditorController(UserRequest ureq, WindowControl wControl, OLATResourceable olatResource) {
    ICourse course = loadCourse(olatResource);
    EditorMainController emc = new EditorMainController(ureq, wControl, course);
    if (!emc.getLockEntry().isSuccess()) {
      // get i18n from the course runmaincontroller to say that this editor is
      // already locked by another person

      Translator translator = new PackageTranslator(Util.getPackageName(RunMainController.class), ureq.getLocale());
      wControl.setWarning(translator.translate("error.editoralreadylocked", new String[] { emc.getLockEntry().getOwner().getName() }));
      return null;
      //return new MonologController(ureq.getLocale(), translator.translate("error.editoralreadylocked", new String[] { emc.getLockEntry()
      //    .getOwner().getName() }), null, true);
    }
    //set the logger if editor is started
    //since 5.2 groups / areas can be created from the editor -> should be logged.
    emc.addLoggingResourceable(LoggingResourceable.wrap(course));
    return emc;
  }
View Full Code Here

TOP

Related Classes of org.olat.course.editor.EditorMainController

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.