Grade issue

Grade issue

by Louise Bennett -
Number of replies: 5

I'm a little perplexed by this one!

I have a number of dataforms set up with the ratings field, called 'grade.' I then set up the dataforms themselves with the grade calculation of: ##:grade:max##

Theoretically, this works fine. I'll grade a student, the grade will show up in the gradebook, all good. 

... and then, randomly (it seems) it will stop working. I will try and grade another student, and it won't show up in their gradebook; I've looked in the database, and it isn't storing anything there, either. 

If I then duplicate the dataform activity, it will work in the new activity. 

Has anyone else run into this? Any ideas? 

Average of ratings: -
In reply to Louise Bennett

Re: Grade issue

by Itamar Tzadok -

Is it one entry per student or more? smile

In reply to Itamar Tzadok

Re: Grade issue

by Louise Bennett -

Students can add additional entries if they need to, but mostly students are submitting one entry each. 

In reply to Louise Bennett

Re: Grade issue

by Itamar Tzadok -

If there can be more than one entry per student you should put the pattern in an aggregate, for example MAX(##:grade:max##). Try that first, see if it fixes the issue.

Which Dataform version do you have?

smile

In reply to Itamar Tzadok

Re: Grade issue

by Louise Bennett -

I tried changing the calculation to that in one of my existing broken dataforms, and no: students don't show up with a grade in the gradebook with it. I just had another look in the database, and it looks like an entry is being made into grade_grades, but with the grade set to 'null.' 

I then duplicated the dataform, and when I graded that one, it went into the grade database just fine. 

I'm using Dataform 2.8.6

I had a look in my error logs and found this: 

 

[Fri Jul 03 11:26:48.857225 2015] [proxy_fcgi:error] [pid 16538:tid 140148037400 320] [client 220.244.23.29:42727] AH01071: Got error 'PHP message: PHP Notice: unserialize(): Error at offset 43 of 52 bytes in /opt/bitnami/apps/moodle/htdocs /mod/dataform/classes/dataform.php on line 984\nPHP message: PHP Stack trace:\nP HP message: PHP 1. {main}() /opt/bitnami/apps/moodle/htdocs/course/modedit.php :0\nPHP message: PHP 2. mod_dataform_mod_form->set_data() /opt/bitnami/apps/mo odle/htdocs/course/modedit.php:253\nPHP message: PHP 3. mod_dataform_mod_form- >data_preprocessing() /opt/bitnami/apps/moodle/htdocs/mod/dataform/mod_form.php: 344\nPHP message: PHP 4. mod_dataform_dataform->__get() /opt/bitnami/apps/mood le/htdocs/mod/dataform/mod_form.php:329\nPHP message: PHP 5. mod_dataform_data form->get_grade_items() /opt/bitnami/apps/moodle/htdocs/mod/dataform/classes/dat aform.php:301\nPHP message: PHP 6. unserialize() /opt/bitnami/apps/moodle/htdo cs/mod/dataform/classes/dataform.php:984\nPHP message: PHP Notice: unserializeegg: Error at offset 43 of 52 bytes in /opt/bitnami/apps/moodle/htdocs/mod/datafor m/classes/dataform.php on line 984\nPHP message: PHP Stack trace:\nPHP message: PHP 1. {main}() /opt/bitnami/apps/moodle/htdocs/course/modedit.php:0\nPHP mess age: PHP 2. mod_dataform_mod_form->set_data() /opt/bitnami/apps/moodle/htdocs/ course/modedit.php:253\nPHP message: PHP 3. moodleform_mod->set_data() /opt/bi tnami/apps/moodle/htdocs/mod/dataform/mod_form.php:345\nPHP message: PHP 4. mo d_dataform_mod_form->data_preprocessing() /opt/bitnami/apps/moodle/htdocs/course /moodleform_mod.php:334\nPHP message: PHP 5. mod_dataform_dataform->__get() /o pt/bitnami/apps/moodle/htdocs/course/moodleform_mod.php:329\nPHP message: PHP 6. mod_dataform_dataform->get_grade_items() /opt/bitnami/apps/moodle/htdocs/mod/ dataform/classes/dataform.php:301\nPHP message: PHP 7. unserialize() /opt/bitn ami/apps/moodle/htdocs/mod/dataform/classes/dataform.php:984\n', referer: http:/ /elearning.bcanational.com/moodle/mod/dataform/view.php?id=302
[Fri Jul 03 11:27:04.530095 2015] [proxy_fcgi:error] [pid 17043:tid 140148373108 480] [client 60.225.55.213:15460] AH01071: Got error 'PHP message: PHP Notice: unserialize(): Error at offset 43 of 52 bytes in /opt/bitnami/apps/moodle/htdocs /mod/dataform/classes/dataform.php on line 984\nPHP message: PHP Stack trace:\nP HP message: PHP 1. {main}() /opt/bitnami/apps/moodle/htdocs/course/modedit.php :0\nPHP message: PHP 2. mod_dataform_mod_form->set_data() /opt/bitnami/apps/mo odle/htdocs/course/modedit.php:253\nPHP message: PHP 3. mod_dataform_mod_form- >data_preprocessing() /opt/bitnami/apps/moodle/htdocs/mod/dataform/mod_form.php: 344\nPHP message: PHP 4. mod_dataform_dataform->__get() /opt/bitnami/apps/mood le/htdocs/mod/dataform/mod_form.php:329\nPHP message: PHP 5. mod_dataform_data form->get_grade_items() /opt/bitnami/apps/moodle/htdocs/mod/dataform/classes/dat aform.php:301\nPHP message: PHP 6. unserialize() /opt/bitnami/apps/moodle/htdo cs/mod/dataform/classes/dataform.php:984\nPHP message: PHP Notice: unserializeegg: Error at offset 43 of 52 bytes in /opt/bitnami/apps/moodle/htdocs/mod/datafor m/classes/dataform.php on line 984\nPHP message: PHP Stack trace:\nPHP message: PHP 1. {main}() /opt/bitnami/apps/moodle/htdocs/course/modedit.php:0\nPHP mess age: PHP 2. mod_dataform_mod_form->set_data() /opt/bitnami/apps/moodle/htdocs/ course/modedit.php:253\nPHP message: PHP 3. moodleform_mod->set_data() /opt/bi tnami/apps/moodle/htdocs/mod/dataform/mod_form.php:345\nPHP message: PHP 4. mo d_dataform_mod_form->data_preprocessing() /opt/bitnami/apps/moodle/htdocs/course /moodleform_mod.php:334\nPHP message: PHP 5. mod_dataform_dataform->__get() /o pt/bitnami/apps/moodle/htdocs/course/moodleform_mod.php:329\nPHP message: PHP 6. mod_dataform_dataform->get_grade_items() /opt/bitnami/apps/moodle/htdocs/mod/ dataform/classes/dataform.php:301\nPHP message: PHP 7. unserialize() /opt/bitn ami/apps/moodle/htdocs/mod/dataform/classes/dataform.php:984\nPHP message: PHP N otice: unserialize(): Error at offset 43 of 52 bytes in /opt/bitnami/apps/moodl e/htdocs/mod/dataform/classes/dataform.php on line 984\nPHP message: PHP Stack t race:\nPHP message: PHP 1. {main}() /opt/bitnami/apps/moodle/htdocs/course/mod edit.php:0\nPHP message: PHP 2. mod_dataform_mod_form->get_data() /opt/bitnami /apps/moodle/htdocs/course/modedit.php:261\nPHP message: PHP 3. mod_dataform_d ataform->__get() /opt/bitnami/apps/moodle/htdocs/course/modedit.php:398\nPHP mes sage: PHP 4. mod_dataform_dataform->get_grade_items() /opt/bitnami/apps/moodle /htdocs/mod/dataform/classes/dataform.php:301\nPHP message: PHP 5. unserialize () /opt/bitnami/apps/moodle/htdocs/mod/dataform/classes/dataform.php:984\n', ref erer: http://elearning.bcanational.com/moodle/course/modedit.php?update=302&retu rn=1
[Fri Jul 03 11:27:22.049002 2015] [proxy_fcgi:error] [pid 16533:tid 140148280788 736] [client 220.244.23.29:57111] AH01071: Got error 'PHP message: PHP Notice: Undefined property: stdClass::$rating in /opt/bitnami/apps/moodle/htdocs/mod/dat aform/field/ratingmdl/rate_ajax.php on line 158\nPHP message: PHP Stack trace:\n PHP message: PHP 1. {main}() /opt/bitnami/apps/moodle/htdocs/mod/dataform/fiel d/ratingmdl/rate_ajax.php:0\n', referer: http://elearning.bcanational.com/moodle /mod/dataform/view.php?id=302

 

It looks like an error is being triggered every time an entry is added to the 'old' dataforms, but not to the new ones. And then grading isn't working as a result. 

In reply to Louise Bennett

Re: Grade issue

by Louise Bennett -

Or, wait. No. i think that's because I accidentally unset the grade calculation on that item.