Event types

The $state object (and the quiz_states table) has a field $event which indicates the event that led to the state's creation. The field can take the value of any of the following constants (defined in locallib.php):

When new responses are being processed by quiz_process_responses() then this function is being passed the event type in $action->event while the responses are in $action->responses.