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: [AXM-47] Add course_status field to primary object #2517

Merged

Conversation

KyryloKireiev
Copy link

Description

Add course_status field to primary enrollment object.
CourseEnrollmentSerializerModifiedForPrimary serializer class is implemented.
Course status field example:

        "course_status": {
            "last_visited_module_id": "block-v1:d+d+d+type@sequential+block@4cc0fa48af3d4f5396b2f250e268e64f",
            "last_visited_module_path": [
                "block-v1:d+d+d+type@sequential+block@4cc0fa48af3d4f5396b2f250e268e64f",
                "block-v1:d+d+d+type@chapter+block@56282949cdf6498b89987930ef5f5b0c",
                "block-v1:d+d+d+type@course+block@course"
            ],
            "last_visited_block_id": "block-v1:d+d+d+type@problem+block@3a0e775074984b9e9d5c5db4899eed0b",
            "last_visited_unit_display_name": "Unit 2"
        }

Add test cases for the testing new course_status field.
New pagination class UserCourseEnrollmentsV4Pagination is implemented. Pagination returns 5 objects per page.

##YouTrack

https://youtrack.raccoongang.com/issue/AXM-47/Resume-for-primary-course

@KyryloKireiev KyryloKireiev self-assigned this Mar 20, 2024
@monteri
Copy link

monteri commented Mar 21, 2024

LGTM, the only thing is quality checks:

./openedx/core/djangoapps/theming/storage.py:201:13: E303 too many blank lines (2)

