Invalid argument supplied for foreach()

Invalid argument supplied for foreach()

by Werner Fuchs -
Number of replies: 1

hi i have a small problem, i create a new Lesson, with numerically questions!

Everything works fine, but if i want to look for the statistics of a special user, then i  will get this error message:

Warning: Invalid argument supplied for foreach() in .....\moodle\mod\lesson\report.php on line 855

foreach ($page->answerdata->answers as $answer (line 855)

This error message only occurs if the question is answered wrongly!

For all the other questions this message does not appear!

How can i fix this problem ?

Thanks

Average of ratings: -
In reply to Werner Fuchs

Re: Invalid argument supplied for foreach()

by Mark Nielsen -
There was a bug with numerical question type in mod/lesson/report.php.  I have fixed the bug and the fix is in the latest build of 1.5.X.  Try downloading the latest lesson module and put its report.php in your lesson module.

Let me know if this does not do the trick,
Mark