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
020e1e94
Commit
020e1e94
authored
Mar 04, 2013
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move side effecting of definition for grader to the course_module and
don't make caller responsible.
parent
de3a75d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
+4
-11
cms/djangoapps/models/settings/course_grading.py
+0
-2
common/lib/xmodule/xmodule/course_module.py
+4
-9
No files found.
cms/djangoapps/models/settings/course_grading.py
View file @
020e1e94
...
...
@@ -118,8 +118,6 @@ class CourseGradingModel(object):
descriptor
.
raw_grader
[
index
]
=
grader
else
:
descriptor
.
raw_grader
.
append
(
grader
)
# make definition notice the update
descriptor
.
raw_grader
=
descriptor
.
raw_grader
get_modulestore
(
course_location
)
.
update_item
(
course_location
,
descriptor
.
definition
[
'data'
])
...
...
common/lib/xmodule/xmodule/course_module.py
View file @
020e1e94
...
...
@@ -127,6 +127,7 @@ class CourseDescriptor(SequenceDescriptor):
# NOTE (THK): This is a last-minute addition for Fall 2012 launch to dynamically
# disable the syllabus content for courses that do not provide a syllabus
self
.
syllabus_present
=
self
.
system
.
resources_fs
.
exists
(
path
(
'syllabus'
))
self
.
_grading_policy
=
{}
self
.
set_grading_policy
(
self
.
definition
[
'data'
]
.
get
(
'grading_policy'
,
None
))
self
.
test_center_exams
=
[]
...
...
@@ -196,11 +197,9 @@ class CourseDescriptor(SequenceDescriptor):
grading_policy
.
update
(
course_policy
)
# Here is where we should parse any configurations, so that we can fail early
grading_policy
[
'RAW_GRADER'
]
=
grading_policy
[
'GRADER'
]
# used for cms access
grading_policy
[
'GRADER'
]
=
grader_from_conf
(
grading_policy
[
'GRADER'
])
self
.
_grading_policy
=
grading_policy
# Use setters so that side effecting to .definitions works
self
.
raw_grader
=
grading_policy
[
'GRADER'
]
# used for cms access
self
.
grade_cutoffs
=
grading_policy
[
'GRADE_CUTOFFS'
]
@classmethod
def
read_grading_policy
(
cls
,
paths
,
system
):
...
...
@@ -318,10 +317,6 @@ class CourseDescriptor(SequenceDescriptor):
self
.
metadata
[
'enrollment_end'
]
=
stringify_time
(
value
)
@property
def
grader
(
self
):
return
self
.
_grading_policy
[
'GRADER'
]
@property
def
raw_grader
(
self
):
return
self
.
_grading_policy
[
'RAW_GRADER'
]
...
...
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