Mass modification of mdl_grade_items idnumber

Mass modification of mdl_grade_items idnumber

by Andy Cravens -
Number of replies: 2
I'm going to be importing a large amount of grades using XML files but I need all the grade items to have a valid "idnumber" I intend to run an SQL statement to replace all the blank or null idnumbers with the corresponding item id. I did this on development and successfully imported the grades. However, I did not perform an in-depth assessment of other system modules to see if changing the idnumber broke anything else.

I would be running this SQL:

UPDATE mdl_grade_items SET idnumber - id WHERE idnumber IS NULL OR idnumber = '';

Anybody see any problems with doing this?