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

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


      itemControl.setHint(showHints.getSelected() == 0 ? Control.CTRL_YES : Control.CTRL_NO);
      itemControl.setSolution(showSolution.getSelected() == 0 ? Control.CTRL_YES : Control.CTRL_NO);
      q.setHintText(conditionalCommentFilter.filter(hint.getRawValue())); // trust authors, don't to XSS filtering
      q.setSolutionText(conditionalCommentFilter.filter(solution.getRawValue())); // trust authors, don't to XSS filtering
      if (limitTime.getSelectedKey().equals("y")) {
        item.setDuration(new Duration(1000 * timeSec.getIntValue() + 1000 * 60 * timeMin.getIntValue()));
      } else {
        item.setDuration(null);
      }
      if (limitAttempts.getSelectedKey().equals("y")) {
        item.setMaxattempts(attempts.getIntValue());
View Full Code Here


    // attributes
    String sISODuration = element.getTextTrim();
    // null values no problems (default: null = false)
    long millis = QTIHelper.parseISODuration(sISODuration);
    if (millis == 0) return null;
    return new Duration(millis);
  }
View Full Code Here

      item.setIdent(item.getIdent().replaceFirst("FIB", "ESSAY"));
    }

   
    // DURATION
    Duration duration =
      (Duration) parserManager.parse(element.element("duration"));
    item.setDuration(duration);

    // CONTROLS
    List itemcontrolsXML = element.elements("itemcontrol");
View Full Code Here

            } catch (NumberFormatException nfe) {
              durationMin = "0";
              durationSec = "0";             
              this.showWarning("error.duration");
            }
            Duration d = new Duration(durationMin, durationSec);
            section.setDuration(d);
            main.contextPut("duration", d);
          } else {
            section.setDuration(null);
            main.contextRemove("duration");
View Full Code Here

            } catch (NumberFormatException nfe) {
              durationMin = "0";
              durationSec = "0";             
              this.showWarning("error.duration");
            }
            Duration d = new Duration(durationMin, durationSec);
            assessment.setDuration(d);
            main.contextPut("duration", assessment.getDuration());
          } else {
            assessment.setDuration(null);
            main.contextRemove("duration");
View Full Code Here

TOP

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

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.