Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
3ab87791
Commit
3ab87791
authored
Aug 16, 2014
by
Braden MacDonald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: API allowed an individual due date extension on units with no due date
parent
a08ab9ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
lms/djangoapps/instructor/views/tools.py
+3
-1
No files found.
lms/djangoapps/instructor/views/tools.py
View file @
3ab87791
...
...
@@ -161,13 +161,15 @@ def title_or_url(node):
def
set_due_date_extension
(
course
,
unit
,
student
,
due_date
):
"""
Sets a due date extension. Raises DashboardError if the extended
Sets a due date extension. Raises DashboardError if the
unit or
extended
due date is invalid.
"""
if
due_date
:
# Check that the new due date is valid:
original_due_date
=
getattr
(
unit
,
'due'
,
None
)
if
not
original_due_date
:
raise
DashboardError
(
_
(
"Unit {0} has no due date to extend."
)
.
format
(
unit
.
location
))
if
due_date
<
original_due_date
:
raise
DashboardError
(
_
(
"An extended due date must be later than the original due date."
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment