Skip to content

[SE-4305] Reordering tabs not working in Koa - #337

Merged
Arti3DPlayer merged 3 commits into
esme-oxford-release/koa.2afrom
Arti3DPlayer/SE-4305
Apr 8, 2021
Merged

[SE-4305] Reordering tabs not working in Koa#337
Arti3DPlayer merged 3 commits into
esme-oxford-release/koa.2afrom
Arti3DPlayer/SE-4305

Conversation

@Arti3DPlayer

@Arti3DPlayer Arti3DPlayer commented Apr 2, 2021

Copy link
Copy Markdown

Description

In this PR I removed static tabs priority, to make this reordering function works correctly

While we had default priority attribute set for ProgressTab CoursewareTab

get_course_tab_list() returned incorrect order.

Issue is starting from this line where we get all dynamic tabs:

course_tab_list += _get_dynamic_tabs(course, user) we are getting correct order.
For example:
[[10, 'Course'], [inf, 'New Page'], [inf, 'Test'], [inf, 'Discussion'], [inf, 'Wiki'], [40, 'Progress'], [inf, 'Instructor']]

But after doing sorting next time(for correctly sort static tabs as wee see in comment here), we receive this:

[[10, 'Course'], [40, 'Progress'], [inf, 'New Page'], [inf, 'Test'], [inf, 'Discussion'], [inf, 'Wiki'], [inf, 'Instructor']]

Supporting information

Jira Issue: SE-4305

Testing instructions

  • Go to studio -> Select Demo Course
  • On navigation Panel select Content -> Pages (/tabs/course-v1:edX+DemoX+Demo_Course)
  • Create new pages and order them with default pages.
    More information here Reordering pages

Screenshot 2021-04-02 at 16 50 19

  • Now visit LMS Demo course (/courses/course-v1:edX+DemoX+Demo_Course/course/)
  • And check page order

Screenshot 2021-04-02 at 16 51 08

Deadline

ASAP

Other information

@Arti3DPlayer
Arti3DPlayer marked this pull request as ready for review April 2, 2021 14:13
Comment thread lms/djangoapps/courseware/tabs.py
Comment thread lms/djangoapps/courseware/tabs.py
@Arti3DPlayer
Arti3DPlayer requested a review from pkulkark April 7, 2021 09:46

@pkulkark pkulkark left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Arti3DPlayer LGTM 👍

  • I tested this: Verified the pages positions can be moved as described in testing instructions
  • I read through the code
  • I checked for accessibility N/A
  • Includes documentation N/A

@Arti3DPlayer
Arti3DPlayer merged commit c32bf1e into esme-oxford-release/koa.2a Apr 8, 2021
@Arti3DPlayer
Arti3DPlayer deleted the Arti3DPlayer/SE-4305 branch April 8, 2021 11:44
@Arti3DPlayer
Arti3DPlayer restored the Arti3DPlayer/SE-4305 branch April 12, 2021 09:36
@Arti3DPlayer
Arti3DPlayer deleted the Arti3DPlayer/SE-4305 branch April 12, 2021 09:38
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