@GlugovGrGlib GlugovGrGlib force-pushed the kireiev/feat/AXM-47/Add_course_status_for_primary_object branch from c298cfe to f693eb9 Compare March 21, 2024 15:00
@monteri monteri merged commit 5033bf0 into mob-develop Mar 22, 2024
64 checks passed
monteri pushed a commit that referenced this pull request Apr 8, 2024
* feat: [AXM-24] Update structure for course enrollments API (#2515)

* feat: [AXM-24] Update structure for course enrollments API

* style: [AXM-24] Improve code style

* fix: [AXM-24] Fix student's latest enrollment filter

* feat: [AXM-47] Add course_status field to primary object (#2517)

* feat: [AXM-40] add courses progress to enrollment endpoint (#2519)

* fix: workaround for staticcollection introduced in e40a01c

* feat: [AXM-40] add courses progress to enrollment endpoint

* refactor: [AXM-40] add caching to improve performance

* refactor: [AXM-40] add progress only for primary course

* refactor: [AXM-40] refactor enrollment caching optimization

---------

Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>

* feat: [AXM-53] add assertions for primary course (#2522)

* feat: [AXM-53] add assertions for primary course

* test: [AXM-53] fix tests

* style: [AXM-53] change future_assignment default value to None

* refactor: [AXM-53] add some optimization for assignments collecting

* feat: [AXM-200] Implement user's enrolments status API

* style: [AXM-200] Improve code style

* refactor: [AXM-200] Divide get method into smaller methods

---------

Co-authored-by: NiedielnitsevIvan <81557788+NiedielnitsevIvan@users.noreply.github.com>
Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>
monteri pushed a commit that referenced this pull request Apr 23, 2024
* feat: [AXM-24] Update structure for course enrollments API (#2515)

* feat: [AXM-24] Update structure for course enrollments API

* style: [AXM-24] Improve code style

* fix: [AXM-24] Fix student's latest enrollment filter

* feat: [AXM-47] Add course_status field to primary object (#2517)

* feat: [AXM-40] add courses progress to enrollment endpoint (#2519)

* fix: workaround for staticcollection introduced in e40a01c

* feat: [AXM-40] add courses progress to enrollment endpoint

* refactor: [AXM-40] add caching to improve performance

* refactor: [AXM-40] add progress only for primary course

* refactor: [AXM-40] refactor enrollment caching optimization

---------

Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>

* feat: [AXM-53] add assertions for primary course (#2522)

* feat: [AXM-53] add assertions for primary course

* test: [AXM-53] fix tests

* style: [AXM-53] change future_assignment default value to None

* refactor: [AXM-53] add some optimization for assignments collecting

* feat: [AXM-200] Implement user's enrolments status API

* style: [AXM-200] Improve code style

* refactor: [AXM-200] Divide get method into smaller methods

---------

Co-authored-by: NiedielnitsevIvan <81557788+NiedielnitsevIvan@users.noreply.github.com>
Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>
monteri pushed a commit that referenced this pull request Apr 26, 2024
* feat: [AXM-24] Update structure for course enrollments API (#2515)

* feat: [AXM-24] Update structure for course enrollments API

* style: [AXM-24] Improve code style

* fix: [AXM-24] Fix student's latest enrollment filter

* feat: [AXM-47] Add course_status field to primary object (#2517)

* feat: [AXM-40] add courses progress to enrollment endpoint (#2519)

* fix: workaround for staticcollection introduced in e40a01c

* feat: [AXM-40] add courses progress to enrollment endpoint

* refactor: [AXM-40] add caching to improve performance

* refactor: [AXM-40] add progress only for primary course

* refactor: [AXM-40] refactor enrollment caching optimization

---------

Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>

* feat: [AXM-53] add assertions for primary course (#2522)

* feat: [AXM-53] add assertions for primary course

* test: [AXM-53] fix tests

* style: [AXM-53] change future_assignment default value to None

* refactor: [AXM-53] add some optimization for assignments collecting

* feat: [AXM-200] Implement user's enrolments status API

* style: [AXM-200] Improve code style

* refactor: [AXM-200] Divide get method into smaller methods

---------

Co-authored-by: NiedielnitsevIvan <81557788+NiedielnitsevIvan@users.noreply.github.com>
Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>
GlugovGrGlib added a commit that referenced this pull request May 2, 2024
* feat: [AXM-24] Update structure for course enrollments API (#2515)

* feat: [AXM-24] Update structure for course enrollments API

* style: [AXM-24] Improve code style

* fix: [AXM-24] Fix student's latest enrollment filter

* feat: [AXM-47] Add course_status field to primary object (#2517)

* feat: [AXM-40] add courses progress to enrollment endpoint (#2519)

* fix: workaround for staticcollection introduced in e40a01c

* feat: [AXM-40] add courses progress to enrollment endpoint

* refactor: [AXM-40] add caching to improve performance

* refactor: [AXM-40] add progress only for primary course

* refactor: [AXM-40] refactor enrollment caching optimization

---------

Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>

* feat: [AXM-53] add assertions for primary course (#2522)

* feat: [AXM-53] add assertions for primary course

* test: [AXM-53] fix tests

* style: [AXM-53] change future_assignment default value to None

* refactor: [AXM-53] add some optimization for assignments collecting

* feat: [AXM-200] Implement user's enrolments status API

* style: [AXM-200] Improve code style

* refactor: [AXM-200] Divide get method into smaller methods

---------

Co-authored-by: NiedielnitsevIvan <81557788+NiedielnitsevIvan@users.noreply.github.com>
Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>
monteri pushed a commit that referenced this pull request May 22, 2024
* feat: [AXM-24] Update structure for course enrollments API (#2515)

* feat: [AXM-24] Update structure for course enrollments API

* style: [AXM-24] Improve code style

* fix: [AXM-24] Fix student's latest enrollment filter

* feat: [AXM-47] Add course_status field to primary object (#2517)

* feat: [AXM-40] add courses progress to enrollment endpoint (#2519)

* fix: workaround for staticcollection introduced in e40a01c

* feat: [AXM-40] add courses progress to enrollment endpoint

* refactor: [AXM-40] add caching to improve performance

* refactor: [AXM-40] add progress only for primary course

* refactor: [AXM-40] refactor enrollment caching optimization

---------

Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>

* feat: [AXM-53] add assertions for primary course (#2522)

* feat: [AXM-53] add assertions for primary course

* test: [AXM-53] fix tests

* style: [AXM-53] change future_assignment default value to None

* refactor: [AXM-53] add some optimization for assignments collecting

* feat: [AXM-200] Implement user's enrolments status API

* style: [AXM-200] Improve code style

* refactor: [AXM-200] Divide get method into smaller methods

---------

Co-authored-by: NiedielnitsevIvan <81557788+NiedielnitsevIvan@users.noreply.github.com>
Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>
KyryloKireiev added a commit that referenced this pull request May 27, 2024
* feat: [AXM-24] Update structure for course enrollments API (#2515)

* feat: [AXM-24] Update structure for course enrollments API

* style: [AXM-24] Improve code style

* fix: [AXM-24] Fix student's latest enrollment filter

* feat: [AXM-47] Add course_status field to primary object (#2517)

* feat: [AXM-40] add courses progress to enrollment endpoint (#2519)

* fix: workaround for staticcollection introduced in e40a01c

* feat: [AXM-40] add courses progress to enrollment endpoint

* refactor: [AXM-40] add caching to improve performance

* refactor: [AXM-40] add progress only for primary course

* refactor: [AXM-40] refactor enrollment caching optimization

---------

Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>

* feat: [AXM-53] add assertions for primary course (#2522)

* feat: [AXM-53] add assertions for primary course

* test: [AXM-53] fix tests

* style: [AXM-53] change future_assignment default value to None

* refactor: [AXM-53] add some optimization for assignments collecting

* feat: [AXM-200] Implement user's enrolments status API

* style: [AXM-200] Improve code style

* refactor: [AXM-200] Divide get method into smaller methods

---------

Co-authored-by: NiedielnitsevIvan <81557788+NiedielnitsevIvan@users.noreply.github.com>
Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>
NiedielnitsevIvan added a commit that referenced this pull request May 27, 2024
* feat: [AXM-24] Update structure for course enrollments API (#2515)

* feat: [AXM-24] Update structure for course enrollments API

* style: [AXM-24] Improve code style

* fix: [AXM-24] Fix student's latest enrollment filter

* feat: [AXM-47] Add course_status field to primary object (#2517)

* feat: [AXM-40] add courses progress to enrollment endpoint (#2519)

* fix: workaround for staticcollection introduced in e40a01c

* feat: [AXM-40] add courses progress to enrollment endpoint

* refactor: [AXM-40] add caching to improve performance

* refactor: [AXM-40] add progress only for primary course

* refactor: [AXM-40] refactor enrollment caching optimization

---------

Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>

* feat: [AXM-53] add assertions for primary course (#2522)

* feat: [AXM-53] add assertions for primary course

* test: [AXM-53] fix tests

* style: [AXM-53] change future_assignment default value to None

* refactor: [AXM-53] add some optimization for assignments collecting

* feat: [AXM-200] Implement user's enrolments status API

* style: [AXM-200] Improve code style

* refactor: [AXM-200] Divide get method into smaller methods

---------

Co-authored-by: NiedielnitsevIvan <81557788+NiedielnitsevIvan@users.noreply.github.com>
Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>
NiedielnitsevIvan added a commit that referenced this pull request Jun 10, 2024
* feat: [AXM-24] Update structure for course enrollments API (#2515)

* feat: [AXM-24] Update structure for course enrollments API

* style: [AXM-24] Improve code style

* fix: [AXM-24] Fix student's latest enrollment filter

* feat: [AXM-47] Add course_status field to primary object (#2517)

* feat: [AXM-40] add courses progress to enrollment endpoint (#2519)

* fix: workaround for staticcollection introduced in e40a01c

* feat: [AXM-40] add courses progress to enrollment endpoint

* refactor: [AXM-40] add caching to improve performance

* refactor: [AXM-40] add progress only for primary course

* refactor: [AXM-40] refactor enrollment caching optimization

---------

Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>

* feat: [AXM-53] add assertions for primary course (#2522)

* feat: [AXM-53] add assertions for primary course

* test: [AXM-53] fix tests

* style: [AXM-53] change future_assignment default value to None

* refactor: [AXM-53] add some optimization for assignments collecting

* feat: [AXM-200] Implement user's enrolments status API

* style: [AXM-200] Improve code style

* refactor: [AXM-200] Divide get method into smaller methods

---------

Co-authored-by: NiedielnitsevIvan <81557788+NiedielnitsevIvan@users.noreply.github.com>
Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>
KyryloKireiev added a commit that referenced this pull request Jun 21, 2024
* feat: [AXM-24] Update structure for course enrollments API (#2515)

* feat: [AXM-24] Update structure for course enrollments API

* style: [AXM-24] Improve code style

* fix: [AXM-24] Fix student's latest enrollment filter

* feat: [AXM-47] Add course_status field to primary object (#2517)

* feat: [AXM-40] add courses progress to enrollment endpoint (#2519)

* fix: workaround for staticcollection introduced in e40a01c

* feat: [AXM-40] add courses progress to enrollment endpoint

* refactor: [AXM-40] add caching to improve performance

* refactor: [AXM-40] add progress only for primary course

* refactor: [AXM-40] refactor enrollment caching optimization

---------

Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>

* feat: [AXM-53] add assertions for primary course (#2522)

* feat: [AXM-53] add assertions for primary course

* test: [AXM-53] fix tests

* style: [AXM-53] change future_assignment default value to None

* refactor: [AXM-53] add some optimization for assignments collecting

* feat: [AXM-200] Implement user's enrolments status API

* style: [AXM-200] Improve code style

* refactor: [AXM-200] Divide get method into smaller methods

---------

Co-authored-by: NiedielnitsevIvan <81557788+NiedielnitsevIvan@users.noreply.github.com>
Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>
KyryloKireiev added a commit that referenced this pull request Jun 21, 2024
* feat: [AXM-24] Update structure for course enrollments API (#2515)

* feat: [AXM-24] Update structure for course enrollments API

* style: [AXM-24] Improve code style

* fix: [AXM-24] Fix student's latest enrollment filter

* feat: [AXM-47] Add course_status field to primary object (#2517)

* feat: [AXM-40] add courses progress to enrollment endpoint (#2519)

* fix: workaround for staticcollection introduced in e40a01c

* feat: [AXM-40] add courses progress to enrollment endpoint

* refactor: [AXM-40] add caching to improve performance

* refactor: [AXM-40] add progress only for primary course

* refactor: [AXM-40] refactor enrollment caching optimization

---------

Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>

* feat: [AXM-53] add assertions for primary course (#2522)

* feat: [AXM-53] add assertions for primary course

* test: [AXM-53] fix tests

* style: [AXM-53] change future_assignment default value to None

* refactor: [AXM-53] add some optimization for assignments collecting

* feat: [AXM-200] Implement user's enrolments status API

* style: [AXM-200] Improve code style

* refactor: [AXM-200] Divide get method into smaller methods

---------

Co-authored-by: NiedielnitsevIvan <81557788+NiedielnitsevIvan@users.noreply.github.com>
Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>
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