mirror of
https://github.com/moodle/moodle.git
synced 2025-04-11 19:42:35 +02:00
MDL-63459 qtype_calculatedmulti: fix incorrect hint object type
This commit is contained in:
parent
1e8374c370
commit
614077863b
@ -215,6 +215,10 @@ class qtype_calculatedmulti extends qtype_calculated {
|
||||
return parent::make_answer($answer);
|
||||
}
|
||||
|
||||
protected function make_hint($hint) {
|
||||
return question_hint_with_parts::load_from_record($hint);
|
||||
}
|
||||
|
||||
public function comment_header($question) {
|
||||
$strheader = '';
|
||||
$delimiter = '';
|
||||
|
@ -44,8 +44,8 @@ class qtype_calculatedmulti_walkthrough_test extends qbehaviour_walkthrough_test
|
||||
$q = test_question_maker::make_question('calculatedmulti', 'singleresponse');
|
||||
$q->shuffleanswers = false;
|
||||
$q->hints = array(
|
||||
new question_hint(1, 'This is the first hint.', FORMAT_HTML),
|
||||
new question_hint(2, 'This is the second hint.', FORMAT_HTML),
|
||||
new question_hint_with_parts(1, 'This is the first hint.', FORMAT_HTML, true, false),
|
||||
new question_hint_with_parts(2, 'This is the second hint.', FORMAT_HTML, true, false),
|
||||
);
|
||||
$this->start_attempt_at_question($q, 'interactive', 3, 2);
|
||||
$values = $q->vs->get_values();
|
||||
@ -108,8 +108,8 @@ class qtype_calculatedmulti_walkthrough_test extends qbehaviour_walkthrough_test
|
||||
$q = test_question_maker::make_question('calculatedmulti', 'multiresponse');
|
||||
$q->shuffleanswers = false;
|
||||
$q->hints = array(
|
||||
new question_hint(1, 'This is the first hint.', FORMAT_HTML),
|
||||
new question_hint(2, 'This is the second hint.', FORMAT_HTML),
|
||||
new question_hint_with_parts(1, 'This is the first hint.', FORMAT_HTML, true, false),
|
||||
new question_hint_with_parts(2, 'This is the second hint.', FORMAT_HTML, true, false),
|
||||
);
|
||||
$this->start_attempt_at_question($q, 'interactive', 3, 2);
|
||||
$values = $q->vs->get_values();
|
||||
|
Loading…
x
Reference in New Issue
Block a user