MDL-27747 quiz summary, add a CSS class to the table rows based on question state.

The standard themes do not use this for anything, but it makes it easier for themers to do cool stuff.
Also improve the API for getting the question state class.
This commit is contained in:
Tim Hunt
2011-06-07 15:11:04 +01:00
parent 4464734bb6
commit 97cdc1de72
4 changed files with 36 additions and 1 deletions
+9
View File
@@ -517,6 +517,15 @@ class question_attempt {
return $this->behaviour->get_state_string($showcorrectness);
}
/**
* @param bool $showcorrectness Whether right/partial/wrong states should
* be distinguised.
* @return string a CSS class name for the current state.
*/
public function get_state_class($showcorrectness) {
return $this->get_state()->get_state_class($showcorrectness);
}
/**
* @return int the timestamp of the most recent step in this question attempt.
*/