Instructor nicknames shouldn't be case-sensitive

Bug #812427 reported by Elizabeth K. Joseph
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Lernid
Medium
Mohammad AbuShady

Bug Description

Currently Lernid only recognizes instructors if their nicknames exactly match what is in the calendar and it's case-sensitive.

A lot of people don't pay attention to case of their nickname, so I could see this being a problem often, we probably shouldn't consider case.

Related branches

Revision history for this message
Mohammad AbuShady (coalwater) wrote :

Why does lernid need the name of the instructor?

Revision history for this message
Elizabeth K. Joseph (lyz) wrote :

Lernid uses the name of the instructor to bold their text, control slides and display links given - otherwise in unmoderated sessions anyone could join the channel and change slides and post random links.

Revision history for this message
Mohammad AbuShady (coalwater) wrote :

So assuming lernid uses regex (i'm not sure if it does or not) you want it to be use case insensitive mode?

I just checked right now, coalwater and coalwateR (just an example) can't exist on the same channel, so such regex mode can't be abused because people can't impersonate instructors, i can assign this bug to my self if approved.

Revision history for this message
Nathan Handler (nhandler) wrote : Re: [Bug 812427] Re: Instructor nicknames shouldn't be case-sensitive

If I remember my IRC discussion from the other day correctly, Lernid does not currently use a regex for this. You can get around this by converting the nick to lowercase and then checking if it matches. I can also confirm that nicks are case insensitive on IRC. This means that since I have nhandler registered, I can go ahead and use NHandler or NHANDLER as well; they are all the same, and only one person can use it at a time.

Revision history for this message
John S. Gruber (jsjgruber) wrote :

Coalwater: The comparison is in the on_faculty function at the end of lernid/widgets/Schedule.py . As Nathan said it isn't a regex.

Changed in lernid:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Mohammad AbuShady (coalwater) wrote :

any suggestions on how this could be tested?

Changed in lernid:
status: Triaged → In Progress
assignee: nobody → Coalwater (coalwater)
Revision history for this message
John S. Gruber (jsjgruber) wrote :

Sure. I define a google calendar for my testing sessions, and then put
a config file in my home directory referring to it. You can look at
the code (I think in EventManager.py) to see what a config looks like.
Specify it to lernid with
lernid --config test.lernid

Revision history for this message
Mohammad AbuShady (coalwater) wrote :

i created the file and created the ical, but i still don't get how lernid should know name of the instructors, i added a print in my code and when it prints event instructors and helpers they return as an empty list, how can i tell lernid that i'm an instructor ?

Revision history for this message
John S. Gruber (jsjgruber) wrote :
Changed in lernid:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers