Moodle  2.2.1
http://www.collinsharper.com
question_behaviour_with_save Class Reference
Inheritance diagram for question_behaviour_with_save:
Collaboration diagram for question_behaviour_with_save:

Public Member Functions

 required_question_definition_type ()
 process_save (question_attempt_pending_step $pendingstep)
 summarise_submit (question_attempt_step $step)
 summarise_save (question_attempt_step $step)
 summarise_finish ($step)

Protected Member Functions

 is_same_response (question_attempt_step $pendingstep)
 is_complete_response (question_attempt_step $pendingstep)

Detailed Description

A subclass of question_behaviour that implements a save action that is suitable for most questions that implement the question_manually_gradable interface.

Definition at line 529 of file behaviourbase.php.


Member Function Documentation

is_complete_response ( question_attempt_step pendingstep) [protected]

Work out whether the response in $pendingstep represent a complete answer to the question. Normally this will call question_manually_gradable::is_complete_response, but some behaviours, for example the CBM ones, have their own parts to the response.

Parameters:
question_attempt_step$pendingstepcontains the new responses.
Returns:
bool whether the new response is complete.

Definition at line 554 of file behaviourbase.php.

Here is the call graph for this function:

Here is the caller graph for this function:

is_same_response ( question_attempt_step pendingstep) [protected]

Work out whether the response in $pendingstep are significantly different from the last set of responses we have stored.

Parameters:
question_attempt_step$pendingstepcontains the new responses.
Returns:
bool whether the new response is the same as we already have.

Definition at line 540 of file behaviourbase.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Implementation of processing a save action that should be suitable for most subclasses.

Parameters:
question_attempt_pending_step$pendingstepa partially initialised step containing all the information about the action that is being peformed.
Returns:
bool either question_attempt::KEEP or question_attempt::DISCARD

Reimplemented in qbehaviour_interactive, qbehaviour_immediatefeedback, qbehaviour_adaptive, and qbehaviour_deferredfeedback.

Definition at line 565 of file behaviourbase.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Most behaviours can only work with question_definitions of a particular subtype, or that implement a particular interface. This method lets the behaviour document that. The type of question passed to the constructor is then checked against this type.

Deprecated:
since 2.2. Please use/override is_compatible_question() instead.
Returns:
string class/interface name.

Reimplemented from question_behaviour.

Definition at line 530 of file behaviourbase.php.

summarise_finish ( step)

Reimplemented from question_behaviour.

Definition at line 599 of file behaviourbase.php.

Here is the caller graph for this function:

Definition at line 589 of file behaviourbase.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 584 of file behaviourbase.php.

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations