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

fix: rely on new error_reason field to determine failed learner_state reason #1079

Merged
merged 7 commits into from
Nov 2, 2023

Conversation

adamstankiewicz
Copy link
Member

@adamstankiewicz adamstankiewicz commented Nov 1, 2023

Related PR: openedx/enterprise-access#314

Removes some business logic in the frontend in favor of relying on data returned by the API explicitly. That is, when an Assignment is an errored state, the API now returns the most recent error_reason from the associated Actions such that the frontend doesn't have to iterate through the list of Actions itself.

For all changes

  • Ensure adequate tests are in place (or reviewed existing tests cover changes)

Only if submitting a visual change

  • Ensure to attach screenshots
  • Ensure to have UX team confirm screenshots

@adamstankiewicz adamstankiewicz marked this pull request as ready for review November 1, 2023 16:56
@adamstankiewicz adamstankiewicz changed the title fix: ensure we pull from last action, instead of the first action to determine failed learner_state; remove erroneous console.logs fix: ensure we pull from last action, instead of the first action to determine failed learner_state; remove erroneous console.log statements Nov 1, 2023
Copy link

codecov bot commented Nov 1, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (6da44f2) 84.15% compared to head (5909068) 84.19%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1079      +/-   ##
==========================================
+ Coverage   84.15%   84.19%   +0.04%     
==========================================
  Files         458      463       +5     
  Lines        9581     9613      +32     
  Branches     1996     1996              
==========================================
+ Hits         8063     8094      +31     
- Misses       1476     1477       +1     
  Partials       42       42              
Files Coverage Δ
...er-credit-management/AssignmentStatusTableCell.jsx 93.33% <100.00%> (-0.79%) ⬇️
...ent/assignments-status-chips/WaitingForLearner.jsx 100.00% <ø> (ø)
...credit-management/cards/AssignmentModalContent.jsx 100.00% <100.00%> (ø)
...learner-credit-management/cards/BaseCourseCard.jsx 100.00% <100.00%> (ø)
...s/learner-credit-management/cards/Collapsibles.jsx 100.00% <100.00%> (ø)
...nts/learner-credit-management/cards/CourseCard.jsx 100.00% <100.00%> (ø)
...edit-management/cards/NewAssignmentModalButton.jsx 100.00% <100.00%> (ø)
...dit-management/cards/data/useCourseCardMetadata.js 100.00% <100.00%> (ø)
...components/learner-credit-management/data/utils.js 94.50% <66.66%> (-1.01%) ⬇️
src/components/learner-credit-management/index.jsx 66.66% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adamstankiewicz adamstankiewicz changed the title fix: ensure we pull from last action, instead of the first action to determine failed learner_state; remove erroneous console.log statements fix: ensure we pull from last action, instead of the first action to determine failed learner_state reason; remove erroneous console.log statements Nov 1, 2023
@@ -29,7 +29,6 @@ const EnterpriseAppRoutes = ({
enableContentHighlightsPage,
}) => {
const { canManageLearnerCredit } = useContext(EnterpriseSubsidiesContext);
console.log('EnterpriseAppRoutes!!!');
Copy link
Member Author

Choose a reason for hiding this comment

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

[context] These erroneous console.log statements slipped through in the previous PR that merged while debugging one of the review comments. Removing the console.log statements in this PR.


if (isBadEmailError) {
// Determine which failure chip to display based on the error reason.
if (errorReason === 'email_error') {
Copy link
Member Author

Choose a reason for hiding this comment

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

[inform] Added via openedx/enterprise-access#314

@adamstankiewicz adamstankiewicz changed the title fix: ensure we pull from last action, instead of the first action to determine failed learner_state reason; remove erroneous console.log statements fix: ensure we pull from last action, instead of the first action to determine failed learner_state reason Nov 1, 2023
@adamstankiewicz adamstankiewicz changed the title fix: ensure we pull from last action, instead of the first action to determine failed learner_state reason fix: rely on new error_reason field to determine failed learner_state reason Nov 2, 2023
Comment on lines -23 to -26
<li>
Learners will receive automated reminder emails every 10-15 days until the enrollment
deadline is reached.
</li>
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed based on this recent Figma annotation:

image

@adamstankiewicz adamstankiewicz merged commit 8211761 into master Nov 2, 2023
6 checks passed
@adamstankiewicz adamstankiewicz deleted the ags/ent-7823-pt2 branch November 2, 2023 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants