Show SharedFileUpload owner in response block

Description

Where we show users SharedFileUploads owned by their teammates, also show them who owns which file.

Wait until https://openedx.atlassian.net/browse/EDUCATOR-4854 is done to do this to avoid merge conflicts

Requirements

  • When a ORA is team-enabled, display the owner’s username of each file in-line with the file link. E.g., extend the description with the username to the right. Brace or otherwise indicate where the name begins.

  • Ensure any a11y concerns are met for taborder and screenreaders.

  • Non-team ORAs will remain unchanged.

Technical Notes

There are two reasons we estimated this as 2 story points instead of 1:

  • We use the edx-platfrom TeamsService object to fetch anonymous user ids for team members via the anonymous_user_ids_for_team function. This needs to be modified to return a dictionary mapping real ids to anonymous ids, because all of the student_ids we store in the ORA SharedFileUpload model are actually anonymous ids.

  • The way we pass information describing file uploads into Django templates is with a tuple of information containing the file URL, description, name, and a boolean about whether the file can be deleted by the current user. We’d have to extend this tuple by one to include one more piece of information (the username of the file’s owner). This is a brittle pattern, because updating the size of that tuple means we have to change about a dozen things in the ORA codebase that make use of it. Instead, we should take a stab at enabling dictionary lookups in the file upload template; https://stackoverflow.com/questions/8000022/django-template-how-to-look-up-a-dictionary-value-with-a-variable provides a relatively straightforward suggestion.

It might be worth breaking out that second point into its own story before proceeding with this story.

Steps to Reproduce

None

Current Behavior

None

Expected Behavior

None

Reason for Variance

None

Release Notes

None

User Impact Summary

None

Assignee

Jansen Kantor

Reporter

Jansen Kantor

Labels

Reach

None

Impact

None

Platform Area

None

Customer

None

Partner Manager

None

URL

None

Contributor Name

None

Groups with Read-Only Access

None

Story Points

2

Actual Points

None

Category of Work

None

Platform Map Area (Levels 1 & 2)

None

Platform Map Area (Levels 3 & 4)

None

Epic Link

Sprint

None

Priority

Unset
Configure