Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
71a38cf4
Unverified
Commit
71a38cf4
authored
4 years ago
by
David Ormsbee
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Revert "AA-158: Fix date ordering for multiple events on the same date"
parent
6281b0a9
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lms/djangoapps/courseware/courses.py
+8
-12
8 additions, 12 deletions
lms/djangoapps/courseware/courses.py
with
8 additions
and
12 deletions
lms/djangoapps/courseware/courses.py
+
8
−
12
View file @
71a38cf4
...
...
@@ -461,17 +461,7 @@ def get_course_date_blocks(course, user, request=None, include_access=False,
Return the list of blocks to display on the course info page,
sorted by date.
"""
blocks
=
[]
if
RELATIVE_DATES_FLAG
.
is_enabled
(
course
.
id
):
blocks
.
append
(
CourseExpiredDate
(
course
,
user
))
blocks
.
extend
(
get_course_assignment_date_blocks
(
course
,
user
,
request
,
num_return
=
num_assignments
,
include_access
=
include_access
,
include_past_dates
=
include_past_dates
,
))
# Adding these in after the assignment blocks so in the case multiple blocks have the same date,
# these blocks will be sorted to come after the assignments. See https://openedx.atlassian.net/browse/AA-158
default_block_classes
=
[
block_classes
=
[
CourseEndDate
,
CourseStartDate
,
TodaysDate
,
...
...
@@ -481,7 +471,13 @@ def get_course_date_blocks(course, user, request=None, include_access=False,
if
not
course
.
self_paced
and
certs_api
.
get_active_web_certificate
(
course
):
block_classes
.
insert
(
0
,
CertificateAvailableDate
)
blocks
.
extend
([
cls
(
course
,
user
)
for
cls
in
default_block_classes
])
blocks
=
[
cls
(
course
,
user
)
for
cls
in
block_classes
]
if
RELATIVE_DATES_FLAG
.
is_enabled
(
course
.
id
):
blocks
.
append
(
CourseExpiredDate
(
course
,
user
))
blocks
.
extend
(
get_course_assignment_date_blocks
(
course
,
user
,
request
,
num_return
=
num_assignments
,
include_access
=
include_access
,
include_past_dates
=
include_past_dates
,
))
return
sorted
((
b
for
b
in
blocks
if
b
.
date
and
(
b
.
is_enabled
or
include_past_dates
)),
key
=
date_block_key_fn
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment