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
af364166
Commit
af364166
authored
Feb 12, 2013
by
chrisndodge
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1491 from MITx/bug/dhm/misc
lms required grace period fields to be in specific order
parents
27e8d699
76d675ba
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
cms/djangoapps/models/settings/course_grading.py
+2
-1
cms/static/js/views/settings/main_settings_view.js
+1
-1
No files found.
cms/djangoapps/models/settings/course_grading.py
View file @
af364166
...
@@ -155,7 +155,8 @@ class CourseGradingModel(object):
...
@@ -155,7 +155,8 @@ class CourseGradingModel(object):
if
'grace_period'
in
graceperiodjson
:
if
'grace_period'
in
graceperiodjson
:
graceperiodjson
=
graceperiodjson
[
'grace_period'
]
graceperiodjson
=
graceperiodjson
[
'grace_period'
]
grace_rep
=
" "
.
join
([
"
%
s
%
s"
%
(
value
,
key
)
for
(
key
,
value
)
in
graceperiodjson
.
iteritems
()])
# lms requires these to be in a fixed order
grace_rep
=
"{0[hours]:d} hours {0[minutes]:d} minutes {0[seconds]:d} seconds"
.
format
(
graceperiodjson
)
descriptor
=
get_modulestore
(
course_location
)
.
get_item
(
course_location
)
descriptor
=
get_modulestore
(
course_location
)
.
get_item
(
course_location
)
descriptor
.
metadata
[
'graceperiod'
]
=
grace_rep
descriptor
.
metadata
[
'graceperiod'
]
=
grace_rep
...
...
cms/static/js/views/settings/main_settings_view.js
View file @
af364166
...
@@ -227,7 +227,7 @@ CMS.Views.Settings.Details = CMS.Views.ValidatingView.extend({
...
@@ -227,7 +227,7 @@ CMS.Views.Settings.Details = CMS.Views.ValidatingView.extend({
time
=
0
;
time
=
0
;
}
}
var
newVal
=
new
Date
(
date
.
getTime
()
+
time
*
1000
);
var
newVal
=
new
Date
(
date
.
getTime
()
+
time
*
1000
);
if
(
cacheModel
.
get
(
fieldName
).
getTime
()
!==
newVal
.
getTime
())
{
if
(
!
cacheModel
.
has
(
fieldName
)
||
cacheModel
.
get
(
fieldName
).
getTime
()
!==
newVal
.
getTime
())
{
cacheModel
.
save
(
fieldName
,
newVal
,
{
error
:
CMS
.
ServerError
});
cacheModel
.
save
(
fieldName
,
newVal
,
{
error
:
CMS
.
ServerError
});
}
}
}
}
...
...
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