Commit 16e1ecf6 by Vik Paruchuri

fix some pylint violations

parent ed2c1cf0
...@@ -407,7 +407,7 @@ class CombinedOpenEndedModuleTest(unittest.TestCase): ...@@ -407,7 +407,7 @@ class CombinedOpenEndedModuleTest(unittest.TestCase):
self.assertTrue(changed) self.assertTrue(changed)
def test_get_max_score(self): def test_get_max_score(self):
changed = self.combinedoe.update_task_states() self.combinedoe.update_task_states()
self.combinedoe.state = "done" self.combinedoe.state = "done"
self.combinedoe.is_scored = True self.combinedoe.is_scored = True
max_score = self.combinedoe.max_score() max_score = self.combinedoe.max_score()
...@@ -611,11 +611,11 @@ class OpenEndedModuleXmlTest(unittest.TestCase, DummyModulestore): ...@@ -611,11 +611,11 @@ class OpenEndedModuleXmlTest(unittest.TestCase, DummyModulestore):
self.assertEqual(module.current_task_number, 1) self.assertEqual(module.current_task_number, 1)
#Get html and other data client will request #Get html and other data client will request
html = module.get_html() module.get_html()
legend = module.handle_ajax("get_legend", {}) legend = module.handle_ajax("get_legend", {})
self.assertTrue(isinstance(legend, basestring)) self.assertTrue(isinstance(legend, basestring))
status = module.handle_ajax("get_status", {}) module.handle_ajax("get_status", {})
module.handle_ajax("skip_post_assessment", {}) module.handle_ajax("skip_post_assessment", {})
self.assertTrue(isinstance(legend, basestring)) self.assertTrue(isinstance(legend, basestring))
......
...@@ -214,12 +214,11 @@ def get_module_for_descriptor(user, request, descriptor, model_data_cache, cours ...@@ -214,12 +214,11 @@ def get_module_for_descriptor(user, request, descriptor, model_data_cache, cours
#This is a hacky way to pass settings to the combined open ended xmodule #This is a hacky way to pass settings to the combined open ended xmodule
#It needs an S3 interface to upload images to S3 #It needs an S3 interface to upload images to S3
#It needs the open ended grading interface in order to get peer grading to be done #It needs the open ended grading interface in order to get peer grading to be done
#TODO: refactor these settings into module-specific settings when possible.
#this first checks to see if the descriptor is the correct one, and only sends settings if it is #this first checks to see if the descriptor is the correct one, and only sends settings if it is
#Get descriptor metadata fields indicating needs for various settings #Get descriptor metadata fields indicating needs for various settings
needs_open_ended_interface = hasattr(descriptor, "needs_open_ended_interface") and descriptor.needs_open_ended_interface needs_open_ended_interface = hasattr(descriptor, "needs_open_ended_interface") and descriptor.needs_open_ended_interface
needs_s3_interface = hasattr(descriptor, "needs_s3_interface") and descriptor.needs_s3_interface needs_s3_interface = hasattr(descriptor, "needs_s3_interface") and descriptor.needs_s3_interface
#Initialize interfaces to None #Initialize interfaces to None
open_ended_grading_interface = None open_ended_grading_interface = None
...@@ -232,9 +231,9 @@ def get_module_for_descriptor(user, request, descriptor, model_data_cache, cours ...@@ -232,9 +231,9 @@ def get_module_for_descriptor(user, request, descriptor, model_data_cache, cours
open_ended_grading_interface['mock_staff_grading'] = settings.MOCK_STAFF_GRADING open_ended_grading_interface['mock_staff_grading'] = settings.MOCK_STAFF_GRADING
if needs_s3_interface: if needs_s3_interface:
s3_interface = { s3_interface = {
'access_key' : getattr(settings,'AWS_ACCESS_KEY_ID',''), 'access_key' : getattr(settings,'AWS_ACCESS_KEY_ID', ''),
'secret_access_key' : getattr(settings,'AWS_SECRET_ACCESS_KEY',''), 'secret_access_key' : getattr(settings,'AWS_SECRET_ACCESS_KEY', ''),
'storage_bucket_name' : getattr(settings,'AWS_STORAGE_BUCKET_NAME','openended') 'storage_bucket_name' : getattr(settings,'AWS_STORAGE_BUCKET_NAME', 'openended')
} }
def inner_get_module(descriptor): def inner_get_module(descriptor):
......
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