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

refactor: update assessments formats #2106

Merged

Conversation

nsprenkle
Copy link
Contributor

TL;DR - Update assessments data format used to communicate with frontend.

JIRA: AU-1528 and AU-1525 (closes #2103 )

What changed?

Frontend now uses this format to communicate assessments data to / from the backend:

{
    criteria: [
        // Rubric criterion
        {
            selectedOption: (Int) Order of the selected option
            feedback: (String / Empty) Feedback for the selected option
        }
        ...
    ],  
    overallFeedback: (String / Empty)
}

Included supporting changes to convert this to the format used by the backend to submit an assessment.

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

Frontend now uses a data format which differs from how we store
assessments in the backend. Had to create a bunch of extra serializers
to handle these different views and directions of data transformation.

Ideally there is follow-up work here to minimize the number of one-off
serializers and consolidate some of that logic.
@nsprenkle nsprenkle requested a review from a team as a code owner November 1, 2023 20:24
Copy link

codecov bot commented Nov 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8419f5e) 94.97% compared to head (c86e7be) 94.98%.
Report is 1 commits behind head on feat/2023-dual-ui.

Additional details and impacted files
@@                  Coverage Diff                  @@
##           feat/2023-dual-ui    #2106      +/-   ##
=====================================================
+ Coverage              94.97%   94.98%   +0.01%     
=====================================================
  Files                    191      191              
  Lines                  20383    20448      +65     
  Branches                1848     1851       +3     
=====================================================
+ Hits                   19359    19423      +64     
- Misses                   769      770       +1     
  Partials                 255      255              
Flag Coverage Δ
unittests 94.98% <100.00%> (+0.01%) ⬆️

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

Files Coverage Δ
...ent/xblock/ui_mixins/mfe/assessment_serializers.py 100.00% <100.00%> (ø)
openassessment/xblock/ui_mixins/mfe/mixin.py 94.66% <100.00%> (+0.02%) ⬆️
...block/ui_mixins/mfe/test_assessment_serializers.py 100.00% <100.00%> (ø)
...nassessment/xblock/ui_mixins/mfe/test_mfe_mixin.py 99.79% <ø> (ø)

... and 3 files with indirect coverage changes

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

@nsprenkle nsprenkle merged commit 0d6bf20 into feat/2023-dual-ui Nov 2, 2023
7 checks passed
@nsprenkle nsprenkle deleted the nsprenkle/bff-update-assessments-format branch November 2, 2023 14:47
nsprenkle added a commit that referenced this pull request Nov 6, 2023
* refactor: update assessments data format

Frontend now uses a data format which differs from how we store
assessments in the backend. Had to create a bunch of extra serializers
to handle these different views and directions of data transformation.

Ideally there is follow-up work here to minimize the number of one-off
serializers and consolidate some of that logic.
nsprenkle added a commit that referenced this pull request Nov 6, 2023
* refactor: update assessments data format

Frontend now uses a data format which differs from how we store
assessments in the backend. Had to create a bunch of extra serializers
to handle these different views and directions of data transformation.

Ideally there is follow-up work here to minimize the number of one-off
serializers and consolidate some of that logic.
nsprenkle added a commit that referenced this pull request Nov 6, 2023
* refactor: update assessments data format

Frontend now uses a data format which differs from how we store
assessments in the backend. Had to create a bunch of extra serializers
to handle these different views and directions of data transformation.

Ideally there is follow-up work here to minimize the number of one-off
serializers and consolidate some of that logic.
BryanttV pushed a commit to eduNEXT/edx-ora2 that referenced this pull request Feb 6, 2024
* refactor: update assessments data format

Frontend now uses a data format which differs from how we store
assessments in the backend. Had to create a bunch of extra serializers
to handle these different views and directions of data transformation.

Ideally there is follow-up work here to minimize the number of one-off
serializers and consolidate some of that logic.
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.

2 participants