Package org.olat.core.gui.translator

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


   */
  public UsermanagerUserSearchController(UserRequest ureq, WindowControl wControl, List<Identity> identitiesList,
      Integer status, boolean showEmailButton, boolean showTitle) {
    super(ureq, wControl);

    Translator translator = UserManager.getInstance().getPropertyHandlerTranslator(getTranslator());
    setTranslator(translator);

    mailVC = createVelocityContainer("usermanagerMail");

    backFromMail = LinkFactory.createLinkBack(mailVC, this);
View Full Code Here


  /**
   * @param args
   */
  public static TableController createController(ExtendedIdentitiesTableDataModel dataModel, UserRequest ureq, WindowControl wControl, ControllerEventListener listeningController, boolean actionEnabled) {
    Locale loc = ureq.getLocale();
    Translator trans = new PackageTranslator(PACKAGE, loc);
    TableGuiConfiguration tableConfig = new TableGuiConfiguration();
    tableConfig.setDownloadOffered(true);
    tableConfig.setPreferencesOffered(true, "ExtendedIdentitiesTable");   
    tableConfig.setTableEmptyMessage(trans.translate("error.no.user.found"));

    trans = UserManager.getInstance().getPropertyHandlerTranslator(trans);
    TableController tableCtr = new TableController(tableConfig, ureq, wControl, trans, listeningController);
    dataModel.addColumnDescriptors(tableCtr, trans);
    tableCtr.setTableDataModel(dataModel);
View Full Code Here

   * @param allNodesList List of all assessable course nodes
   * @return StaticMultipleSelectionElement The configured form element
   */
  private StaticMultipleSelectionElement initNodeSelectionElement(String elemId, ScoreCalculator scoreCalculator, List selectedNodeList,
      List allNodesList) {
    Translator trans = getTranslator();
    boolean addDeletedNodeIdent = false;   
    if (scoreCalculator != null && selectedNodeList != null) {
      for (Iterator iter = selectedNodeList.iterator(); iter.hasNext();) {
        String nodeIdent = (String) iter.next();
        boolean found = false;
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

              coachedUsers.addAll(securityManager.getIdentitiesOfSecurityGroup(group.getPartipiciantGroup()));
            }
          }

          List<IQTESTCourseNode> testNodes = getCourseTestNodes(course);
          Translator translator = Util.createPackageTranslator(AssessmentNotificationsHandler.class, locale);

          String title = translator.translate("notifications.header", new String[]{course.getCourseTitle()});
          si = new SubscriptionInfo(new TitleItem(title, CSS_CLASSS_IQTEST_ICON), null);

          for (Iterator<IQTESTCourseNode> i = testNodes.iterator(); i.hasNext();) {
            IQTESTCourseNode test = i.next();

            QTIResultManager qrm = QTIResultManager.getInstance();
            List testResultSets = qrm.getResultSets(course.getResourceableId(), test.getIdent(),
                test.getReferencedRepositoryEntry().getKey(), null);

            for (Iterator j = testResultSets.iterator(); j.hasNext();) {
              QTIResultSet qrs = (QTIResultSet) j.next();
              // - modify date on test set must be newer than last visit of
              // assessment tool
              // - user must either be course administrator (access to all
              // users granted)
              // or in a course right group with the assessment tool right or
              // a course
              // coach. in the second case, only tests of users are shown that
              // the coach does actually
              // coach himself. he does not have access to other users
              Date modDate = qrs.getLastModified();
              if (modDate.after(compareDate) && (hasFullAccess || PersistenceHelper.listContainsObjectByKey(coachedUsers, qrs.getIdentity()))) {
                String score = (new Float(qrs.getScore())).toString();
                String desc = translator.translate("notifications.entry", new String[] { test.getShortTitle(),
                    NotificationHelper.getFormatedName(qrs.getIdentity()), score });

                String urlToSend = null;
                if(p.getBusinessPath() != null) {
                  String businessPath = p.getBusinessPath() + "[assessmentTool:0][Identity:" + qrs.getIdentity().getKey() + "][CourseNode:" + test.getIdent() + "]";
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

  @Override
  public String createTitleInfo(Subscriber subscriber, Locale locale) {
    try {
      ICourse course = CourseFactory.loadCourse(subscriber.getPublisher().getResId());
      Translator trans = Util.createPackageTranslator(AssessmentNotificationsHandler.class, locale);
      String title = trans.translate("notifications.title", new String[]{ course.getCourseTitle() });
      return title;
    } catch (Exception e) {
      log.error("Error while creating assessment notifications for subscriber: " + subscriber.getKey(), e);
      checkPublisher(subscriber.getPublisher());
      return "-";
View Full Code Here

    return null;
  }

  private TreeModel buildTreeModel() {
    GenericTreeNode gtnChild, admin, confSub;
    Translator translator = getTranslator();
   
    GenericTreeModel gtm = new GenericTreeModel();
    admin = new GenericTreeNode();   
    admin.setTitle(translator.translate("menu.admin"));
    admin.setUserObject("admin");
    admin.setAltText(translator.translate("menu.admin.alt"));
    gtm.setRootNode(admin);

    //
    // The sysinfo stuff
    //

    gtnChild = new GenericTreeNode();   
    gtnChild.setTitle(translator.translate("menu.sysinfo"));
    gtnChild.setUserObject("sysinfo");
    gtnChild.setAltText(translator.translate("menu.sysinfo.alt"));
    admin.addChild(gtnChild);
    admin.setDelegate(gtnChild);

    //
    // The system config submenu
    //

    confSub = new GenericTreeNode();   
    confSub.setTitle(translator.translate("menu.config"));
    confSub.setUserObject("config");
    confSub.setAltText(translator.translate("menu.config.alt"));
    admin.addChild(confSub);

    gtnChild = new GenericTreeNode();   
    gtnChild.setTitle(translator.translate("menu.layout"));
    gtnChild.setUserObject("layout");
    gtnChild.setAltText(translator.translate("menu.layout.alt"));
    confSub.addChild(gtnChild);
    confSub.setDelegate(gtnChild);
   
    gtnChild = new GenericTreeNode();   
    gtnChild.setTitle(translator.translate("menu.i18n"));
    gtnChild.setUserObject("i18n");
    gtnChild.setAltText(translator.translate("menu.i18n.alt"));
    confSub.addChild(gtnChild);

    gtnChild = new GenericTreeNode();   
    gtnChild.setTitle(translator.translate("menu.ajax"));
    gtnChild.setUserObject("ajax");
    gtnChild.setAltText(translator.translate("menu.ajax.alt"));
    confSub.addChild(gtnChild);

    gtnChild = new GenericTreeNode();   
    gtnChild.setTitle(translator.translate("menu.quota"));
    gtnChild.setUserObject("quota");
    gtnChild.setAltText(translator.translate("menu.quota.alt"));
    confSub.addChild(gtnChild);
   
    if(CoreSpringFactory.containsBean("org.olat.core.util.vfs.version.FolderVersioningConfigurator")) {
      gtnChild = new GenericTreeNode();   
      gtnChild.setTitle(translator.translate("menu.versions"));
      gtnChild.setUserObject("versions");
      gtnChild.setAltText(translator.translate("menu.versions.alt"));
      confSub.addChild(gtnChild);
    }

    //
    // other tools and stuff
    //
   
    gtnChild = new GenericTreeNode();   
    gtnChild.setTitle(translator.translate("menu.registration"));
    gtnChild.setUserObject("registration");
    gtnChild.setAltText(translator.translate("menu.registration.alt"));
    admin.addChild(gtnChild);
   
   
    if (InstantMessagingModule.isEnabled()) {
      gtnChild = new GenericTreeNode();   
      gtnChild.setTitle(translator.translate("menu.imadmin"));
      gtnChild.setUserObject("imadmin");
      gtnChild.setAltText(translator.translate("menu.imadmin.alt"));
      admin.addChild(gtnChild);
    }

    gtnChild = new GenericTreeNode();   
    gtnChild.setTitle(translator.translate("menu.advancedproperties"));
    gtnChild.setUserObject("advancedproperties");
    gtnChild.setAltText(translator.translate("menu.advancedproperties.alt"));
    admin.addChild(gtnChild);
   
    // show translation tool or cusomize link, not both
    if (I18nModule.isTransToolEnabled()) {
      gtnChild = new GenericTreeNode();   
      gtnChild.setTitle(translator.translate("menu.onlinetranslation"));
      gtnChild.setUserObject("onlinetranslation");
      gtnChild.setAltText(translator.translate("menu.onlinetranslation.alt"));
      admin.addChild(gtnChild);         
    } else if (I18nModule.isOverlayEnabled()) {
      gtnChild = new GenericTreeNode();   
      gtnChild.setTitle(translator.translate("menu.onlinetranslation.customize"));
      gtnChild.setUserObject("onlinetranslation");
      gtnChild.setAltText(translator.translate("menu.onlinetranslation.customize.alt"));
      admin.addChild(gtnChild);               
    }
   
   
    if (SearchServiceImpl.getInstance().isLocal()) {
      //since 6.0.3 the search service is distributed
      //we have to check if we are the instance having
      //the local search service, e.g. the one for creating the index
      //and deliver results for queries.
      gtnChild = new GenericTreeNode();
      gtnChild.setTitle(translator.translate("menu.search"));
      gtnChild.setUserObject("search");
      gtnChild.setAltText(translator.translate("menu.search.alt"));
      admin.addChild(gtnChild);
    }
   
    gtnChild = new GenericTreeNode();   
    gtnChild.setTitle(translator.translate("menu.notifications"));
    gtnChild.setUserObject("notifications");
    gtnChild.setAltText(translator.translate("menu.notifications.alt"));
    admin.addChild(gtnChild);
   

    gtnChild = new GenericTreeNode();   
    gtnChild.setTitle(translator.translate("menu.statistics"));
    gtnChild.setUserObject("statistics");
    gtnChild.setAltText(translator.translate("menu.statistics.alt"));
    admin.addChild(gtnChild);
   
// todo: 2009-09.22/cg move JMX menu-item to testing tab, because it is a beta-version
//    gtnChild = new GenericTreeNode();   
//    gtnChild.setTitle(translator.translate("menu.jmx"));
View Full Code Here

  /**
   * @see org.olat.gui.control.generic.portal.AbstractPortlet#createInstance(org.olat.core.gui.control.WindowControl,
   *      org.olat.core.gui.UserRequest, java.util.Map)
   */
  public Portlet createInstance(WindowControl wControl, UserRequest ureq, Map configuration) {
    Translator translator = Util.createPackageTranslator(RepositoryPortlet.class, ureq.getLocale());
    Portlet p = new RepositoryPortlet();
    p.setName(this.getName());
    p.setConfiguration(configuration);
    p.setTranslator(translator);
    return p;
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.Translator

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.