Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
d90a1392
Commit
d90a1392
authored
4 years ago
by
Calen Pennington
Browse files
Options
Downloads
Patches
Plain Diff
Only add PLS dates to graded sections that have scored, non-ORA content.
parent
1d7ff32a
No related branches found
Branches containing commit
Tags
release-2021-06-30-06.16
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openedx/core/djangoapps/course_date_signals/handlers.py
+13
-1
13 additions, 1 deletion
openedx/core/djangoapps/course_date_signals/handlers.py
with
13 additions
and
1 deletion
openedx/core/djangoapps/course_date_signals/handlers.py
+
13
−
1
View file @
d90a1392
...
...
@@ -53,13 +53,25 @@ def extract_dates_from_course(course):
# unless that item already has a relative date set
for
_
,
section
,
weeks_to_complete
in
spaced_out_sections
(
course
):
items
=
[
section
]
has_non_ora_scored_content
=
False
section_date_items
=
[]
while
items
:
next_item
=
items
.
pop
()
# TODO: This is pretty gross, and should maybe be configurable in the future,
# especially if we find ourselves needing more exceptions.
if
next_item
.
graded
:
# TODO: Once studio can manually set relative dates,
# we would need to manually check for them here
date_items
.
append
((
next_item
.
location
,
{
'
due
'
:
weeks_to_complete
}))
section_date_items
.
append
((
next_item
.
location
,
{
'
due
'
:
weeks_to_complete
}))
has_non_ora_scored_content
=
(
has_non_ora_scored_content
or
(
next_item
.
has_score
and
next_item
.
category
!=
'
openassessment
'
)
)
items
.
extend
(
next_item
.
get_children
())
if
has_non_ora_scored_content
:
date_items
.
extend
(
section_date_items
)
else
:
date_items
=
[]
store
=
modulestore
()
...
...
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