Change the way instructor is identified during the LTI launch to avoid a misleading log message
Closed this issue · 4 comments
During the LTI certification, there were a few tests where they were sending short, unknown, or missing roles. However, the app printed that they "must be admin".
There's nothing that would indicate that they must be admin if they're not in the roles available. We should remove this message and maybe even log it as an ERROR.
my-learning-analytics/dashboard/lti_new.py
Line 194 in 2008dea
The Logic of the instructor check is modified for clarity and this avoids the flagged logged message
Test Plan:
- launch MyLA from a new course that doesn't have an entry in MyLA DB with different roles
- Launch the tool as
TA in the course who is also an instructor in one of the course sections
. He should not enable
MyLA for the course (start the data extraction ) - Launch the tool as `TA only in the course. He should not enable MyLA for the course (start the data extraction )
- Launch the tool with an instructor in the course. He is the person who can enable MyLA for the course
- Launch the tool with an MyLA Admin, i.e is_staff role enabled in the
auth_user
table. He is the person who can
enable MyLA for the course - Launch the tool as Canvas Admin. He should not enable MyLA for the course (start the data extraction )
- Launch the tool as
- Basically only instructor and MyLA admin (who has Django admin access) should be enabling the MyLA in the course.
This will eliminate the unnecessary log message that certification flagged.
This is not something that will happen when users log in to MyLA via Canvas. This should still be reviewed and fixed as part of LTI certification.
Tested in beta:
- Launch the tool as TA in the course who is also an instructor in one of the course sections. He should not enable
MyLA for the course (start the data extraction ) - PASSED - Launch the tool as `TA only in the course. He should not enable MyLA for the course (start the data extraction ) - PASSED
- Launch the tool with an instructor in the course. He is the person who can enable MyLA for the course - PASSED
- Launch the tool with an MyLA Admin, i.e is_staff role enabled in the auth_user table. He is the person who can
enable MyLA for the course - PASSED - Launch the tool as Canvas Admin. He should not enable MyLA for the course (start the data extraction ) - PASSED
I am moving this to done, for some reason this is moved to Review/QA- Dev
Testing passes in test environment.