I have no idea why that is the case in our data or how to replicate it.Moodle! Hosted by Moodlerooms! Open Source Course Management System Out of 113021 rows in grade_grades, 5374 of them have itemid column value for which there is no grade_item row with that id column value. I find that the problem arises for users that have grade_grades rows for which there is no associated grade_items row. Debug: SELECT id,category FROM WHERE id IS NULL\n\nError code: invalidrecord\n* line 1453 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown\n* line 1429 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()\n* line 6884 of /lib/accesslib.php: call to moodle_database->get_record()\n* line 70 of /lib/classes/event/grade_deleted.php: call to context_course::instance()\n* line 1026 of /lib/grade/grade_grade.php: call to core\\event\\grade_deleted::create_from_grade()\n* line 1335 of /lib/gradelib.php: call to grade_grade->delete()\n* line 3944 of /lib/moodlelib.php: call to grade_user_delete()\n* line 86 of /admin/user.php: call to delete_user()\n, referer: Default exception handler: Can not find data record in database table course. PHP Notice: Trying to get property of non-object in /srv/on line 70, referer: PHP Notice: Trying to get property of non-object in /srv/on line 1067, referer: These steps need to be performed one after another in quick succession, so read first, then perform:Īs the student in the other browser, while Moodle is deleting the grades (which takes some seconds), go to the gradebook.Ĭonfirm the query returns the same number as in step 1. Make sure you can easily access both browser sessions as timing is crucial for the next part. Open another browser and log in as a student who is enrolled in the course. Under the "Grade item mappings" section of the form, near the bottom, set the mapping for "Test grade item (Real)" to "Test grade item"Ĭlick "Upload grades" and wait for it to finish the upload. Under the "Identify user by" section of the form, set "Map from" to ID number and "Map to" to the same Upload the file you just exported, and click next Now, import the exported grades (Grades -> import -> CSV file -> upload grades) There are controls near the bottom of the page to deselect all. Only select the single grade item which you created prior to this. Grades -> export -> plain text file -> download Go to the course and create a new grade item called "Test grade item" in this course (grades -> setup -> add grade item - near the bottom). Remember the username, well need it later. While still in admin, go to "Users" > "Browse list of users" and find a user with an email like tool_generator_xxx.Įdit that account so the password is 'test'. Go to Site administration > Development > Make test course and create a medium size course (or any course with more than 1000 participants).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |