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

[Bug] Students have access to course content even if the Entrance Exam wasn't finished #1415

Closed
GlugovGrGlib opened this issue Jul 3, 2024 · 10 comments · Fixed by #1429
Closed
Labels
bug Report of or fix for something that isn't working as intended

Comments

@GlugovGrGlib
Copy link
Member

STR:

  1. Enable feature ENTRANCE_EXAMS
  2. Set Entrance exam for course in schedule and details
    image
  3. As a student, enroll to the course

Actual Result

Students have access to the full course even before the Entrance Exam is finished
image

Expected Result

Students don't have access to course content before passing with necessary score for entrance exam
image

Notes:

Result of investigation:

The problem is Learning MFE used sections from course_outline. This data was fetched from /edx-platform/openedx/core/djangoapps/content/learning_sequences/api/outlines.py, get_user_course_outline_details. This function doesn`t check if is there an entrance exam and if the user passes the exam.

An example of how to check if the chapter is an entrance exam and did user passed it can be found at edx-platform/lms/djangoapps/courseware/views/index.py, _add_entrance_exam_to_context function

@GlugovGrGlib GlugovGrGlib added the bug Report of or fix for something that isn't working as intended label Jul 3, 2024
@imasdekar
Copy link
Contributor

@GlugovGrGlib I am interested to work on this. I would like to know where should the user be navigated to on click of the next buttons(end of course) if the entrance exam is not passed?

imasdekar added a commit to imasdekar/frontend-app-learning that referenced this issue Aug 2, 2024
…e exam

- adds checks in sequences while rendering the next button for status of
the entrance exam.

closes openedx#1415

Signed-off by: Ishan Masdekar <[email protected]>
imasdekar added a commit to imasdekar/frontend-app-learning that referenced this issue Aug 2, 2024
…e 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]>
imasdekar added a commit to imasdekar/frontend-app-learning that referenced this issue Aug 2, 2024
…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]>
@imasdekar
Copy link
Contributor

@GlugovGrGlib I did check that the backend was correctly sending the entrance exam data to the mfe but the exam status was nowhere checked in the mfe. I have an open PR #1429 , just waiting to make changes to the navigation link on the next(end of course) button if the entrance exam is not passed. Currently have not added any next link for the button.

@GlugovGrGlib
Copy link
Member Author

Hey @imasdekar, in case user hasn't passed the entrance exam they should see a disabled Next button, similar to what is currently displayed for users in the very last section of the course.
image

imasdekar added a commit to imasdekar/frontend-app-learning that referenced this issue Aug 7, 2024
…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]>
@imasdekar
Copy link
Contributor

@GlugovGrGlib I have updated my PR #1429 and now the next buttons will be disabled(as in the screenshot below) if the user dose not pass the entrance exam

image

Can you review or ask some appropriate person to review the PR #1429 ?

imasdekar added a commit to imasdekar/frontend-app-learning that referenced this issue Sep 13, 2024
…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]>
@bradenmacdonald
Copy link
Contributor

#1429 will fix this on the frontend, but a backend bug remains - the backend should never serve the user content from an exam-gated course before the user has passed the exam, regardless of the logic we have on the frontend.

@imasdekar
Copy link
Contributor

@bradenmacdonald I am a fullstack python developer and would love to work on a backend fix for this issue as well. What is the expected response in such a case where the entrance exam status is failed and the user requests for further course data?

@bradenmacdonald
Copy link
Contributor

@imasdekar I'm not sure, as I'm not super familiar with exams, but I would assume it should be just as if the exam section is the only section in the course - requesting any other section should return a 404, and requesting the outline should only list the entrance exam section. However, it would be good to do a little investigation first and see if there's any reason why it wasn't implemented that way in the first place. I may be missing something.

imasdekar added a commit to imasdekar/frontend-app-learning that referenced this issue Sep 23, 2024
…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]>
@imasdekar
Copy link
Contributor

@bradenmacdonald for the investigation of the above mentioned backend related change can I help in any way? Is there someone with sufficient know how about this with whom I can connect?

@bradenmacdonald
Copy link
Contributor

bradenmacdonald commented Sep 26, 2024

@imasdekar That would be great! I'm not really sure; I would recommend searching through the edx-platform PRs related to that feature and/or using "blame", to see who worked on it and then ping them on GitHub or Slack to get their input on why the backend isn't blocking access via API and how best to fix it.

@imasdekar
Copy link
Contributor

@bradenmacdonald ok, I will try to investigate alongside working on some other edx task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report of or fix for something that isn't working as intended
Projects
None yet
3 participants