After Upgrade to 1.5 Quiz Item Analysis Error Occurs

After Upgrade to 1.5 Quiz Item Analysis Error Occurs

by Shelby Foster -
Number of replies: 13
After upgrade from 1.4.4 to 1.5 existing Quiz,Reports, Item Analysis generates the following error.  Quiz results are displayed after scrolling down through the error codes.  This error occurs on each Quiz previously created in version 1.4.4.
It also occurs in a new quiz created in 1.5.

Warning
: Cannot use a scalar value as an array in /var/www/html/moodle/mod/quiz/report/analysis/report.php on line 657

Any suggestions?



Average of ratings: -
In reply to Shelby Foster

Re: After Upgrade to 1.5 Quiz Item Analysis Error Occurs

by Gustav W Delius -
Such warnings should not be displayed if you turn debugging off in Administration -> Configuration -> Variables -> Miscellaneous.
Nevertheless it is helpful if you report such warning messages because they might be indicating some problem in the code. However the best place for reporting such issues is the bug tracker. This particular warning message has already been reported in bug 3492.
In reply to Gustav W Delius

Re: After Upgrade to 1.5 Quiz Item Analysis Error Occurs

by Shelby Foster -

Hi Gustav-

Debugging is set to "no", yet we still see the error messages. Bug 3492 is indeed our school's bug, we reported it this morning.

Thanks!

In reply to Shelby Foster

Re: After Upgrade to 1.5 Quiz Item Analysis Error Occurs

by Gustav W Delius -
Hi Shelby, I was wrong, setting debug to 'no' only suppresses notices but not warnings. And thanks for reporting the bug in the bug tracker.
In reply to Gustav W Delius

Re: After Upgrade to 1.5 Quiz Item Analysis Error Occurs

by reg phenna -
We have the same here on Win Server 2003 running XAMPP.


In reply to reg phenna

Re: After Upgrade to 1.5 Quiz Item Analysis Error Occurs

by L H -

Is this still an issue?

I renamed the offending array to something other than the var being passed, this resulted in no more warnings... however i have not been able to test this to see if it breaks elsewhere.

In reply to Shelby Foster

Re: After Upgrade to 1.5 Quiz Item Analysis Error Occurs

by Gustav W Delius -
Enrique (who wrote this Item Analysis report plug-in) has been absent from these forums for the last 18 days, presumably on vacation. I am sure he will deal with the problem as soon as he comes back.
In reply to Gustav W Delius

Re: After Upgrade to 1.5 Quiz Item Analysis Error Occurs

by James Dugal -
I just uploaded some context-diffs to report.php that I think fixes the problem ... see bug #3492 --James
In reply to James Dugal

Re: After Upgrade to 1.5 Quiz Item Analysis Error Occurs

by Jean-Michel Védrine -

Hello,

Thanks for your patch. There is also an "headers already send" problem in item analysis when you try to download Excel, OpenOffice or Text file. I submitted a patch for this problem, see http://moodle.org/bugs/bug.php?op=show&bugid=3617

Applying both patchs to mod/quiz/reports/analysis/report.php no errors are now displayed and downloads are OK.

In reply to James Dugal

Re: After Upgrade to 1.5 Quiz Item Analysis Error Occurs

by ryan wise -
I'm running xampp on windows. I installed the other patch mentioned in the child post to yours, but I dont know how to apply the patch you made for my windows box. How soon is this going to be fixed in the main module (when is moodle 1.5.3 out?) Is the person who works on this part of Moodle still on vacation? We're in a bad situation here.

Thx,

Ryan
In reply to Gustav W Delius

Re: After Upgrade to 1.5 Quiz Item Analysis Error Occurs

by James F -

I have downloaded the latest beta 1_5 and still receive the following ... tried this on a number of boxes

Warning: Cannot use a scalar value as an array in C:\apachefriends\xampp\htdocs\moodle\mod\quiz\report\analysis\report.php on line 657

Warning: Cannot use a scalar value as an array in C:\apachefriends\xampp\htdocs\moodle\mod\quiz\report\analysis\report.php on line 658

Warning: Cannot use a scalar value as an array in C:\apachefriends\xampp\htdocs\moodle\mod\quiz\report\analysis\report.php on line 663

Warning: Cannot use a scalar value as an array in C:\apachefriends\xampp\htdocs\moodle\mod\quiz\report\analysis\report.php on line 664

Warning: Cannot use a scalar value as an array in C:\apachefriends\xampp\htdocs\moodle\mod\quiz\report\analysis\report.php on line 669

Warning: Cannot use a scalar value as an array in C:\apachefriends\xampp\htdocs\moodle\mod\quiz\report\analysis\report.php on line 670