Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

'found more than one record' notices (Moodle 3.1) #85

Closed
thepurpleblob opened this issue May 16, 2016 · 3 comments
Closed

'found more than one record' notices (Moodle 3.1) #85

thepurpleblob opened this issue May 16, 2016 · 3 comments

Comments

@thepurpleblob
Copy link
Contributor

We've been testing on Moodle 3.1 (you may not fully support it yet, but...) and have been seeing these on the Assignment grading page...

Error: mdb->get_record() found more than one record!
line 1539 of /lib/dml/moodle_database.php: call to debugging()
line 318 of /plagiarism/urkund/lib.php: call to moodle_database->get_record_sql()
line 158 of /plagiarism/urkund/lib.php: call to plagiarism_plugin_urkund->get_file_results()
line 51 of /lib/plagiarismlib.php: call to plagiarism_plugin_urkund->get_links()
line 1405 of /mod/assign/renderer.php: call to plagiarism_get_links()
line 63 of /mod/assign/renderer.php: call to mod_assign_renderer->htmllize_tree()
line 319 of /lib/outputrenderers.php: call to mod_assign_renderer->render_assign_files()
line 50 of /mod/assign/renderer.php: call to plugin_renderer_base->render()
line 5144 of /mod/assign/locallib.php: call to mod_assign_renderer->assign_files()
line 327 of /mod/assign/submission/file/locallib.php: call to assign->render_area_files()
line 1207 of /mod/assign/gradingtable.php: call to assign_submission_file->view_summary()
line 1291 of /mod/assign/gradingtable.php: call to assign_grading_table->format_plugin_summary_with_link()
line 812 of /lib/tablelib.php: call to assign_grading_table->other_cols()
line 456 of /mod/assign/gradingtable.php: call to flexible_table->format_row()
line 1493 of /lib/tablelib.php: call to assign_grading_table->format_row()
line 1609 of /lib/tablelib.php: call to table_sql->build_table()
line 1439 of /mod/assign/renderer.php: call to table_sql->out()
line 1235 of /mod/assign/renderer.php: call to mod_assign_renderer->flexible_table()
line 319 of /lib/outputrenderers.php: call to mod_assign_renderer->render_assign_grading_table()
line 3771 of /mod/assign/locallib.php: call to plugin_renderer_base->render()
line 3856 of /mod/assign/locallib.php: call to assign->view_grading_table()
line 572 of /mod/assign/locallib.php: call to assign->view_grading_page()
line 52 of /mod/assign/view.php: call to assign->view()

@thepurpleblob
Copy link
Contributor Author

thepurpleblob commented May 16, 2016

It appears to be if different students submit a document with exactly the same name. Which is quite likely if they have been given a title for the work

EDIT:
Ahh.... it's "submit on behalf of". A teacher submits documents with the same name in the same Assignment but for different students and Urkund thinks it's the same submission. I haven't tried this with earlier versions of Moodle but I strongly suspect the same result.

I only noticed because I was playing with the new document conversion feature in Assignment.

@danmarsden
Copy link
Owner

Thanks Howard - I've done some initial testing with 3.1 but hadn't noticed that, I'll track it down and patch it.

@danmarsden
Copy link
Owner

found it - looks like in 3.1 when a file is uploaded on behalf the ownership of the file remains with the uploader (teacher) we were checking that during the post to urkund and modifying the record assuming that it was incorrect. We don't need to do that anymore because we look at relateduserid in the actual event when creating the record. I've updated the plugins db with the new version too. Thanks for letting me know!

Note: that won't fix existing records in an incorrect state, but hopefully it's just a test environment for you so won't matter too much.

danmarsden added a commit that referenced this issue Jun 16, 2016
… 3.1

We use relateduserid when handling the initial event so the userid should
be correct.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants