But when the Canvas application is translated, for instance, in French, the e['type'] isn't student but "Étudiant". So the detect fails and @student is empty and so it breaks the "badge_check" page.
Wouldn't it be better to test the "role" attribute? It seems to be quite a 'constant' as in French the role appears as "StudentEnrollment".
I've made my own change within my instance of canvabadges and it does work. But maybe there is a drawback I haven't thought about?
Do you want me to help you solving this issue? It's an important one but I think it is an easy one to solve, isn't it?
Hi again Whitmer :)
I have found an important issue that prevent students from being detected as student when they access a badge.
In your file "lib/views.rb" you have this line of code:
But when the Canvas application is translated, for instance, in French, the e['type'] isn't student but "Étudiant". So the detect fails and
@student
is empty and so it breaks the "badge_check" page.Wouldn't it be better to test the "role" attribute? It seems to be quite a 'constant' as in French the role appears as "StudentEnrollment".
I've made my own change within my instance of canvabadges and it does work. But maybe there is a drawback I haven't thought about?
Do you want me to help you solving this issue? It's an important one but I think it is an easy one to solve, isn't it?
Best regards, Kulgar.