Moodle

Quiz results don't appear in the Gradebook when quiz attempts are submitted AFTER results are imported into the Gradebook from a CSV file.

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.9.4, 1.9.5
  • Fix Version/s: None
  • Component/s: Gradebook, Quiz
  • Labels:
    None
  • Environment:
  • Database:
    Microsoft SQL
  • Affected Branches:
    MOODLE_19_STABLE

Description

I'm getting invalid values in Grader Report when students attempt a quiz in Moodle AFTER a CSV file has been imported into the gradebook for that quiz.

I can reproduce this problem on my production box (1.9.4+ Build: 20090204) AND on a completely new test instance of Moodle 1.9.5+ (Build: 20090930) with just two users (Admin and Student) and one course. The test course contains just one quiz.

We use eInstruction's Classroom Performance System (CPS) v5.6 to enable students to take a quiz during a classroom lecture. Each student has a response pad or "clicker" that allows him to respond to questions asked verbally by the trainer or on screen. The trainer then saves the results from these quizzes as a .csv file and then imports them into the Moodle gradebook for that course. The grade is displayed correctly in the Gradebook.

The problem starts when a student who failed the CPS quiz has to redo the quiz. This second attempt is done in Moodle after the lecture. The student logs into Moodle, goes to the respective course and then attempts the quiz that has been setup in that course. The problem is that after he submits the quiz attempt this quiz grade does NOT appear in the Gradebook as it should - the Gradebook still displays the result that was imported from the CPS .csv file.

IMPORTANT NOTE: I'm only experiencing this problem when students submit a quiz attempt AFTER grades have been imported into the Gradebook from a CSV file. There isn't a problem when students just have to take the quiz in Moodle and no grade imports have been done.

I have attached a Word document that contains the process that I followed to reproduce the problem. I've added screenshots of the "problem" screens.
I've also attached a text file that contains all the SQL queries that I ran BEFORE AND AFTER I had imported the quiz results from the .csv file and attempted the quiz in Moodle. These contain "snapshots" of some of the gradebook and quiz database tables before and after the .csv file was imported into the Gradebook and before and after the student attempted the quiz in Moodle after the .csv file was imported.

I need Moodle to display the results of the quiz that the student attempts in Moodle AFTER results have been imported into Moodle from a .csv file.

  1. CPS Investigation.txt
    05/Oct/09 6:53 PM
    26 kB
    Luis de Vasconcelos
  2. MDL.doc
    05/Oct/09 6:53 PM
    247 kB
    Luis de Vasconcelos

Activity

Hide
Luis de Vasconcelos added a comment -

Updated version of PHP to TS - I'm not using NTS because eAccelerator doesn't work with the NTS version of PHP.

Show
Luis de Vasconcelos added a comment - Updated version of PHP to TS - I'm not using NTS because eAccelerator doesn't work with the NTS version of PHP.
Hide
Luis de Vasconcelos added a comment -

I've done some more testing to try and determine if this is a problem in Moodle or if the problem is actually between my brain and my keyboard and I've convinced myself that it is a problem in Moodle.

I can actually see two problems:

1. When you import grades from a .CSV file the rawgrademax column in mdl_grade_grades ALWAYS gets assigned a value of 100 instead of the grade specified in the quiz settings (/mod/quiz/edit.php). But when you submit a quiz attempt in Moodle the rawgrademax column in mdl_grade_grades correctly gets assigned the grade specified in the quiz settings (/mod/quiz/edit.php). But maybe this is a different issue and I need to raise another issue.

2. When you import grades from a .CSV file into a particular quiz gradebook item and then you try to attempt that quiz, Moodle will not display the quiz grade in the gradebook.

Once again, I've documented the exact process that I followed to come to the above conclusions and I can attach that document if required.

This has become a production problem for us so I've spent quite a bit of time on it. But let me know if I've got the logic wrong and if I need to rtfm again...

Show
Luis de Vasconcelos added a comment - I've done some more testing to try and determine if this is a problem in Moodle or if the problem is actually between my brain and my keyboard and I've convinced myself that it is a problem in Moodle. I can actually see two problems: 1. When you import grades from a .CSV file the rawgrademax column in mdl_grade_grades ALWAYS gets assigned a value of 100 instead of the grade specified in the quiz settings (/mod/quiz/edit.php). But when you submit a quiz attempt in Moodle the rawgrademax column in mdl_grade_grades correctly gets assigned the grade specified in the quiz settings (/mod/quiz/edit.php). But maybe this is a different issue and I need to raise another issue. 2. When you import grades from a .CSV file into a particular quiz gradebook item and then you try to attempt that quiz, Moodle will not display the quiz grade in the gradebook. Once again, I've documented the exact process that I followed to come to the above conclusions and I can attach that document if required. This has become a production problem for us so I've spent quite a bit of time on it. But let me know if I've got the logic wrong and if I need to rtfm again...
Hide
Martin Dougiamas added a comment -

This is actually a feature. By manually importing grades you have "overridden" the grade and it's effectively locked from any changes by the quiz.

If you want to allow the quiz to change those grades then go to the grader view, turn editing on, click on the little hand by each grade and uncheck the "overridden" flag.

Show
Martin Dougiamas added a comment - This is actually a feature. By manually importing grades you have "overridden" the grade and it's effectively locked from any changes by the quiz. If you want to allow the quiz to change those grades then go to the grader view, turn editing on, click on the little hand by each grade and uncheck the "overridden" flag.
Hide
Luis de Vasconcelos added a comment -

Thanks Martin.

<blush>
Is the first part of my "bug" report also a feature:

When you import grades from a .CSV file the rawgrademax column in mdl_grade_grades ALWAYS gets assigned a value of 100 instead of the grade specified in the quiz settings (/mod/quiz/edit.php). But when you submit a quiz attempt in Moodle the rawgrademax column in mdl_grade_grades gets assigned the grade specified in the quiz settings (/mod/quiz/edit.php).

Show
Luis de Vasconcelos added a comment - Thanks Martin. <blush> Is the first part of my "bug" report also a feature: When you import grades from a .CSV file the rawgrademax column in mdl_grade_grades ALWAYS gets assigned a value of 100 instead of the grade specified in the quiz settings (/mod/quiz/edit.php). But when you submit a quiz attempt in Moodle the rawgrademax column in mdl_grade_grades gets assigned the grade specified in the quiz settings (/mod/quiz/edit.php).
Hide
Martin Dougiamas added a comment -

Can you file a new issue for that please?

Show
Martin Dougiamas added a comment - Can you file a new issue for that please?

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: