I have been given over 100 .csv files, containing thousands of student quiz results from an old install of Moodle. I have been asked to import these quiz results into a new install of Moodle.
I have written a script that queries the database and parses these files into statements like:
"$idstudent got $idquestion (1)right on $idquiz"
"$idstudent got $idquestion (0)wrong on $idquiz"
I've done a lot of reading. It seems that what goes on in the database when a student answers a quiz question is actually quite complex. Somewhat dauntingly so. Can anyone help me formulate some queries that will actually translate the above variables into something that can be gracefully written to the database?
I should probably clarify that what I have in the .csv is just a "1" when the question was answered correctly and a "0" when it was not.
The student's grade on this quiz is also their grade on the course. I need to also ensure that that is being written to the proper field.
I've been playing with some queries, but I'm scared to actually execute them in a real database. Please help? Thanks much.