Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some process needs to still retrieve/persist user_id and sis_name as it is used for MiVideo access events #1443

Closed
zqian opened this issue Sep 20, 2022 · 7 comments · Fixed by #1444
Assignees

Comments

@zqian
Copy link
Member

zqian commented Sep 20, 2022

Describe the bug (Tell us what happens instead of the expected behavior) :

In PR #1392, the user cron query does not pull in uniqname/sis_name from UDW. This is in preparation for UDP transition and UDP does not have non-roster user info, so that we need to get user login_name from LTI launch #1344

However, this causes problem for MiVideo resource access events:
Since MiVideo is standalone tool, the Caliper events does not have Canvas user id information, so the user_id field has value of "-1". In cron.py line 312, MiVideo events are joined with the MyLA user table based on sis_name, so that MiVideo events can be stored inside resource_access table with values in user_id field

With the above change of PR #1392, MyLA user table no longer has sis_name field populated after cron run, and instead the sis_name value is set upon individual LTI launch and will be reset to null with next cron job. Hence the merge in cron.py line 333 will always return empty dataframe for MiVideo access events, hence MiVideo events won't be shown in Resource Access View.

Steps to Reproduce :

  1. Enable MyLA tool for a course with MiVideo tool
  2. Run MyLA cron job
  3. Go to MyLA resource access view, notice there is no MiVdeo events shown
zqian added a commit to zqian/my-learning-analytics that referenced this issue Sep 20, 2022
… query for UDW cron; will file a UDP request for including Canvas user login_id in UDP, so that we can retrieve the sis_name field in UDP cron, too
@zqian zqian self-assigned this Sep 20, 2022
@zqian zqian added this to To do in MyLA-2022.02.01 via automation Sep 20, 2022
@lsloan
Copy link
Member

lsloan commented Nov 3, 2022

To clarify, can an example of the Caliper event from MiVideo be added to the description?

@jennlove-um jennlove-um assigned lsloan and unassigned zqian Nov 3, 2022
@zqian zqian assigned zqian and lsloan and unassigned lsloan and zqian Nov 3, 2022
@zqian
Copy link
Member Author

zqian commented Nov 3, 2022

@lsloan you can find the MiVideo query inside this wiki page

@jonespm jonespm changed the title cron needs to retrieve sis_name/user_login_name as it is used for MiVideo access events Some process needs to still retrieve/persist user_id and sis_name as it is used for MiVideo access events Nov 7, 2022
@jennlove-um jennlove-um moved this from To do to In progress in MyLA-2022.02.01 Nov 10, 2022
MyLA-2022.02.01 automation moved this from In progress to Review/QA Nov 30, 2022
zqian added a commit that referenced this issue Nov 30, 2022
…ron query (#1444)

Co-authored-by: Code Hugger (Matthew Jones) <jonespm@umich.edu>
@jennlove-um
Copy link
Contributor

Expected outcomes:

Kaltura video events will be included in Resources Accessed for users who people who exist in the UDP as students and teachers in the SIS data when they have a StudentEnrollment on a course with MyLA enabled.

Kaltura video events will NOT be available for:

  • Staff user where SIS ID doesn't match Login ID (most users for us) in Canvas. Because UDP doesn't have all staff email and can't map to Kaltura. They shouldn't be a student anyway or a problem for MyLA for now, especially for RO courses.
  • Empty SIS ID (because this SIS ID is then null in UDP). These shouldn't be common, so no fix in place for this.
  • Canvas SIS ID that doesn't exactly match or closely match (can swap + for @) the Login ID. This is our style of friend/social accounts that either are an exact email match or one has a + the other has an @. Maybe different for other universities.

@jennlove-um
Copy link
Contributor

jennlove-um commented Dec 15, 2022

(Per Matt) There's 3 ways to improve this.

  1. Unizin adds all users to the person_email or some other table in UDP that exist in the Pseudonym table in UDW. Lynette mentioned in an email from 2020 that they were investigating this. Can figure out if anything came of this work.
  2. MyLA pulls this data from some other source, either LTI launch (which would probably be sufficient) or API calls (which could work but not necessary if we can just use the launch) or Canvas Data 2 (which we might utilize when available?)
  3. Kaltura adds the a different/correct ID to their Caliper event. Which they seem to be doing but might take awhile. And still old events wouldn't have this ID.

@jennlove-um
Copy link
Contributor

Testing passes in Beta.

Event data is included for enrolled students.
Event data is included for friend accounts.
Event data is not included for staff with an SIS ID that does not match the Login ID.

@jennlove-um jennlove-um moved this from Review/QA to Done in MyLA-2022.02.01 Dec 15, 2022
@jonespm
Copy link
Member

jonespm commented Dec 15, 2022

The fix we made for this for this release was to replace the mivideo query to do a replacement in the username. This is documented in the wiki

                  replace(actor.id, 'https://aakaf.mivideo.it.umich.edu/caliper/info/user/' , '') AS user_login_name, 
                  replace(
                    replace(actor.id, 'https://aakaf.mivideo.it.umich.edu/caliper/info/user/' , ''), '+', '@'
                   ) AS user_login_name, 

@jennlove-um
Copy link
Contributor

Testing passes in Test.

Event data is included for enrolled students.
Event data is included for friend accounts.
Event data is not included for staff with an SIS ID that does not match the Login ID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
4 participants