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
e4bcfa5c
Commit
e4bcfa5c
authored
Aug 08, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix indents and copy behavior
parent
687ab3dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
common/lib/xmodule/xmodule/combined_open_ended_module.py
+2
-4
common/lib/xmodule/xmodule/peer_grading_module.py
+4
-5
lms/djangoapps/courseware/model_data.py
+2
-1
No files found.
common/lib/xmodule/xmodule/combined_open_ended_module.py
View file @
e4bcfa5c
...
@@ -8,7 +8,7 @@ from .x_module import XModule
...
@@ -8,7 +8,7 @@ from .x_module import XModule
from
xblock.core
import
Integer
,
Scope
,
String
,
List
,
Float
,
Boolean
from
xblock.core
import
Integer
,
Scope
,
String
,
List
,
Float
,
Boolean
from
xmodule.open_ended_grading_classes.combined_open_ended_modulev1
import
CombinedOpenEndedV1Module
,
CombinedOpenEndedV1Descriptor
from
xmodule.open_ended_grading_classes.combined_open_ended_modulev1
import
CombinedOpenEndedV1Module
,
CombinedOpenEndedV1Descriptor
from
collections
import
namedtuple
from
collections
import
namedtuple
from
.fields
import
Date
from
.fields
import
Date
,
Timedelta
import
textwrap
import
textwrap
log
=
logging
.
getLogger
(
"mitx.courseware"
)
log
=
logging
.
getLogger
(
"mitx.courseware"
)
...
@@ -226,12 +226,10 @@ class CombinedOpenEndedFields(object):
...
@@ -226,12 +226,10 @@ class CombinedOpenEndedFields(object):
)
)
due
=
Date
(
due
=
Date
(
help
=
"Date that this problem is due by"
,
help
=
"Date that this problem is due by"
,
default
=
None
,
scope
=
Scope
.
settings
scope
=
Scope
.
settings
)
)
graceperiod
=
String
(
graceperiod
=
Timedelta
(
help
=
"Amount of time after the due date that submissions will be accepted"
,
help
=
"Amount of time after the due date that submissions will be accepted"
,
default
=
None
,
scope
=
Scope
.
settings
scope
=
Scope
.
settings
)
)
version
=
VersionInteger
(
help
=
"Current version number"
,
default
=
DEFAULT_VERSION
,
scope
=
Scope
.
settings
)
version
=
VersionInteger
(
help
=
"Current version number"
,
default
=
DEFAULT_VERSION
,
scope
=
Scope
.
settings
)
...
...
common/lib/xmodule/xmodule/peer_grading_module.py
View file @
e4bcfa5c
...
@@ -46,7 +46,6 @@ class PeerGradingFields(object):
...
@@ -46,7 +46,6 @@ class PeerGradingFields(object):
)
)
due
=
Date
(
due
=
Date
(
help
=
"Due date that should be displayed."
,
help
=
"Due date that should be displayed."
,
default
=
None
,
scope
=
Scope
.
settings
)
scope
=
Scope
.
settings
)
graceperiod
=
Timedelta
(
graceperiod
=
Timedelta
(
help
=
"Amount of grace to give on the due date."
,
help
=
"Amount of grace to give on the due date."
,
...
@@ -525,10 +524,10 @@ class PeerGradingModule(PeerGradingFields, XModule):
...
@@ -525,10 +524,10 @@ class PeerGradingModule(PeerGradingFields, XModule):
good_problem_list
=
[]
good_problem_list
=
[]
for
problem
in
problem_list
:
for
problem
in
problem_list
:
problem_location
=
problem
[
'location'
]
problem_location
=
problem
[
'location'
]
try
:
try
:
descriptor
=
_find_corresponding_module_for_location
(
problem_location
)
descriptor
=
_find_corresponding_module_for_location
(
problem_location
)
except
:
except
:
continue
continue
if
descriptor
:
if
descriptor
:
problem
[
'due'
]
=
descriptor
.
lms
.
due
problem
[
'due'
]
=
descriptor
.
lms
.
due
grace_period
=
descriptor
.
lms
.
graceperiod
grace_period
=
descriptor
.
lms
.
graceperiod
...
...
lms/djangoapps/courseware/model_data.py
View file @
e4bcfa5c
...
@@ -353,7 +353,8 @@ class LmsKeyValueStore(KeyValueStore):
...
@@ -353,7 +353,8 @@ class LmsKeyValueStore(KeyValueStore):
for
field
in
kv_dict
:
for
field
in
kv_dict
:
# Check field for validity
# Check field for validity
if
field
.
field_name
in
self
.
_descriptor_model_data
:
if
field
.
field_name
in
self
.
_descriptor_model_data
:
raise
InvalidWriteError
(
"Not allowed to overwrite descriptor model data"
,
field
.
field_name
)
if
field
.
field_name
not
in
[
"due"
,
"graceperiod"
]:
raise
InvalidWriteError
(
"Not allowed to overwrite descriptor model data"
,
field
.
field_name
)
if
field
.
scope
not
in
self
.
_allowed_scopes
:
if
field
.
scope
not
in
self
.
_allowed_scopes
:
raise
InvalidScopeError
(
field
.
scope
)
raise
InvalidScopeError
(
field
.
scope
)
...
...
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