Error in grades

Error in grades

by Irene Pelegrí Colomer -
Number of replies: 4
Hi,

I have created a course based in html resources and hotpotatoes exercices.
When I go to "Grades", I get the following error message:

Warning: Invalid argument supplied for foreach() in /export/home/users/imartin6/html/moodle/mod/hotpot/lib.php on line 431

one line in "Set Preferences", "Set Weights", "Set Grade Letters" and "Grade Exceptions" options and two lines in "Show grades" and "Set categories".

I am working with moodle 1.5.2 and the last version of hotpot module.

Some idea?

Irene
Average of ratings: -
In reply to Irene Pelegrí Colomer

Re: Error in grades

by Irene Pelegrí Colomer -
One thing that I have just discovered: the error only appear with the "Last grade" option.

Irene 
In reply to Irene Pelegrí Colomer

Re: Error in grades

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hello Irene,
thanks for the error report.

I have attached a new version of "mod/hotpot/lib.php". I think it will fix the error you were getting. Please could you download it, unzip it and upload it to your Moodle site?

Looking at the code, the error seems to appear when there are no students in the course, or at least no students with any grades, and the grading method for the quiz is set to "First attempt" or "Last attempt". Is that the case with your course?

Please let me know how you get on

regards
Gordon

In reply to Gordon Bateson

Re: Error in grades

by Irene Pelegrí Colomer -
Hello Gordon,

I have uploaded the new lib.php file and the problem seems to have been fixed, thank you smile

First I had no students in the course, but then I tried with some students and some exercices done. Effectively, the error message only appeared with the "Last attempt" option (I hadn't tried with "First attempt"), with or without students.

Another little problem is that the crossword files only work if the html file is uploaded: with the jcw file definitions and the box to write the answer don't appear. I had some problem with another file type, jmt I think, but I'm not sure, so I always use the html files.

Thank you for your help,

Irene
In reply to Irene Pelegrí Colomer

Re: Error in grades

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

HI Irene,
it's good to hear the grades are working as expected now smile

I would be interested to have a look at the problem you describe with the JCross file. If you don't mind, I wonder if you would send it across to me at:
gordon at-sign kanazawa hyphen ac dot jp ?

all the best!
Gordon