Commit e4403815 by polesye Committed by Ned Batchelder

Fix LTI max_score method.

parent c7ac4100
......@@ -375,7 +375,7 @@ oauth_consumer_key="", oauth_signature="frVp4JuvT1mVXlxktiAUjQ7%2F1cw%3D"'}
return params
def max_score(self):
return self.weight
return self.weight if self.graded else 0
@XBlock.handler
......
......@@ -249,3 +249,13 @@ class LTIModuleTest(LogicTest):
def test_client_key_secret(self):
pass
def test_max_score(self):
self.xmodule.weight = 100.0
self.xmodule.graded = True
self.assertEqual(self.xmodule.max_score(), 100)
self.xmodule.graded = False
self.assertEqual(self.xmodule.max_score(), 0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment