Skip to content

feat: Allow optionally passing PII in course LTI tab [BD-38] [BB-3899] [TNL-8104] - #26982

Merged
asadazam93 merged 1 commit into
openedx:masterfrom
open-craft:kshitij/lti-pii-toggle
Jul 9, 2021
Merged

feat: Allow optionally passing PII in course LTI tab [BD-38] [BB-3899] [TNL-8104]#26982
asadazam93 merged 1 commit into
openedx:masterfrom
open-craft:kshitij/lti-pii-toggle

Conversation

@xitij2000

@xitij2000 xitij2000 commented Mar 12, 2021

Copy link
Copy Markdown
Contributor

Adds the ability to pass PII to an LTI provider in the LTI course tab if the LtiConfiguration associated with that tab is configured to allow that.

Jira task: https://openedx.atlassian.net/browse/TNL-8104

Dependencies: None

Sandbox URL:

LMS: https://pr26982.sandbox.opencraft.hosting/
Studio: https://studio.pr26982.sandbox.opencraft.hosting/

Merge deadline: "None"

Testing instructions:

  1. Set up a new course with an LTI-based discussion provider.
  2. In the LtiConfiguration for this provider set the lti_config to:
    {"ask_to_send_username":true,"ask_to_send_email":true}
  3. Check and see if it's passing the data to the LTI provider.

