Skip to content

Fix notes visibility per user preference #32872

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

Closed
wants to merge 3 commits into from
Closed

Conversation

VanDavv
Copy link

@VanDavv VanDavv commented Jul 28, 2023

Description

This Pull Request addresses the issue mentioned in this ticket - openedx/frontend-app-learning#1005. Before this change, notes visibility preference was only taking into account whether the notes are visible for a course or not (globally), not checking the user preference available in XModuleStudentInfoField (which is used to determine whether the notes are highlighted or not)

Supporting information

Directly addresses the following ticket - openedx/frontend-app-learning#1005
Can also resolve the following ticket - openedx/wg-build-test-release#227 - although I was not yet able to consistently reproduce the issue there, will investigate

Testing instructions

A new test case has been created, called test_notes_visibility.py, which contains two tests, one with user preference set to True, and one to false. Running these tests without changes in this PR will result in one of them failing, as it assumes the courseware API call will return notes visibility as False when user preference for visibility is also set to False.

To execute the test, please run the following command

pytest openedx/core/djangoapps/courseware_api/tests/test_notes_visibility.py

Deadline

3rd of August

Copy link
Contributor

@Cup0fCoffee Cup0fCoffee left a comment

Choose a reason for hiding this comment

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

@VanDavv For now, the solution doesn't seem to fix the issue. Can you please update the testing instructions and update your fix.

Comment on lines +1 to +5
from unittest.mock import Mock # lint-amnesty, pylint: disable=wrong-import-order
from lms.djangoapps.courseware.tests.factories import StudentInfoFactory
from lms.djangoapps.courseware.tests.helpers import LoginEnrollmentTestCase
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order
Copy link
Contributor

Choose a reason for hiding this comment

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

@VanDavv Why are the # lint-amnesty, pylint: disable=wrong-import-order necessary here?

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Aug 3, 2023
@openedx-webhooks
Copy link

Thanks for the pull request, @VanDavv! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

⚠️ We can't start reviewing your pull request until you've submitted a signed contributor agreement or indicated your institutional affiliation. Please see the CONTRIBUTING file for more information. If you've signed an agreement in the past, you may need to re-sign. See The New Home of the Open edX Codebase for details.

Once you've signed the CLA, please allow 1 business day for it to be processed. After this time, you can re-run the CLA check by editing the PR title. If the problem persists, you can tag the @openedx/cla-problems team in a comment on your PR for further assistance.

@mphilbrick211 mphilbrick211 added the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Aug 7, 2023
@mphilbrick211
Copy link

Hi @VanDavv! Thanks for this contribution! Please let me know if you have any questions about submitting your CLA form. Thanks!

@e0d
Copy link
Contributor

e0d commented Aug 16, 2023

Hi @VanDavv , we need to have a valid Contributor License Agreement (CLA) in place for all contributions. See the welcome message above for the details about how to enroll. The process is different depending upon whether you are making this contribution as an individual or on behalf of your employer.

@e0d e0d added waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. and removed needs test run Author's first PR to this repository, awaiting test authorization from Axim labels Aug 16, 2023
@Agrendalath
Copy link
Member

We fixed it in #33096 and openedx/frontend-app-learning#1170, so we can close this.

@Agrendalath Agrendalath closed this Sep 7, 2023
@openedx-webhooks
Copy link

@VanDavv Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

1 similar comment
@openedx-webhooks
Copy link

@VanDavv Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants