moodleou / moodle-qtype_varnumunit

Moodle variable numeric sets question type with units.
0 stars 7 forks source link

Failing PHPUnit test with Moodle_404_STABLE #11

Open opitz opened 3 months ago

opitz commented 3 months ago

With Moodle 4.4 (MOODLE_404_STABLE) several PHPUnit tests fail with an identical issue, e.g.: qtype_varnumunit\walkthrough_test::test_validation_and_interactive_with_m_unit_submission_with_no_unit coding_exception: Coding error detected, it must be fixed by a programmer: Unkown format passed to format_text: html

aspark21 commented 1 month ago

Seems related - there's also a couple of behat tests failing

Test editing a Variable numeric set with units question type/Edit a Variable numeric set with units question
And I press "id_updatebutton": Moodle exception: Exception - Warning: Undefined array key "text" in [dirroot]/question/type/varnumunit/questiontype.php on line 121 More information about this error

Exception - Warning: Undefined array key "text" in [dirroot]/question/type/varnumunit/questiontype.php on line 121
More information about this error

Debug info: 

Error code: generalexceptionmessage

×

Dismiss this notification

    * line 157 of /lib/behat/lib.php: Exception thrown
    * line 121 of /question/type/varnumunit/questiontype.php: call to
behat_error_handler()
    * line 205 of /question/type/varnumunit/questiontype.php: call to
qtype_varnumunit->save_units()
    * line 538 of /question/type/questiontypebase.php: call to
qtype_varnumunit->save_question_options()
    * line 294 of /question/bank/editquestion/question.php: call to
question_type->save_question()
leonstr commented 1 month ago

@aspark21 The Undefined array key "text" in the Behat test is a different issue, I've reported it as #12 .

leonstr commented 1 month ago

Submitted PR #13 for the PHPUnit test failures.

Also reported spelling error in _Unkown format passed to formattext: MDL-82530.