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

feat: data layer API call for ORA block data #2002

Merged
merged 24 commits into from
Aug 7, 2023
Merged

Conversation

nsprenkle
Copy link
Contributor

@nsprenkle nsprenkle commented Jul 28, 2023

TL;DR - Add a new endpoint {{protocol}}://{{lms_url}}/courses/{{course_id}}/xblock/{{block_id}}/handler/get_block_info to get ORA block info.

JIRA: AU-1381

Developer Checklist

Testing Instructions

  • TODO ADD TESTS

Reviewer Checklist

Collectively, these should be completed by reviewers of this PR:

  • I've done a visual code review
  • I've tested the new functionality

FYI: @openedx/content-aurora

Copy link
Contributor

@jansenk jansenk left a comment

Choose a reason for hiding this comment

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

just a couple comments

openassessment/xblock/data_layer/data_layer_mixin.py Outdated Show resolved Hide resolved
editor_type = CharField(source="text_response_editor")
allow_latex_preview = BooleanField(source="allow_latex")

def get_enabled(self, block):
Copy link
Contributor

Choose a reason for hiding this comment

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

I wish there was a simple way to remove this semi-duplicated code across the few serializers but i think doing that would complicate things more than they need to be

openassessment/xblock/data_layer/serializers.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Patch coverage: 97.80% and project coverage change: +0.09% 🎉

Comparison is base (21e58fb) 94.99% compared to head (1fcd34f) 95.08%.
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2002      +/-   ##
==========================================
+ Coverage   94.99%   95.08%   +0.09%     
==========================================
  Files         155      158       +3     
  Lines       17108    17429     +321     
  Branches     1616     1626      +10     
==========================================
+ Hits        16251    16572     +321     
  Misses        642      642              
  Partials      215      215              
Flag Coverage Δ
unittests 95.08% <97.80%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...enassessment/xblock/data_layer/data_layer_mixin.py 71.42% <71.42%> (ø)
openassessment/xblock/data_layer/serializers.py 95.76% <95.76%> (ø)
openassessment/__init__.py 100.00% <100.00%> (ø)
...enassessment/xblock/data_layer/test_serializers.py 100.00% <100.00%> (ø)
openassessment/xblock/openassessmentblock.py 90.39% <100.00%> (+0.02%) ⬆️

... and 3 files with indirect coverage changes

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

@nsprenkle nsprenkle marked this pull request as ready for review August 2, 2023 22:43
@nsprenkle nsprenkle requested a review from a team as a code owner August 2, 2023 22:43
Copy link
Contributor

@leangseu-edx leangseu-edx left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@jansenk jansenk left a comment

Choose a reason for hiding this comment

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

Good job, nice tests

@nsprenkle nsprenkle merged commit 8145367 into master Aug 7, 2023
6 checks passed
@nsprenkle nsprenkle deleted the aurora/datalayer branch August 7, 2023 14:23
@UsamaSadiq
Copy link
Member

When attempting to upgrade edx-ora2 package to the new version edx-ora2==5.2.2 (released by arbi-bom to resolve our blocker in edx-platform due to simple-history package) the edx-platform tests are failing with the new package version. See the details in github action: https://github.com/openedx/edx-platform/actions/runs/5797385497/job/15713532692?pr=32939#step:7:4578

@leangseu-edx
Copy link
Contributor

@nsprenkle maybe add __init__.py to the folder? It doesn't seems data_layer folder get packaged.

@awais786 awais786 restored the aurora/datalayer branch August 8, 2023 23:59
awais786 added a commit that referenced this pull request Aug 8, 2023
iamsobanjaved pushed a commit that referenced this pull request Aug 9, 2023
BryanttV pushed a commit to eduNEXT/edx-ora2 that referenced this pull request Feb 6, 2024
* feat: add ORA data layer for ORA MFE

* chore: bump version to 5.2.2

---------

Co-authored-by: jansenk <[email protected]>
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.

4 participants