TEAMMATES / teammates

This is the project website for the TEAMMATES feedback management tool for education
https://teammatesv4.appspot.com/
GNU General Public License v2.0
1.63k stars 3.26k forks source link

[#13102] Admin rejecting account request: give actual account in the email template #13118

Closed Andy-W-Developer closed 6 days ago

Andy-W-Developer commented 1 month ago

Fixes #13102

Outline of Solution Replaces accountRequestEmail with the requesters googleId and add some extra information. Gets the googleId via an admin search with accountRequestEmail as the searchKey. new_reject_with_reason If no instructor account is found for that email, it will instead say "GOOGLEID NOT FOUND". new_reject_with_reason_2

Regarding the fix: It's possible during development (not sure about live) to accidentally create multiple accounts if the googleId chosen is invalid, resulting in nothing after "TEAMMATES using your Google account:". The fix goes through all instructors with accountRequestEmail and uses the googleId of the last account with a non blank googleId. bug

Andy-W-Developer commented 1 month ago

Changed the missing googleId string from "GOOGLEID NOT FOUND" to "NO_GOOGLEID" as its shorter and the underscores makes it more obvious.

Added two tests for setting the existingAccount googleId when there are instructor accounts found, and when there are no instructor accounts found.