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: [AXIMST-584] create view for course navigation sidebar #2511

Conversation

NiedielnitsevIvan
Copy link

AXIMST-584 [BE] Create endpoint providing Course structure for sidebar

@@ -19,7 +19,8 @@ class CourseBlockSerializer(serializers.Serializer):
def get_blocks(self, block): # pylint: disable=missing-function-docstring
block_key = block['id']
block_type = block['type']
children = block.get('children', []) if block_type != 'sequential' else [] # Don't descend past sequential
last_parent_block_type = 'vertical' if self.context.get('include_vertical') else 'sequential'
children = block.get('children', []) if block_type != last_parent_block_type else [] # Don't descend past sequential
Copy link
Collaborator

Choose a reason for hiding this comment

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

The comment seems not to be valid anymore?

Copy link
Author

Choose a reason for hiding this comment

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

Yep, removed

@GlugovGrGlib
Copy link
Collaborator

@NiedielnitsevIvan Do you think we can already create unit tests for the view, or it can be problematic because of the optimization changes in the follow up tasks?

Additionally, please fix the pylint check

@NiedielnitsevIvan
Copy link
Author

NiedielnitsevIvan commented Mar 7, 2024

@NiedielnitsevIvan Do you think we can already create unit tests for the view, or it can be problematic because of the optimization changes in the follow up tasks?

Additionally, please fix the pylint check

@GlugovGrGlib
I think that if we plan to do a refactor to eliminate code duplication, along with optimization, then writing unit tests doesn't make much sense now. However, it makes sense to write a couple of functional tests.

@NiedielnitsevIvan NiedielnitsevIvan changed the base branch from sidebar-main to ts-develop March 12, 2024 09:49
@NiedielnitsevIvan NiedielnitsevIvan force-pushed the Ivan_Niedielnitsev/AXIMST-584/feature/Create-endpoint-providing-Course-structure-for-sidebar branch from ad97067 to 0ccb71e Compare March 12, 2024 10:08
@monteri monteri merged commit 8292187 into ts-develop Mar 12, 2024
43 checks passed
GlugovGrGlib pushed a commit that referenced this pull request Mar 15, 2024
* feat: [AXIMST-584] create view for course navigation sidebar

* test: [AXIMST-584] add tests for CourseSidebarBlocksView
ruzniaievdm pushed a commit that referenced this pull request Mar 28, 2024
* feat: [AXIMST-584] create view for course navigation sidebar

* test: [AXIMST-584] add tests for CourseSidebarBlocksView
ruzniaievdm pushed a commit that referenced this pull request Apr 4, 2024
* feat: [AXIMST-584] create view for course navigation sidebar

* test: [AXIMST-584] add tests for CourseSidebarBlocksView
monteri pushed a commit that referenced this pull request Apr 10, 2024
* feat: [AXIMST-584] create view for course navigation sidebar

* test: [AXIMST-584] add tests for CourseSidebarBlocksView
GlugovGrGlib pushed a commit that referenced this pull request Apr 12, 2024
* feat: [AXIMST-584] create view for course navigation sidebar

* test: [AXIMST-584] add tests for CourseSidebarBlocksView
monteri pushed a commit that referenced this pull request Apr 17, 2024
* feat: [AXIMST-584] create view for course navigation sidebar

* test: [AXIMST-584] add tests for CourseSidebarBlocksView
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.

3 participants