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: dinamically get the block-id version #392

Merged
merged 6 commits into from
Feb 23, 2024
Merged

fix: dinamically get the block-id version #392

merged 6 commits into from
Feb 23, 2024

Conversation

Ian2012
Copy link
Contributor

@Ian2012 Ian2012 commented Feb 16, 2024

Description: This PR dinamically gets the block-id version from the block_id string. Support CCX courses.

Testing instructions:

  1. Enable CCX courses
  2. Configure a Course as a CCX master
  3. Create a CCX child course
  4. Emit a video event and a problem event
  5. Make sure the corresponding xAPI event has the block ID serialized correctly, verifying that the object.id URL points to the right CCX object.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Feb 16, 2024
@openedx-webhooks
Copy link

openedx-webhooks commented Feb 16, 2024

Thanks for the pull request, @Ian2012! 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.

@Ian2012 Ian2012 requested a review from ziafazal February 16, 2024 21:17
@Ian2012 Ian2012 requested a review from bmtcril February 16, 2024 21:55
@Ian2012 Ian2012 marked this pull request as ready for review February 19, 2024 15:42
Copy link
Member

@felipemontoya felipemontoya left a comment

Choose a reason for hiding this comment

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

This changes look reasonable to me.

I'm wondering [not blocking] if it is worth it to extract the ccx check to a function that can be reused in the two places that it is used here, but probably other places in the future?

Copy link
Contributor

@bmtcril bmtcril left a comment

Choose a reason for hiding this comment

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

This looks good to me, but I agree with @felipemontoya that the block version line should be abstracted out so it can be reused.

@Ian2012
Copy link
Contributor Author

Ian2012 commented Feb 21, 2024

@ziafazal do you see a case where the data can be None in any of the subclasses of BaseProblemCheckTransformer. That's not covered by tests currently and I don't see any case where that could happen on problem_check events.

@bmtcril already refactored

Copy link
Contributor

@bmtcril bmtcril left a comment

Choose a reason for hiding this comment

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

I think this is ok, we know that it's safe to return None here since we were already doing that. If you're not going to add a test to cover that line, though, can you add a # pragma: no cover to it?

Copy link
Contributor

@bmtcril bmtcril left a comment

Choose a reason for hiding this comment

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

LGTM

@Ian2012 Ian2012 merged commit dc7f7bc into master Feb 23, 2024
10 checks passed
@Ian2012 Ian2012 deleted the cag/ccx-support branch February 23, 2024 15:57
@openedx-webhooks
Copy link

@Ian2012 🎉 Your pull request was 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
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants