RunestoneComponents icon indicating copy to clipboard operation
RunestoneComponents copied to clipboard

usernames with emojis in them cause trouble in Student Progress report

Open irunestone opened this issue 7 years ago • 3 comments

Error reported in course SB_Intro_CS_Python on page /runestone/dashboard/studentreport?id=G%C3%83%C2%A4g%C3%84%C2%99%C3%B0%C2%9F%C2%99%C2%8C by user MrsJakubielski Please describe what you were doing that led up to this error: I am trying to access a specific student's info: Gage Goodwin and every time I click on his name I get directed to report a bug. I seem to be able to access all the other students info except his.

---------------- Traceback -------------- Traceback (most recent call last): File "/home/bmiller/Runestone/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File "/home/bmiller/Runestone/web2py/applications/runestone/controllers/dashboard.py", line 286, in File "/home/bmiller/Runestone/web2py/gluon/globals.py", line 409, in self._caller = lambda f: f() File "/home/bmiller/Runestone/web2py/gluon/tools.py", line 3964, in f return action(*a, **b) File "/home/bmiller/Runestone/web2py/applications/runestone/controllers/dashboard.py", line 150, in studentreport data_analyzer.load_user_metrics(request.vars.id) File "/home/bmiller/Runestone/web2py/applications/runestone/models/db_dashboard.py", line 368, in load_user_metrics self.db_chapter_progress = db((db.user_sub_chapter_progress.user_id == self.user.id)).select(db.user_sub_chapter_progress.chapter_id,db.user_sub_chapter_progress.sub_chapter_id,db.user_sub_chapter_progress.status) AttributeError: 'NoneType' object has no attribute 'id'

irunestone avatar Jan 17 '18 16:01 irunestone

Yes, young gage seems to have created a very creative username: Gägę🙌

This is not supported, but I suppose we should try to detect that at registration time.

bnmnetp avatar Jan 17 '18 19:01 bnmnetp

Write a javascript validation function to ensure that a username has only ascii characters in it before submitting a registration request.

bnmnetp avatar Jan 18 '18 16:01 bnmnetp

I have started working on solving this issue and it is not clear which characters should be prevented to avoid the trouble. I have tried different usernames, where the ones with emojis always cause troubles, but some usernames that had non-ASCII characters worked and some did not. Any clarification on which characters should be allowed would be appreciated @bnmnetp @bjones1 .

knakaj avatar Jul 28 '22 14:07 knakaj