-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: display allocated runs on the course about page #1142
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
780da7e
feat: display allocated runs on the course about page
brobro10000 a44878c
feat: conditionally checks parentContentKey
brobro10000 621c86d
chore: PR synchronous feedback
brobro10000 131efa3
refactor: moves course run allocation check to course metadata hook
brobro10000 7b692e9
feat: retain performance gains by intentionally calling can-redeem
brobro10000 45a66f4
chore: update tests
brobro10000 d58dfeb
chore: cleanup
brobro10000 6c4c544
chore: add allocated course run assignments metadata
brobro10000 2313a27
chore: PR feedback
brobro10000 c92365b
Merge branch 'master' of github.com:openedx/frontend-app-learner-port…
brobro10000 4f3397f
chore: pr cleanup
brobro10000 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[question/clarification] Why might we only want to mutate the below
courseRuns
andavailableCourseRuns
values whenhasMultipleAssignedCourseRuns: true
? Is there a particular reason we wouldn't want to go that if the user has a single allocated assignment applicable to the current course?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a user has a single allocated assignment, we alter how we retrieve course metadata.
For a single allocation with no
course_run_key
defined, we are defaulting thecourseRunKey
to the allocated course run key, only returning a single course from course metadata. That way we don't have to go through the additional step of filtering by the allocated course run a second time.For a single allocation with a course_run_key, we are returning a single course regardless, so any UI changes (such as important dates) would have to be parsed down stream to determine if the singular course run displayed (via
course_run_key
) is an allocated course run.For
hasMultipleAssignedCourseRuns: true
state, we are opting to use thecourseKey
to return all course runs from course metadata. Then we transform it further with this function. This approach allows us to treat the multiple course runs for a single course as a true edge case (that could easily be ripped out) as opposed to baking it into the default logic.