Package org.olat.ims.qti.container.qtielements

Examples of org.olat.ims.qti.container.qtielements.RenderInstructions


   */
  public ItemPreviewController(WindowControl wControl, Item item, QTIEditorPackage qtiPackage, Translator translator) {
    super(wControl);
    this.item = item;
    this.qtiPackage = qtiPackage;
    renderInstructions = new RenderInstructions();
    renderInstructions.put(RenderInstructions.KEY_STATICS_PATH, qtiPackage.getMediaBaseURL() + "/");
    renderInstructions.put(RenderInstructions.KEY_LOCALE, translator.getLocale());
    renderInstructions.put(RenderInstructions.KEY_RENDER_TITLE, Boolean.TRUE);
    main = new VelocityContainer("vcItemPreview", VC_ROOT + "/tab_itemPreview.html", translator, this);
    main.contextPut("itemPreview", getQuestionPreview(item));
View Full Code Here


  }
 
  private void displayItem(StringOutput sb, Renderer renderer, URLBuilder ubu, ItemContext itc, AssessmentInstance ai) {
    StringBuilder buffer = new StringBuilder(1000);
    Resolver resolver = ai.getResolver();
    RenderInstructions ri = new RenderInstructions();
    ri.put(RenderInstructions.KEY_STATICS_PATH, resolver.getStaticsBaseURI() + "/");
    ri.put(RenderInstructions.KEY_LOCALE, renderer.getTranslator().getLocale());
    StringOutput soCommandURI = new StringOutput(50);
    ubu.buildURI(soCommandURI, new String[] { VelocityContainer.COMMAND_ID }, new String[] { "sflash" });
    ri.put(RenderInstructions.KEY_APPLET_SUBMIT_URI, soCommandURI.toString());
    if (itc.getItemInput() != null)
      ri.put(RenderInstructions.KEY_ITEM_INPUT, itc.getItemInput());
    ri.put(RenderInstructions.KEY_RENDER_TITLE, Boolean.valueOf(ai.isDisplayTitles()));
    itc.getQtiItem().render(buffer, ri);
    sb.append(buffer);
  }
View Full Code Here

      sb.append("<h3>" + sc.getTitle() + "</h3>");
    Objectives objectives = sc.getObjectives();
    if (objectives != null) {
      StringBuilder sbTmp = new StringBuilder();
      Resolver resolver = ai.getResolver();
      RenderInstructions ri = new RenderInstructions();
      ri.put(RenderInstructions.KEY_STATICS_PATH, resolver.getStaticsBaseURI() + "/");
      objectives.render(sbTmp, ri);
      sb.append(sbTmp);
    }
    // if Menu not visible, or if visible but not selectable, and itemPage sequence (one question per page) 
    // show button to navigate to the first question of the current section     
View Full Code Here

  private void displayAssessmentInfo(StringOutput sb, AssessmentContext ac, AssessmentInstance ai, IQComponent comp, URLBuilder ubu, Translator translator) {
    Objectives objectives = ac.getObjectives();
    if (objectives != null) {
      StringBuilder sbTmp = new StringBuilder();
      Resolver resolver = ai.getResolver();
      RenderInstructions ri = new RenderInstructions();
      ri.put(RenderInstructions.KEY_STATICS_PATH, resolver.getStaticsBaseURI() + "/");
      objectives.render(sbTmp, ri);
      sb.append(sbTmp);
    }
    //if Menu not visible, or if visible but not selectable show button to navigate to the first section panel     
    IQMenuDisplayConf menuDisplayConfig = comp.getMenuDisplayConf();
View Full Code Here

  }

  private void displayFeedback(StringOutput sb, GenericQTIElement feedback, AssessmentInstance ai, Locale locale) {
    StringBuilder sbTmp = new StringBuilder();
    Resolver resolver = ai.getResolver();
    RenderInstructions ri = new RenderInstructions();
    ri.put(RenderInstructions.KEY_STATICS_PATH, resolver.getStaticsBaseURI() + "/");
    ri.put(RenderInstructions.KEY_LOCALE, locale);
    feedback.render(sbTmp, ri);
    sb.append(sbTmp);
  }
View Full Code Here

TOP

Related Classes of org.olat.ims.qti.container.qtielements.RenderInstructions

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.