Ejemplo n.º 1
0
  private QuestionItemGroup createQuestionItemGroup(
      ScorisQig scorisQig, ExaminationPaper examinationPaper) throws TranslatorException {
    Integer maxResponses = null;
    QuestionItemGroup qig = new QuestionItemGroup();
    QigAttributes qigAttributes = scorisQig.getQigAttributes();
    Markscheme markscheme = examinationPaper.getMarkscheme();

    throwExceptionForNullInput(qigAttributes, "qigAttributes");
    throwExceptionForNullInput(qigAttributes.getGracePeriod(), "qigAttributes.getGracePeriod()");

    qig.setQuestionItemGroupIdentifier(scorisQig.getId());
    qig.setName(scorisQig.getName());
    // qig.setDefaultGrace(qigAttributes.getGracePeriod());
    qig.setDefaultGrace(qigAttributes.getGracePeriod() * 60);
    qig.setEStandardisationIndicator(deriveEStandardisationIndicator(scorisQig, examinationPaper));

    throwExceptionForNullInput(
        qigAttributes.getConcurrentLimit(), "qigAttributes.getConcurrentLimit()");
    qig.setMaximumConcurrentMarkingLimit(qigAttributes.getConcurrentLimit());
    qig.setMaximumCacheLimit(getMaximumCacheLimit(qig));
    qig.setMarkingTolerance(
        getMarkingTolerance(examinationPaper.getQualityModel(), scorisQig.getMarkGroup()));
    qig.setTMDTolerance(
        getTmdTolerance(examinationPaper.getQualityModel(), scorisQig.getMarkGroup()));
    maxResponses = markscheme.getTotalCompulsoryQuestions();
    if (maxResponses == null) {
      maxResponses = markscheme.getNumberOfClusters();
    }
    qig.setExpectedMaxResponses(maxResponses);
    qig.setMarkingApplicationIdentifier("SCORIS");
    /* MarkingCount is a legacy field which is a required parameter
     * RM actually ignore it and calculate it themselves - Rebecca Richardson */
    qig.setMarkingCount(1);

    qig.setEStandardisationCreationTargets(translateEStandardisationCreationTargets(scorisQig));
    handleSeedingCreationTarget(
        scorisQig.getQigAttributes(),
        examinationPaper.getQualityModel(),
        qig.getEStandardisationCreationTargets());

    qig.setCharacteristics(translateCharacteristics(scorisQig));

    qig.setExceptionTypes(translateExceptionTypes(markscheme.getExceptions()));
    qig.setAnnotations(translateAnnotations(markscheme.getOrderedAnnotations()));

    /** we don't translate any sample rules as of now! */
    return qig;
  }
Ejemplo n.º 2
0
 public boolean deriveEStandardisationIndicator(
     ScorisQig scorisQig, ExaminationPaper examinationPaper) {
   QigAttributes qigAttributes = scorisQig.getQigAttributes();
   return (examinationPaper
           .getQualityModel()
           .getQualityMethod()
           .equalsIgnoreCase(SEEDING_QUALITY_METHOD)
       || qigAttributes.hasTarget(TargetType.Creation, PRACTICE_TARGET_MODE)
       || qigAttributes.hasTarget(TargetType.Creation, STANDARDISATION_TARGET_MODE));
 }