Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-78860

PHP 8.2 dynamic property question_answer::$correctanswerlength

XMLWordPrintable

    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MOODLE_402_STABLE
    • master_MDL-78860
    • Hide

      Using PHP 8.2, run Behat for the @qtype_calculated multi tag.

      Manually test:

      Make sure you have developer debug and display debug on

      • Log into Moodle as an admin
      • Create a course
      • Add a quiz activity to the course
      • Add a new calculated multiple choice question to the quiz
      • On the calculated multiple choice question creation page:
      • Set the Question name to calculatedmulti
      • Set the Question text to What is the sum of those two numbers: {a} and {b}
      • Set Choice 1 to: {a}+{b}
      • Set Grade to 100%
      • Set Choice 2 to: {a}*{b}
      • Set Choice 3 to: {a}-{b}
      • Click the save "changes button"
      • Confirm you can’t see any deprecation warnings or errors
      Show
      Using PHP 8.2, run Behat for the @qtype_calculated multi tag. Manually test: Make sure you have developer debug and display debug on Log into Moodle as an admin Create a course Add a quiz activity to the course Add a new calculated multiple choice question to the quiz On the calculated multiple choice question creation page: Set the Question name to calculatedmulti Set the Question text to What is the sum of those two numbers: {a} and {b} Set Choice 1 to: {a}+{b} Set Grade to 100% Set Choice 2 to: {a}*{b} Set Choice 3 to: {a}-{b} Click the save "changes button" Confirm you can’t see any deprecation warnings or errors

      This has been detected as part of MDL-76407, when reviewing apache logs, part of the php82 epic. Also, it seems that already was reported @ MDL-77328, but not fixed there.

      We are getting (8 times, surely 4 times by run) the following in apache logs:

      32298:[Fri Jul 28 07:12:15.745193 2023] [php:notice] [pid 685] [client 172.26.0.5:35030] Default exception handler: Exception - Unknown error type: Creation of dynamic property question_answer::$correctanswerlength is deprecated in [dirroot]/question/type/calculatedmulti/questiontype.php on line 200 Debug:
      Error code: generalexceptionmessage

      This issue is about to:

      1. Fix the warnings.
      2. Verify that they aren't happening anymore in logs.

            matt.porritt@moodle.com Matt Porritt
            stronk7 Eloy Lafuente (stronk7)
            Shamim Rezaie Shamim Rezaie
            Ilya Tregubov Ilya Tregubov
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 28 minutes
                2h 28m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.