New engine attempt data structure, new opportunities for calculated questiontypes.

New engine attempt data structure, new opportunities for calculated questiontypes.

by Pierre Pichet -
Number of replies: 1

The new engine structure store more data than the actual

question_attempts

This replaces question_sessions.

This store many new variables including




questionsummary TEXT If this question uses randomisation, it should set this field to summarise what random version the student actually saw. This is a human-readable textual summary of the student's response which might, for example, be used in a report.
rightanswer TEXT This is a human-readable textual summary of the right answer to this question. Might be used, for example on the quiz preview, to help people who are testing the question. Or might be used in reports.
responsesummary TEXT This is a textual summary of the student's response (basically what you would expect to in the Quiz responses report).

question_attempt_step

id INT(10) NOT NULL AUTO INCREMENT Unique id. Linked to from question_states.stateid.
questionattemptid INT(10) NOT NULL REFERENCES question_attempts.id Which question attempt this data belongs to.
sequencenumber INT(4) NOT NULL Numbers the steps in a question attempt sequentially.
state INT(4) NOT NULL The type of state this is. One of the constants defined by the question_state class.
fraction NUMBER(12,7) The grade the student has earned for this question, on a scale of 0..1. Needs to be multiplied by question_attempts.maxgrade to get the true grade.
timecreated INT(10) NOT NULL Time-stamp of the event that lead to this state.
userid INT(10) NOT NULL The user who created this state. For states created during the attempt, this would be the student id. For a state for adding a comment or manually grading, this would be the teacher id.

question_attempt_step_data

This stores the data submitted by the student (a list of name => value pairs) that lead to the state stateid. This replaces the old question_states.answer field.

The calculated question is a question that use randomisation as the values for the numerical variables are selected among a set of dataitems.

This mean also the the right answer change from one question attempt to another.

In the actual code the question can be rebuild as the dataset item number is stored in the question_states.answer field with the student response

'dataset'.$state->options->datasetitem.'-'student numeric  response||||| student numeric unit ;

 

If, for some reasons, the dataset values stored in the datasets tables have been modified, we cannot get back to the real question that had been submitted to the student.

Storing in the question_attempt_step_data all datasets values used in the question will assure the integrity of the question as submitted to the student.

However if for some reasons the teacher want to modify the question answers and regrade, he could change the formulas (as he will do for a  shortanswer questiontype) but modifications to the datasets data stored in the dataset table won't change the answer neither the question text.

In which conditions  the teacher should be allowed to modify the questions is another discussion.

Pierre

Average of ratings: -
In reply to Pierre Pichet

Re: New engine attempt data structure, new opportunities for calculated questiontypes.

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You seem to have understood how it is supposed to work. The plan will be to store the exact values the students saw when attempting the question in the question_attempt_step_data table. (At least that is my plan now. We will have to see how it works out as I write the code.)