Skip to content

Commit bdfbb47

Browse files
committed
Crossword: declare missing fields for PHP 8.2 #743313
1 parent a9d922a commit bdfbb47

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

question.php

+13
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,19 @@ class qtype_crossword_question extends question_graded_automatically {
4848
/** @var float The penalty mark for each incorrect accents. */
4949
public $accentpenalty;
5050

51+
/** @var string Feedback for any correct response. */
52+
public $correctfeedback;
53+
/** @var int format of $correctfeedback. */
54+
public $correctfeedbackformat;
55+
/** @var string Feedback for any partially correct response. */
56+
public $partiallycorrectfeedback;
57+
/** @var int format of $partiallycorrectfeedback. */
58+
public $partiallycorrectfeedbackformat;
59+
/** @var string Feedback for any incorrect response. */
60+
public $incorrectfeedback;
61+
/** @var int format of $incorrectfeedback. */
62+
public $incorrectfeedbackformat;
63+
5164
/**
5265
* Answer field name.
5366
*

tests/backup_test.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,7 @@ public function test_cw_backup_data(string $filename, string $coursefullname, st
218218
$filename, $coursefullname, $courseshortname);
219219
// Assume there is only one crossword question in the DB after restore.
220220
$questionid = $DB->get_field('question', 'id', ['qtype' => 'crossword'], MUST_EXIST);
221-
$q = \question_bank::load_question($questionid);
222-
$qtype = new qtype_crossword();
223-
$qtype->get_question_options($q);
221+
$q = \question_bank::load_question_data($questionid);
224222
// Verify question exist after restore and question word options is correct.
225223
$this->assertEquals($questionname, $q->name);
226224
$count = 0;

0 commit comments

Comments
 (0)