MDL-77328 qtype_multianswer: Refactor for PHP 8.2 compatibility

This commit addresses compatibility issues in the qtype_multianswer
question type. The following changes were made:

- The usage of the undeclared property $maxmark on subquestions in
  qtype_multianswer was identified as problematic. To resolve this,
  the existing declared property $defaultmark is now being used for
  the same purpose.

By switching to the declared property $defaultmark, compatibility with
PHP 8.2 is ensured and the issue with the undeclared property is
resolved.
This commit is contained in:
Meirza
2023-07-13 21:04:48 +10:00
committed by Shamim Rezaie
parent 35b64b004a
commit 6e4e0abad7
4 changed files with 17 additions and 18 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ abstract class question_definition {
/** @var integer question test format. */
public $generalfeedbackformat;
/** @var number what this quetsion is marked out of, by default. */
/** @var float what this quetsion is marked out of, by default. */
public $defaultmark = 1;
/** @var integer How many question numbers this question consumes. */