mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-76108 mod_lesson: improving count call for PHP8.0
This commit is contained in:
parent
fa7a55aa5d
commit
3e96f16688
1 changed files with 1 additions and 1 deletions
|
@ -276,7 +276,7 @@ class moodle1_mod_lesson_handler extends moodle1_mod_handler {
|
||||||
|
|
||||||
$this->xmlwriter->begin_tag('answers');
|
$this->xmlwriter->begin_tag('answers');
|
||||||
|
|
||||||
$numanswers = count($answers);
|
$numanswers = $answers ? count($answers) : 0;
|
||||||
if ($numanswers) { //if there are any answers (possible there are none!)
|
if ($numanswers) { //if there are any answers (possible there are none!)
|
||||||
if ($numanswers > 3 && $page->data['qtype'] == 5) { //fix only jumpto only for matching question types.
|
if ($numanswers > 3 && $page->data['qtype'] == 5) { //fix only jumpto only for matching question types.
|
||||||
if ($answers[0]['jumpto'] !== '0' || $answers[1]['jumpto'] !== '0') {
|
if ($answers[0]['jumpto'] !== '0' || $answers[1]['jumpto'] !== '0') {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue