-
Sub-task
-
Resolution: Fixed
-
Critical
-
4.2, 4.3
-
MOODLE_402_STABLE, MOODLE_403_STABLE
-
MOODLE_402_STABLE
-
MDL-77328-master -
-
5
-
Team Hedgehog Sprint 1 review, Team Hedgehog Sprint 2.1, Team Hedgehog Sprint 2.2, Team Hedgehog 2023 Sprint 1.3, Team Hedgehog 2023 Sprint 1.4, Team Hedgehog 2023 Sprint 2.0, Team Hedgehog 2023 Sprint 2.1, Team Hedgehog 2023 Sprint 2.2
This issue follows on from MDL-77299 & MDL-77327, fixing the PHP 8.2 "Deprecated: Creation of dynamic property ... is deprecated in ...".
There are three remaining problems, with the fixes worked out by meirza.arson@moodle.com and rezaie9.
A) qtype_truefalse_questoin fails to declare the properties
public $truefeedbackformat; |
public $falsefeedbackformat; |
public $showstandardinstruction; |
B) qtype_multianswer was using the undeclared property ->maxmark on subquestions. We can fix that by switching to (re)using the declared property ->defaultmark for the same purpose.
C) There were two problems with the qtype_numerical_answer class:
C1) qtype_calculated was re-using the class qtype_numerical_answer and setting two additional properites that were not declared. The fix was to define and use a nwe class qtype_calculated_answer.
C2) During the grading in qtype_numerical, some undeclared properties were used to track bits of the calculation. This was fixed using a replace temp with query refactoring.
Original descripion follows:
This issue focuses on these files:
- question/type/questionbase.php
Please see question_answer.txt to see the errors from PHPUnit testing.
Other than that. These properties also need to include in the class question_definition because qtype_truefalse::initialise_question_instance needs all the properties.
public $rightanswer; |
public $truefeedback; |
public $falsefeedback; |
public $trueanswerid; |
public $falseanswerid; |
public $truefeedbackformat; |
public $falsefeedbackformat; |
public $showstandardinstruction; |
public $maxmark; |
- caused a regression
-
MDL-78939 Error when exporting calculated questions containing feedback files
- Closed
- has been marked as being related by
-
MDL-78860 PHP 8.2 dynamic property question_answer::$correctanswerlength
- Closed
- split from
-
MDL-77299 PHP 8.2: Dynamic Properties are deprecated for quiz and question
- Closed
-
MDL-77327 PHP 8.2: Dynamic Properties are deprecated for question_display_options::$statewhichincorrect
- Closed
- will help resolve
-
MDL-76407 Verify that the apache logs are clean of PHP 8.2 notices/warnings/errors
- Closed