Admin name displayed in response history of a quiz

Admin name displayed in response history of a quiz

per François Lizotte -
Nombre de respostes: 2
Imatge Particularly helpful Moodlers
Hello,

Anybody knows why my name (main admin on site) is displayed in the response history of a quiz attempt?


Thank you in advance,

EDIT

From the log:
30 May 2022, 12:01 PMFrançois LizotteIxxxn HxxaQuiz: Examen final - 35%QuizQuiz attempt submittedThe user with id '5128' has submitted the attempt with id '51919' for the quiz with course module id '30781'.cli

Obviously, the submission was not done by the student but by a cli task, but why would Moodle display the admin's name?
François
Mitjana de qualificacions:Useful (1)
En resposta a François Lizotte

Re: Admin name displayed in response history of a quiz

per Tim Hunt -
Imatge Core developers Imatge Documentation writers Imatge Particularly helpful Moodlers Imatge Peer reviewers Imatge Plugin developers
The name is showing up because of this enhancement MDL-71030.

As you say, the log entry shows that this was done by the CLI task which automatically submits quiz attempt when the time expires. It is a (weird?) feature of the scheduled tasks system that any actions performed when the task runs get logged as if done by the main site admin.

So, one work-around is to create an additional user account (that no-one ever uses) called 'System task' or something, and make that the main site admin. Then that is the name that will appear in the logs, this bit of the quiz, etc.

Or, someone could propose a change to how scheduled tasks work, but that is not a quiz issue.