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
48cbf38a
Commit
48cbf38a
authored
Jan 17, 2013
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolve merge conflicts
parent
22695d80
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
22 deletions
+16
-22
common/lib/xmodule/setup.py
+2
-2
common/lib/xmodule/xmodule/course_module.py
+14
-20
No files found.
common/lib/xmodule/setup.py
View file @
48cbf38a
...
...
@@ -39,8 +39,8 @@ setup(
"course_info = xmodule.html_module:CourseInfoDescriptor"
,
"static_tab = xmodule.html_module:StaticTabDescriptor"
,
"custom_tag_template = xmodule.raw_module:RawDescriptor"
,
"about = xmodule.html_module:AboutDescriptor"
"graphical_slider_tool = xmodule.gst_module:GraphicalSliderToolDescriptor"
,
"about = xmodule.html_module:AboutDescriptor"
,
"graphical_slider_tool = xmodule.gst_module:GraphicalSliderToolDescriptor"
]
}
)
common/lib/xmodule/xmodule/course_module.py
View file @
48cbf38a
...
...
@@ -128,6 +128,20 @@ class CourseDescriptor(SequenceDescriptor):
self
.
syllabus_present
=
self
.
system
.
resources_fs
.
exists
(
path
(
'syllabus'
))
self
.
set_grading_policy
(
self
.
definition
[
'data'
]
.
get
(
'grading_policy'
,
None
))
self
.
test_center_exams
=
[]
test_center_info
=
self
.
metadata
.
get
(
'testcenter_info'
)
if
test_center_info
is
not
None
:
for
exam_name
in
test_center_info
:
try
:
exam_info
=
test_center_info
[
exam_name
]
self
.
test_center_exams
.
append
(
self
.
TestCenterExam
(
self
.
id
,
exam_name
,
exam_info
))
except
Exception
as
err
:
# If we can't parse the test center exam info, don't break
# the rest of the courseware.
msg
=
'Error
%
s: Unable to load test-center exam info for exam "
%
s" of course "
%
s"'
%
(
err
,
exam_name
,
self
.
id
)
log
.
error
(
msg
)
continue
def
defaut_grading_policy
(
self
):
"""
Return a dict which is a copy of the default grading policy
...
...
@@ -228,26 +242,6 @@ class CourseDescriptor(SequenceDescriptor):
if
policy_dir
:
paths
=
[
policy_dir
+
'/grading_policy.json'
]
+
paths
<<<<<<<
HEAD
=======
self
.
test_center_exams
=
[]
test_center_info
=
self
.
metadata
.
get
(
'testcenter_info'
)
if
test_center_info
is
not
None
:
for
exam_name
in
test_center_info
:
try
:
exam_info
=
test_center_info
[
exam_name
]
self
.
test_center_exams
.
append
(
self
.
TestCenterExam
(
self
.
id
,
exam_name
,
exam_info
))
except
Exception
as
err
:
# If we can't parse the test center exam info, don't break
# the rest of the courseware.
msg
=
'Error
%
s: Unable to load test-center exam info for exam "
%
s" of course "
%
s"'
%
(
err
,
exam_name
,
self
.
id
)
log
.
error
(
msg
)
continue
def
set_grading_policy
(
self
,
policy_str
):
"""Parse the policy specified in policy_str, and save it"""
>>>>>>>
master
try
:
policy
=
json
.
loads
(
cls
.
read_grading_policy
(
paths
,
system
))
except
ValueError
:
...
...
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