2.7.1 No. of tries and marking

The number of tries that a student is allowed at a question and the marking of the question is carried out entirely within OpenMark. The question author must ensure that they are 'extending' a suitably configured OpenMark class when writing their questions, for example SimpleQuestion1. OpenMark will share appropriate information with Moodle.

OpenMark questions that are to be used in Deferred feedback iCMAs must extend the OpenMark class DeferredFeedbackQuestion().

The following OpenMark functions and XML components control the number of tries* and the marking and supply this information to Moodle

  • <marks>3</marks> in the question XML will set the maximum mark. Please be aware that OpenMark will only export integers. However it is possible to scale these once they are in Moodle e.g. if a question has a maximum mark of 3 and a mark of 1 is achieved this can be reported in Moodle as 0.33.
  • protected void setMaxAttempts(int iMaxAttempts) - to set the number of tries.
  • getResults().setScore(int iMarks, int iAttempts) - to set the score and whether the question has been answered correctly, partially correctly or incorrectly. The parameter iAttempts is used as follows.
    • if the question has been answered correctly provide the attempt at which the correct answer was given.
    • if it is partially correct after the maximum number of tries use the constant ATTEMPTS_PARTIALLYCORRECT.
    • if it is incorrect after the maximum number of tries use the constant ATTEMPTS_WRONG.

For examples of the partial scoring please consult the SDK125 interactive media developers who have developed SimpleQuestion3 that allows two tries with partial scoring after the second try.

Please note that in Moodle a ‘try’ is a try at a question and in interactive mode ‘Try again’ leads to a second or third try. An ‘attempt’ is an attempt at the whole iCMA which finishes when the ‘Submit’ button is pressed.

2.7.2 Storing student data