-
Notifications
You must be signed in to change notification settings - Fork 205
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: corrects the navigation issue if the student does not pass the entrance exam #1429
fix: corrects the navigation issue if the student does not pass the entrance exam #1429
Conversation
Thanks for the pull request, @imasdekar! What's next?Please work through the following steps to get your changes ready for engineering review: 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Let us know that your PR is ready for review:Who will review my changes?This repository is currently maintained by Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:
When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
b739317
to
5dc0480
Compare
@mphilbrick211 Can you please get the checks run and get this reviewed? |
@imasdekar I believe we need to wait another week until @bradenmacdonald and @farhaanbukhsh take on maintainer responsibilities for this repo, after this it can be reviewed and scheduled for merge |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1429 +/- ##
==========================================
+ Coverage 87.78% 87.80% +0.01%
==========================================
Files 310 310
Lines 5320 5328 +8
Branches 1350 1355 +5
==========================================
+ Hits 4670 4678 +8
Misses 633 633
Partials 17 17 ☔ View full report in Codecov by Sentry. |
Hi @imasdekar, thank you for this contribution! |
OSPR management note: This PR includes user-facing changes. However, it fixes an existing bug (#1415) so there should be no need to send it through product review. |
src/course-home/progress-tab/certificate-status/CertificateStatus.jsx
Outdated
Show resolved
Hide resolved
); | ||
const exitActive = exitMode !== COURSE_EXIT_MODES.disabled; | ||
const exitActive = ((exitMode !== COURSE_EXIT_MODES.disabled) && (exitMode !== COURSE_EXIT_MODES.entranceExamFail)); |
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.
Can you help me understand this? What exactly does exitActive
mean and what are the various exit modes? Just want to make sure this logic is correct, but I'm not clear on what's even going on here.
I'd love if you could add a few JSDoc comments to this file as part of this PR to explain what an "exit mode" is and what each of the COURSE_EXIT_MODES
mean. And why exitActive
should be false
when the exit mode is entranceExamFail
??
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.
exitActive is used to enable/disable the exit mode i.e. the next buttons.
Available COURSE_EXIT_MODES: disabled, celebration, nonPassing, inProgress, entranceExamFail
So if the user has failed the entrance exam, access to further course sections should be disabled
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.
I've added some comments in the code as per your suggestion. Let me know if more explanation is needed in the comments and I will add accordingly.
5dc0480
to
ba2fbc8
Compare
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.
Thanks for the fix. I tested it and confirmed the issue is fixed. Although there is still obviously a major bug on the backend - it should be refusing to provide the rest of the course to the user who hasn't passed the exam, regardless of what logic we have on the frontend.
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.
@imasdekar Actually could you please add a test case for this too? That will fix the coverage problem. Sorry, I just noticed now there isn't a new test.
@bradenmacdonald before implementing this fix on the frontend I dis check the backend and found that the entrance data is sent to the frontend and the respective data has a field which states that the user has failed the entrance exam. Hence I decided to utilise the same and implement a fix on the frontend. |
I will add a test case and update this PR. |
@bradenmacdonald If req. is also that further course data not be sent from the backend at all if the entrance exam status is failed then what exactly should be the response in such a case? I can work on this backend fix as well. |
Great! Replied on #1415. |
…ntrance exam - adds checks while rendering the next button text for status of the entrance exam. closes openedx#1415 Signed-off by: Ishan Masdekar <[email protected]>
ba2fbc8
to
e2d1e28
Compare
@bradenmacdonald I've added tests as required. |
Thanks @imasdekar ! Unfortunately the test is not passing on CI - can you please take a quick look? |
- Introduces a test case each for scenarios where the entrance exam status is failed and pass Signed-off by: Ishan Masdekar <[email protected]>
e2d1e28
to
c98da6d
Compare
@bradenmacdonald apologies, it should work now. I missed to push a small update. |
closes #1415
Signed-off by: Ishan Masdekar [email protected]