Added has_score attribute to xmodule, for problem-like xmodules.

This commit is contained in:
Bridger Maxwell
2012-08-07 15:20:47 -04:00
parent 98d4d44e45
commit a9d67c3e8d
4 changed files with 10 additions and 6 deletions

View File

@@ -183,8 +183,8 @@ def get_score(user, problem, student_module_cache):
problem: an XModule
cache: A StudentModuleCache
"""
if not problem.descriptor.stores_state:
# These are not problems, and do not store state
if not problem.descriptor.stores_state or not problem.descriptor.has_score:
# These are not problems, and do not have a score
return (None, None)
correct = 0.0