mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-28653 question output. Add a class to the main div based on question state.
This makes it possible themes do cool things. For example change more of the display depending on whether the answer was correct or not.
This commit is contained in:
parent
3fdc622697
commit
25d9a6a664
@ -62,8 +62,12 @@ class core_question_renderer extends plugin_renderer_base {
|
||||
$output = '';
|
||||
$output .= html_writer::start_tag('div', array(
|
||||
'id' => 'q' . $qa->get_slot(),
|
||||
'class' => 'que ' . $qa->get_question()->qtype->name() . ' ' .
|
||||
$qa->get_behaviour_name(),
|
||||
'class' => implode(' ', array(
|
||||
'que',
|
||||
$qa->get_question()->qtype->name(),
|
||||
$qa->get_behaviour_name(),
|
||||
$qa->get_state_class($options->correctness && $qa->has_marks()),
|
||||
))
|
||||
));
|
||||
|
||||
$output .= html_writer::tag('div',
|
||||
|
Loading…
x
Reference in New Issue
Block a user