solving MDL-7496 for calculated
This commit is contained in:
@@ -885,6 +885,11 @@ class question_calculated_qtype extends question_dataset_dependent_questiontype
|
||||
return $datasetmenus;
|
||||
}
|
||||
|
||||
function print_question_grading_details(&$question, &$state, &$cmoptions, &$options) {
|
||||
$virtualqtype = $this->get_virtual_qtype();
|
||||
$virtualqtype->print_question_grading_details($question, $state, $cmoptions, $options) ;
|
||||
}
|
||||
|
||||
function get_correct_responses(&$question, &$state) {
|
||||
$virtualqtype = $this->get_virtual_qtype();
|
||||
if($unit = $virtualqtype->get_default_numerical_unit($question)){
|
||||
|
||||
@@ -359,9 +359,10 @@ class question_shortanswer_qtype extends default_questiontype {
|
||||
attempt and displays the overall grade obtained counting all previous
|
||||
responses (and penalties) */
|
||||
|
||||
global $QTYPES ;
|
||||
// MDL-7496 show correct answer after "Incorrect"
|
||||
$correctanswer = '';
|
||||
if ($correctanswers = $this->get_correct_responses($question, $state)) {
|
||||
if ($correctanswers = $QTYPES[$question->qtype]->get_correct_responses($question, $state)) {
|
||||
if ($options->readonly && $options->correct_responses) {
|
||||
$delimiter = '';
|
||||
if ($correctanswers) {
|
||||
|
||||
Reference in New Issue
Block a user