Package org.olat.ims.qti.container

Examples of org.olat.ims.qti.container.ItemContext.eval()


    if (!ict.isUnderMaxAttempts()) {
      // current item must be below maxattempts
      return QTIConstants.ERROR_SUBMITTEDITEM_TOOMANYATTEMPTS;
    }
    int subres = ict.addItemInput(itemInput);
    ict.eval(); // to have an up-to-date score
    return subres;
  }
 
  public int submitMultipleItems(ItemsInput curitsinp) {
    // = submit a whole section at once
View Full Code Here


      ItemInput itemInput = (ItemInput) it_inp.next();
      String ident = itemInput.getIdent();
      ItemContext ict = sc.getItemContext(ident);
      if (ict == null) throw new RuntimeException("submitted item id ("+ident+") not found in section sectioncontext "+sc.getIdent());
      int subres = ict.addItemInput(itemInput);
      ict.eval(); // to be up-to-date with the scores
      if (subres != QTIConstants.ITEM_SUBMITTED) {
        // item had a timelimit or maxattempts, which is nonsense if displaymode = sectionPage
        // throw new RuntimeException("section "+sc.getIdent()+" was submitted, but item "+ict.getIdent()+"  could not be submitted, because it had a timelimit or maxattempts, which is nonsense if displaymode = sectionPage");
        sectionResult = QTIConstants.ERROR_SECTION_PART_OUTOFTIME;
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.