Package org.olat.core.gui.translator

Examples of org.olat.core.gui.translator.PackageTranslator


    super(myWControl);
    init(selectButtonLabel, ureq, withCancel, enableDirectLaunch, limitType, limitUser);
  }
 
  private void init(String selectButtonLabel, UserRequest ureq, boolean withCancel, boolean enableDirectLaunch, String limitType, String limitUser) {
    translator = new PackageTranslator(PACKAGE, ureq.getLocale());
    Roles roles = ureq.getUserSession().getRoles();
   
    vc = new VelocityContainer("reposearch", VELOCITY_ROOT + "/search.html", translator, this);
   
    Manager secMgr = ManagerFactory.getManager();
View Full Code Here


   * @param ureq
   * @param identity identity to be edited
   */
  public SystemRolesAndRightsController(WindowControl wControl, UserRequest ureq, Identity identity){
    super(wControl);   
    translator = new PackageTranslator(PACKAGE, ureq.getLocale());
    main = new VelocityContainer("sysRolesVC", VELOCITY_ROOT + "/usysRoles.html", translator, null);
    this.identity = identity;
    setInitialComponent(main);
    sysRightsForm = createForm(ureq, identity);
    main.put("sysRightsForm", sysRightsForm);   
View Full Code Here

   * @param previewMode
   */
  public TACourseNodeRunController(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, boolean previewMode) {
    super(wControl);
    this.config = ne.getCourseNode().getModuleConfiguration();
    this.translator = new PackageTranslator(PACKAGE, ureq.getLocale());
   
    readConfig(config);
    // modify hasTask/hasDropbox/hasScoring according to accessability
    if (hasTask) hasTask = ne.isCapabilityAccessible("task");
    if (hasDropbox) {
View Full Code Here

   */
  public SAPCampusMgntExtension() {

    elements.putExtensionElement(ArchiverMainController.class.getName(), new ActionExtension() {
      public String getDescription(Locale loc) {
        Translator trans = new PackageTranslator(PACKAGE, loc);
        return trans.translate("tool.description");
      }

      public String getActionText(Locale loc) {
        Translator trans = new PackageTranslator(PACKAGE, loc);
        return trans.translate("tool.actiontext");
      }

      public Controller createController(UserRequest ureq, WindowControl wControl, Object arg) {
        if (arg instanceof ICourse) {
          ICourse course = (ICourse) arg;
View Full Code Here

  public RepositorySearchController(WindowControl myWControl) {
    super(myWControl);
  }

  private void init(String selectButtonLabel, UserRequest ureq, boolean withCancel, boolean enableDirectLaunch, String[] limitTypes) {
    translator = new PackageTranslator(PACKAGE, ureq.getLocale());
    Roles roles = ureq.getUserSession().getRoles();
   
    vc = new VelocityContainer("reposearch", VELOCITY_ROOT + "/search.html", translator, this);

    searchForm = new SearchForm("searchform", translator, withCancel, roles.isOLATAdmin(), limitTypes);
View Full Code Here

   * @param previewMode
   */
  public SolutionController(UserRequest ureq, WindowControl wControl, CourseNode node, UserCourseEnvironment userCourseEnv, boolean previewMode) {
    super(wControl);
   
    translator = new PackageTranslator(PACKAGE, ureq.getLocale());
    myContent = new VelocityContainer("taskVC", VELOCITY_ROOT + "/solutionRun.html", translator, this);
   
    // returnbox display
    OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(
      SolutionController.getSolutionPathRelToFolderRoot(userCourseEnv.getCourseEnvironment(), node), null);
View Full Code Here

      UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    Controller controller;
    // Do not allow guests to start questionnaires
    Roles roles = ureq.getUserSession().getRoles();
    if (roles.isGuestOnly()) {
      Translator trans = new PackageTranslator(PACKAGE, ureq.getLocale());
      String title = trans.translate("guestnoaccess.title");
      String message = trans.translate("guestnoaccess.message");
      controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } 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 {
        Translator trans = new PackageTranslator(PACKAGE, ureq.getLocale());
        String title = trans.translate("editor.lock.title");
        String message = trans.translate("editor.lock.message");
        controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
      }
    }
    Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_iqsurv_icon");
    return new NodeRunConstructionResult(ctrl);
View Full Code Here

   */
  public String informOnDelete(Locale locale, ICourse course) {
    // Check if there are qtiresults for this questionnaire
    String repositorySoftKey = (String) getModuleConfiguration().get(IQEditController.CONFIG_KEY_REPOSITORY_SOFTKEY);
    Long repKey = RepositoryManager.getInstance().lookupRepositoryEntryBySoftkey(repositorySoftKey, true).getKey();
    if (QTIResultManager.getInstance().hasResultSets(course.getResourceableId(), this.getIdent(), repKey)) { return new PackageTranslator(
        PACKAGE_IQ, locale).translate("info.nodedelete"); }
    return null;
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public String getLinkText(Locale locale) {
    PackageTranslator translator = new PackageTranslator(PACKAGE, locale);
    return translator.translate("title_ll");
  }
View Full Code Here

  private NavElement curNavElem;
  /**
   *
   */
  public AdminSite(Locale loc) {
    Translator trans = new PackageTranslator(PACKAGE, loc);
   
    origNavElem = new DefaultNavElement(trans.translate("topnav.admin"), trans.translate("topnav.admin.alt"), "o_site_admin");
    curNavElem = new DefaultNavElement(origNavElem);
  }
View Full Code Here

TOP

Related Classes of org.olat.core.gui.translator.PackageTranslator

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.