MDL-40990 qbehaviours: method to say if attempts can finish naturally

This commit is contained in:
Tim Hunt
2015-03-13 14:23:02 +00:00
parent 06122e46fd
commit fd7a8af50b
6 changed files with 58 additions and 7 deletions
+10
View File
@@ -84,6 +84,16 @@ abstract class question_behaviour {
return substr(get_class($this), 11);
}
/**
* Whether the current attempt at this question could be completed just by the
* student interacting with the question, before $qa->finish() is called.
*
* @return boolean whether the attempt can finish naturally.
*/
public function can_finish_during_attempt() {
return false;
}
/**
* Cause the question to be renderered. This gets the appropriate behaviour
* renderer using {@link get_renderer()}, and adjusts the display