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:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user