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
7f8b7969
Commit
7f8b7969
authored
Dec 21, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Grade problems that have ungraded student modules
parent
48a1e091
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
lms/djangoapps/courseware/grades.py
+9
-8
No files found.
lms/djangoapps/courseware/grades.py
View file @
7f8b7969
...
...
@@ -345,27 +345,28 @@ def get_score(course_id, user, problem_descriptor, module_creator, student_modul
# These are not problems, and do not have a score
return
(
None
,
None
)
correct
=
0.0
instance_module
=
student_module_cache
.
lookup
(
course_id
,
problem_descriptor
.
category
,
problem_descriptor
.
location
.
url
())
if
instance_module
:
if
instance_module
.
max_grade
is
None
:
return
(
None
,
None
)
if
instance_module
is
not
None
and
instance_module
.
max_grade
is
not
None
:
correct
=
instance_module
.
grade
if
instance_module
.
grade
is
not
None
else
0
total
=
instance_module
.
max_grade
else
:
# If the problem was not in the cache, we need to instantiate the problem.
# If the problem was not in the cache, or hasn't been graded yet,
# we need to instantiate the problem.
# Otherwise, the max score (cached in instance_module) won't be available
problem
=
module_creator
(
problem_descriptor
)
if
problem
is
None
:
return
(
None
,
None
)
correct
=
0
correct
=
0
.0
total
=
problem
.
max_score
()
# Problem may be an error module (if something in the problem builder failed)
# In which case total might be None
if
total
is
None
:
return
(
None
,
None
)
#Now we re-weight the problem, if specified
weight
=
getattr
(
problem_descriptor
,
'weight'
,
None
)
if
weight
is
not
None
:
...
...
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