At the risk of undermining what mathematical credibility I may have... I'm not getting the overall average figure displayed in the screen shot below. Can someone explain where I'm going wrong?
I think it is averaging only the best grade for each user, which means it is close to being right, although a rounding error of 0.011 seems a bit high.
Can you please copy and paste the results of the following three SQL queries here:
SELECT userid, grade FROM mdl_quiz_grades WHERE quiz = 123;
SELECT userid, attempt, sumgrades, preview FROM mdl_quiz_attempts WHERE quiz = 123;
SELECT id, sumgrades, grade FROM mdl_quiz WHERE id = 123;
Replace 123 with the id of your quiz, which you can get from any URL including q=123, like /mod/quiz/report.php?q=1
That should give us the data we need to see what is going on.
Can you please copy and paste the results of the following three SQL queries here:
SELECT userid, grade FROM mdl_quiz_grades WHERE quiz = 123;
SELECT userid, attempt, sumgrades, preview FROM mdl_quiz_attempts WHERE quiz = 123;
SELECT id, sumgrades, grade FROM mdl_quiz WHERE id = 123;
Replace 123 with the id of your quiz, which you can get from any URL including q=123, like /mod/quiz/report.php?q=1
That should give us the data we need to see what is going on.
INSERT INTO `mdl_quiz_grades` VALUES (24, 14.286);
INSERT INTO `mdl_quiz_grades` VALUES (25, 14.286);
INSERT INTO `mdl_quiz_attempts` VALUES (24, 3, 1, 0);
INSERT INTO `mdl_quiz_attempts` VALUES (24, 2, 0, 0);
INSERT INTO `mdl_quiz_attempts` VALUES (25, 2, 4, 0);
INSERT INTO `mdl_quiz_attempts` VALUES (24, 1, 10, 0);
INSERT INTO `mdl_quiz_attempts` VALUES (25, 1, 10, 0);
INSERT INTO `mdl_quiz` VALUES (12, 12, 30);
INSERT INTO `mdl_quiz_grades` VALUES (25, 14.286);
INSERT INTO `mdl_quiz_attempts` VALUES (24, 3, 1, 0);
INSERT INTO `mdl_quiz_attempts` VALUES (24, 2, 0, 0);
INSERT INTO `mdl_quiz_attempts` VALUES (25, 2, 4, 0);
INSERT INTO `mdl_quiz_attempts` VALUES (24, 1, 10, 0);
INSERT INTO `mdl_quiz_attempts` VALUES (25, 1, 10, 0);
INSERT INTO `mdl_quiz` VALUES (12, 12, 30);
Very odd. I created MDL-18266 to track this.
Having played around a bit, I cannot reproduce this on my system. (I tried attempting a quiz several times as different students, change question weights, etc. between attempts, and so on.)
Are you able to make this happen again? Can you give me step-by-step instructions, starting from adding a new quiz?
Also, please can you confirm exactly which Moodle version you are using. Thanks.
Are you able to make this happen again? Can you give me step-by-step instructions, starting from adding a new quiz?
Also, please can you confirm exactly which Moodle version you are using. Thanks.
Ping!
Any further information? Without more information, I will just have to resolve MDL-18266 as Cannot reproduce.
Any further information? Without more information, I will just have to resolve MDL-18266 as Cannot reproduce.
Hi Tim, I also get this error as above, I am using version 2.1. Before this version I never encounter this problem. I am also not sure why this problem occurred, it's happened not in the all quiz,but a few quizzes. Any solution?
Thanks
2.1 is very old, and no longer supported. You really need to upgrade to something more recent (e.g. 2.5.x). I don't know if that will fix your specific issue, but it probably will.