Reviewers

  • (OpenCraft internal reviewer's GitHub username goes here)
  • edX reviewer[s] TBD

@openedx-webhooks

openedx-webhooks commented Mar 12, 2021

Copy link
Copy Markdown

Thanks for the pull request, @xitij2000! I've created BLENDED-792 to keep track of it in Jira.

When this pull request is ready, tag your edX technical lead.

@openedx-webhooks openedx-webhooks added blended PR is managed through 2U's blended developmnt program needs triage labels Mar 12, 2021
@xitij2000
xitij2000 force-pushed the kshitij/lti-pii-toggle branch from 11433cd to bfdaba8 Compare March 16, 2021 08:28
@xitij2000 xitij2000 changed the title [BD-03] Allow optionally passing PII in course LTI tab [BD-03] [BB-3899] Allow optionally passing PII in course LTI tab Mar 16, 2021
Comment thread openedx/features/lti_course_tab/tab.py Outdated
Comment thread openedx/features/lti_course_tab/tab.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are ask_to_send_username and ask_to_send_email two new fields we're adding to LtiConfiguration? I'm wondering if we want these to be phrased more as authorizations or allowances. can_send_username or something like that, perhaps? I'm not sure if there's precedent for a naming scheme for this elsewhere in the codebase.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidjoy These are the terms used by the current LTI XBLock. I was going for familiarity here, but since they have different UIs perhaps it isn't that important. I will change this to what you suggested.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm not a huge fan of the ask_to_ prefix; I initially thought this would prompt the user for consent.

That said, it may be even worse to refer to the variable by multiple different names.

Given the original key has existed in the xblock for >5 years now, I think I'd be begrudgingly inclined to leave it as-is 🤷

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stvstnfrd The field name is internal to the XBlock, and the display name is "Request user's username" the XBlock does actually ask for permission before sending this data.

Perhaps we can use more accurate terminology internally while using familiar names in the UI?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the current stance on naming these variables?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current internal naming is to be consistent with the current XBlock field names. This might not be the best idea since these are used differently here.
Perhaps the names should drop the ask and just be send_username and send_email.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, that would clean up a little.

Comment thread openedx/features/lti_course_tab/tab.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm not a huge fan of the ask_to_ prefix; I initially thought this would prompt the user for consent.

That said, it may be even worse to refer to the variable by multiple different names.

Given the original key has existed in the xblock for >5 years now, I think I'd be begrudgingly inclined to leave it as-is 🤷

Comment thread openedx/features/lti_course_tab/tab.py Outdated
Comment thread openedx/features/lti_course_tab/tab.py Outdated
@xitij2000
xitij2000 force-pushed the kshitij/lti-pii-toggle branch from 8337f57 to 59ded7b Compare March 17, 2021 09:51
Comment thread openedx/features/lti_course_tab/tab.py Outdated
@marcotuts

Copy link
Copy Markdown
Contributor

What is the next step on this PR?

@marcotuts

Copy link
Copy Markdown
Contributor

jenkins run quality

@xitij2000

xitij2000 commented May 3, 2021

Copy link
Copy Markdown
Contributor Author

@marcotuts While this was being worked on I created an ADR to decide how to handle the flag situation since it wasn't straightforward. Since that ADR was approved, I will have a task this sprint to implement the suggestions from the ADR, and use the flag the way it's described in the ADR

@xitij2000 xitij2000 changed the title [BD-03] [BB-3899] Allow optionally passing PII in course LTI tab feat: Allow optionally passing PII in course LTI tab [BD-38] [BB-3899] May 21, 2021
@xitij2000 xitij2000 changed the title feat: Allow optionally passing PII in course LTI tab [BD-38] [BB-3899] feat: Allow optionally passing PII in course LTI tab [BD-38] [BB-3899] [TNL-8104] Jun 10, 2021
@arch-bom-gocd-alerts

Copy link
Copy Markdown

📣 💥 Heads-up: You must either rebase onto master or merge master into your branch to avoid breaking the build.

We recently removed diff-quality and introduced lint-amnesty. This means that the automated quality check that has run on your branch doesn't work the same way it will on master. If you have introduced any quality failures, they might pass on the PR but then break the build on master.

This branch has been detected to not have commit 2e33565 as an ancestor. Here's how to see for yourself:

git merge-base --is-ancestor 2e335653 kshitij/lti-pii-toggle && echo "You're all set" || echo "Please rebase onto master or merge master to your branch"

If you have any questions, please reach out to the Architecture team (either #edx-shared-architecture on Open edX Slack or #architecture on edX internal).

@awaisdar001 awaisdar001 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few nits -- otherwise this PR looks good to me.

Comment thread openedx/features/lti_course_tab/tab.py Outdated
Comment thread openedx/features/lti_course_tab/tab.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the current stance on naming these variables?

@xitij2000
xitij2000 force-pushed the kshitij/lti-pii-toggle branch from 33379b9 to dad2973 Compare June 16, 2021 11:29

@awaisdar001 awaisdar001 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xitij2000 This PR seems outdated or blocked on some other PR.
The reason I say that is because there is no model "CourseAllowPIISharingInLTIFlag" in specified import location (edx:master). at the moment.

Thoughts?

@xitij2000

Copy link
Copy Markdown
Contributor Author

@awaisdar001 Yes, it is currently blocked on this PR: openedx/xblock-lti-consumer#172

That needs to be updated to add the new changelog, bump up the version to 3 etc. Then this PR needs to be updated to use new new flag, remove the prefixes etc.

I don't have time in the current sprint, but will look into next sprint starting next tuesday.

@xitij2000
xitij2000 force-pushed the kshitij/lti-pii-toggle branch 2 times, most recently from 1b41608 to 26bbacc Compare July 1, 2021 04:05
@xitij2000

Copy link
Copy Markdown
Contributor Author

jenkins run all

@AhtishamShahid AhtishamShahid left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is lti-consumer-xblock dependency at this line. https://github.com/edx/edx-platform/blob/36319bda486394f049f006898c5a920a09211c33/requirements/edx/base.in#L112
And changes in .txt files for dependency seem to be pointing towards the branch, normally we use tags for that.

@xitij2000

Copy link
Copy Markdown
Contributor Author

There is lti-consumer-xblock dependency at this line.

https://github.com/edx/edx-platform/blob/36319bda486394f049f006898c5a920a09211c33/requirements/edx/base.in#L112

And changes in .txt files for dependency seem to be pointing towards the branch, normally we use tags for that.

This is a temporary change. Currenly the version of xblock-lti-consumer this needs hasn't been merged or tagged yet: openedx/xblock-lti-consumer#172

So while that PR is still unmerged, and the release is untagged, this PR needs to use the branch name. Once a release is tagged, I'll run make upgrade and commit that.

@saadyousafarbi saadyousafarbi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have added some comments!
If this is ready, can we have a sandbox for this so we can test the functionality thoroughly before moving forward!
Thank you!

Comment thread requirements/edx/testing.txt Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are there any other fields other than pii_share_username and pii_share_email starting with pii_ for this check?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, but the idea is that if there are any in the future, this will cover it.

Comment thread requirements/edx/development.txt Outdated
Comment thread requirements/edx/base.txt Outdated
Comment thread openedx/features/lti_course_tab/tab.py Outdated
Comment thread openedx/features/lti_course_tab/tests.py Outdated
@xitij2000
xitij2000 force-pushed the kshitij/lti-pii-toggle branch from 31272d2 to 9d2a087 Compare July 6, 2021 06:25

@awaisdar001 awaisdar001 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but updatexblock-lti-consumer requirement before merging.

@xitij2000
xitij2000 force-pushed the kshitij/lti-pii-toggle branch from 3708721 to d989432 Compare July 7, 2021 10:03
@xitij2000

Copy link
Copy Markdown
Contributor Author

Looks good, but updatexblock-lti-consumer requirement before merging.

I've manually updated the dependency.

@awaisdar001

Copy link
Copy Markdown
Contributor

jenkins run all

@asadazam93

Copy link
Copy Markdown
Contributor

@xitij2000 the checks are failing here. Can you take a look?

@awaisdar001

Copy link
Copy Markdown
Contributor

@xitij2000 the checks are failing here. Can you take a look?

Thats because pypi is not updated to 3.0.0 :(
I have filed an SRE ticket for that

@saadyousafarbi

Copy link
Copy Markdown
Contributor

@xitij2000 please share the sandbox for this PR once the build pipelines are fixed and test pass! Thank you.

@xitij2000
xitij2000 force-pushed the kshitij/lti-pii-toggle branch from d989432 to 68321a0 Compare July 8, 2021 14:07
@awaisdar001

Copy link
Copy Markdown
Contributor

jenkins run all

@edx-status-bot

Copy link
Copy Markdown

Your PR has finished running tests. There were no failures.

@asadazam93

Copy link
Copy Markdown
Contributor

@xitij2000 is this PR ready to merge? Should I merge it?

@xitij2000

Copy link
Copy Markdown
Contributor Author

@asadazam93 Yes. It's good to go for my side.

@asadazam93
asadazam93 merged commit 666a50d into openedx:master Jul 9, 2021
@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production.

@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

robrap added a commit that referenced this pull request Jul 9, 2021
robrap added a commit that referenced this pull request Jul 9, 2021
@Agrendalath
Agrendalath deleted the kshitij/lti-pii-toggle branch July 13, 2021 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blended PR is managed through 2U's blended developmnt program merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.