Calculated multichoice question leads to PHP catchable fatal error

Calculated multichoice question leads to PHP catchable fatal error

Irina Marakasova གིས-
Number of replies: 2

Hello to All! 

We updated to Moodle version 3.1

And now we have problems with Calculated multichoice question. This problem is opening for Moodle  2.5.42.6.1 (https://tracker.moodle.org/browse/MDL-44267)

For example we have a Calculated multichoice question with Multiple tries 

Question 1  

Choices are:

={a}               (grade +100%)

=2*{a}            (grade -50%)

Hint 1: try one more

Penalty for each incorrect try: 33,3333%


If student will check both choices, there will be an error:


Coding error detected, it must be fixed by a programmer: PHP catchable fatal error

Debug info: Argument 1 passed to qtype_multichoice_multi_question::disable_hint_settings_when_too_many_selected() must be an instance of question_hint_with_parts, instance of question_hint given, called in [dirroot]/question/type/multichoice/question.php on line 488 and defined
Error code: codingerror
Stack trace:
  • line 425 of /lib/setuplib.php: coding_exception thrown
  • line 475 of /question/type/multichoice/question.php: call to default_error_handler()
  • line 488 of /question/type/multichoice/question.php: call to qtype_multichoice_multi_question->disable_hint_settings_when_too_many_selected()
  • line 109 of /question/behaviour/interactive/behaviour.php: call to qtype_multichoice_multi_question->get_hint()
  • line 86 of /question/behaviour/interactive/behaviour.php: call to qbehaviour_interactive->get_applicable_hint()
  • line 112 of /question/behaviour/behaviourbase.php: call to qbehaviour_interactive->adjust_display_options()
  • line 829 of /question/engine/questionattempt.php: call to question_behaviour->render()
  • line 449 of /question/engine/questionusage.php: call to question_attempt->render()
  • line 253 of /question/preview.php: call to question_usage_by_activity->render_question()

After this student could not continue the test and have to wait when it will close automatically (for us this time is 2 days) and after that he will be able to start new attempt.


I don't know how to resolve the problem. 

Many thanks for all replies!   


དཔྱ་སྙོམས་ཀྱི་སྐུགས་ཚུ།: -