Package org.olat.ims.qti.editor.beecom.objects

Examples of org.olat.ims.qti.editor.beecom.objects.Control


    newItem.setIdent(EDITOR_IDENT+":"+ITEM_TYPE_KPRIM+":"+String.valueOf(CodeHelper.getRAMUniqueID()));
    newItem.setTitle(trans.translate("editor.newquestion"));
    newItem.setLabel("");

    // controls
    Control control = new Control();
    ArrayList controls = new ArrayList();
    controls.add(control);
    newItem.setItemcontrols(controls);
   
    // prepare question
View Full Code Here


    newItem.setIdent(EDITOR_IDENT+":"+ITEM_TYPE_FIB+":"+String.valueOf(CodeHelper.getRAMUniqueID()));
    newItem.setTitle(trans.translate("editor.newquestion"));
    newItem.setLabel("");

    // conrols
    Control control = new Control();
    ArrayList controls = new ArrayList();
    controls.add(control);
    newItem.setItemcontrols(controls);
   
    QTIEditHelper.setFeedbackMastery(newItem, "");
View Full Code Here

    newItem.setIdent(EDITOR_IDENT+":"+ITEM_TYPE_ESSAY+":"+String.valueOf(CodeHelper.getRAMUniqueID()));
    newItem.setTitle(trans.translate("editor.newquestion"));
    newItem.setLabel("");

    // conrols
    Control control = new Control();
    ArrayList controls = new ArrayList();
    controls.add(control);
    newItem.setItemcontrols(controls);
   
    QTIEditHelper.setFeedbackMastery(newItem, "");
View Full Code Here

   * Get controls.
   * @param object
   * @return Controls.
   */
  public static Control getControl(QTIObject object) {
    Control control = null;
    List controls = null;
    if (Item.class.isAssignableFrom(object.getClass())) {
      Item item = (Item) object;
      controls = item.getItemcontrols();
    } else if (Section.class.isAssignableFrom(object.getClass())) {
      Section section = (Section) object;
      controls = section.getSectioncontrols();
    } else if (Assessment.class.isAssignableFrom(object.getClass())) {
      Assessment assessment = (Assessment) object;
      controls = assessment.getAssessmentcontrols();
    }
    for (Iterator i = controls.iterator(); i.hasNext();) {
      Control tmp = (Control) i.next();
      if (tmp.getView() != null) {
        if (tmp.getView().equalsIgnoreCase("all")) {
          control = tmp;
          break;
        }
      } else {
        control = tmp;
View Full Code Here

          assessment.setTitle(newTitle);
          assessment.setObjectives(newObjectives);
        }
        //
        if (!surveyMode && !restrictedEdit) {
          Control tmpControl = (Control) QTIEditHelper.getControl(assessment);
          boolean oldInheritControls = assessment.isInheritControls();
          boolean newInheritControls = ureq.getParameter("inheritswitch").equals("Yes");
          assessment.setInheritControls(newInheritControls);

          String feedbackswitchTmp = ureq.getParameter("feedbackswitch");
          String hintswitchTmp = ureq.getParameter("hintswitch");
          String solutionswitchTmp = ureq.getParameter("solutionswitch");
          tmpControl.setSwitches(feedbackswitchTmp, hintswitchTmp, solutionswitchTmp);
          if (tmpControl.getHint() != Control.CTRL_UNDEF || tmpControl.getHint() != Control.CTRL_UNDEF
              || tmpControl.getSolution() != Control.CTRL_UNDEF) assessment.setInheritControls(true);

          if (oldInheritControls && !newInheritControls) {
            tmpControl.setSwitches(Control.CTRL_UNDEF, Control.CTRL_UNDEF, Control.CTRL_UNDEF);
            assessment.setInheritControls(false);
          }

          OutcomesProcessing outcomesProcessing = assessment.getOutcomes_processing();
          if (outcomesProcessing == null) {
View Full Code Here

TOP

Related Classes of org.olat.ims.qti.editor.beecom.objects.Control

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.