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

User type exception trying to get fullname for revealed anonymous student. #705

Open
matithyah opened this issue Dec 15, 2023 · 0 comments

Comments

@matithyah
Copy link

I believe the below exception happens when a Teacher / Instructor tries to reveal the name of an Anonymous student from the Turnitin inbox assignment list. When making the AJAX call to get the name to show, Moodle doesn't accept the variable type that Turnitintooltwo makes when creating the $user variable that it passes to Moodle's fullname() function.

Default exception handler: Exception - core_user::get_fullname(): Argument #1 ($user) must be of type stdClass, turnitintooltwo_user given, called in [dirroot]/lib/moodlelib.php on line 3653 Debug: \nError code: generalexceptionmessage\n* line 1293 of /lib/classes/user.php: TypeError thrown\n* line 3653 of /lib/moodlelib.php: call to core_user::get_fullname()\n* line 580 of /mod/turnitintooltwo/ajax.php: call to fullname()\n, referer: https://...../mod/turnitintooltwo/view.php?id=NNNNN
Have obscured the Site URL and entry ID number.

Moodle is 4.3.1 (latest), running on PHP 8.1.20, Apache 2.4, Linux

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

1 participant