Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moodle 4.1.13 Error encountered when Teacher reviews quiz attempt with essay question upload question type. #179

Open
katcher opened this issue Oct 8, 2024 · 5 comments

Comments

@katcher
Copy link

katcher commented Oct 8, 2024

Moodle V 4.1.13
Turnitinsim version: v1.2 - 2023062901

When a teacher attempts to review a student attempt in order to grade, the following error occurs

Debug info: SELECT * FROM {quiz_attempts} WHERE id = ?
[array (
0 => '370',
)]
Error code: invalidrecord × Dismiss this notification
Stack trace:
line 1654 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
line 1630 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
line 671 of /mod/quiz/attemptlib.php: call to moodle_database->get_record()
line 689 of /mod/quiz/attemptlib.php: call to quiz_attempt::create_helper()
line 865 of /plagiarism/turnitinsim/lib.php: call to quiz_attempt::create()
line 676 of /plagiarism/turnitinsim/lib.php: call to plagiarism_plugin_turnitinsim->quiz_handler()
line 370 of /plagiarism/turnitinsim/lib.php: call to plagiarism_plugin_turnitinsim->submission_handler()
line 48 of /lib/plagiarismlib.php: call to plagiarism_plugin_turnitinsim->get_links()
line 72 of /question/type/essay/renderer.php: call to plagiarism_get_links()
line 403 of /question/engine/renderer.php: call to qtype_essay_renderer->formulation_and_controls()
line 108 of /question/engine/renderer.php: call to core_question_renderer->formulation()
line 113 of /question/behaviour/behaviourbase.php: call to core_question_renderer->question()
line 907 of /question/engine/questionattempt.php: call to question_behaviour->render()
line 461 of /question/engine/questionusage.php: call to question_attempt->render()
line 1783 of /mod/quiz/attemptlib.php: call to question_usage_by_activity->render_question()
line 1745 of /mod/quiz/attemptlib.php: call to quiz_attempt->render_question_helper()
line 84 of /mod/quiz/renderer.php: call to quiz_attempt->render_question()
line 124 of /mod/quiz/reviewquestion.php: call to mod_quiz_renderer->review_question_page()

If turnitinsim is disabled, the review attempt functions as expected.

If this is used in an assignment rather than a quiz, - file upload, it works.

@katcher
Copy link
Author

katcher commented Oct 9, 2024

The quiz uses an essay type question to provide the students with an upload functionality to append their response. They are not required to place any information in the form but are required to put a document.

More information regarding this error -
If the setting of the question "essay type" Response Option is set to "No online text" the error will occur when the professor reviews the attempt.

If it is left as HTML Editor it works as expected.

@anieminen
Copy link

anieminen commented Dec 3, 2024

Hi,

We are seeing the same error when any type of essay question is used in a quiz, and Turnitin is enabled.

Moodle version: 4.1.14
plagiarism_turnitinsim version: v1.2 (2024112501)

Steps to reproduce:

  1. Create a quiz. Under Turnitin Integrity plugin settings, select "Enable Turnitin".
  2. Add an essay question to the quiz.
  3. Preview the quiz as a teacher/admin, or answer in student role.
  4. Review the quiz attempt.

Full error message:

Can't find data record in database table quiz_attempts.

Debug info: SELECT * FROM {quiz_attempts} WHERE id = ?
[array (
0 => '474507',
)]
Error code: invalidrecord
Stack trace:
line 1654 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
line 1630 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
line 671 of /mod/quiz/attemptlib.php: call to moodle_database->get_record()
line 689 of /mod/quiz/attemptlib.php: call to quiz_attempt::create_helper()
line 824 of /plagiarism/turnitinsim/lib.php: call to quiz_attempt::create()
line 635 of /plagiarism/turnitinsim/lib.php: call to plagiarism_plugin_turnitinsim->quiz_handler()
line 344 of /plagiarism/turnitinsim/lib.php: call to plagiarism_plugin_turnitinsim->submission_handler()
line 48 of /lib/plagiarismlib.php: call to plagiarism_plugin_turnitinsim->get_links()
line 72 of /question/type/essay/renderer.php: call to plagiarism_get_links()
line 403 of /question/engine/renderer.php: call to qtype_essay_renderer->formulation_and_controls()
line 108 of /question/engine/renderer.php: call to core_question_renderer->formulation()
line 113 of /question/behaviour/behaviourbase.php: call to core_question_renderer->question()
line 907 of /question/engine/questionattempt.php: call to question_behaviour->render()
line 461 of /question/engine/questionusage.php: call to question_attempt->render()
line 1783 of /mod/quiz/attemptlib.php: call to question_usage_by_activity->render_question()
line 1745 of /mod/quiz/attemptlib.php: call to quiz_attempt->render_question_helper()
line 187 of /mod/quiz/renderer.php: call to quiz_attempt->render_question()
line 56 of /mod/quiz/renderer.php: call to mod_quiz_renderer->questions()
line 264 of /mod/quiz/review.php: call to mod_quiz_renderer->review_page()

@katcher
Copy link
Author

katcher commented Dec 3, 2024

Just out of curiosity, what is the response option selected for the essay question?

@anieminen
Copy link

Response format is "HTML editor". I tried changing it to "No online text" and after that the quiz attempt review actually works without errors. But changing it back to the original option gives me the database error again.

@katcher
Copy link
Author

katcher commented Dec 4, 2024

Same behavior for me, that was my work around

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants