Commit 789db301 by Diana Huang

Merge pull request #1520 from MITx/feature/vik/disable-spell-check

Feature/vik/disable spell check
parents 4673c739 c48998b3
......@@ -44,6 +44,10 @@ HUMAN_TASK_TYPE = {
'openended' : "edX Assessment",
}
#Default value that controls whether or not to skip basic spelling checks in the controller
#Metadata overrides this
SKIP_BASIC_CHECKS = False
class CombinedOpenEndedV1Module():
"""
This is a module that encapsulates all open ended grading (self assessment, peer assessment, etc).
......@@ -142,6 +146,7 @@ class CombinedOpenEndedV1Module():
self.max_attempts = int(self.metadata.get('attempts', MAX_ATTEMPTS))
self.is_scored = self.metadata.get('is_graded', IS_SCORED) in TRUE_DICT
self.accept_file_upload = self.metadata.get('accept_file_upload', ACCEPT_FILE_UPLOAD) in TRUE_DICT
self.skip_basic_checks = self.metadata.get('skip_spelling_checks', SKIP_BASIC_CHECKS)
display_due_date_string = self.metadata.get('due', None)
grace_period_string = self.metadata.get('graceperiod', None)
......@@ -170,6 +175,7 @@ class CombinedOpenEndedV1Module():
'accept_file_upload': self.accept_file_upload,
'close_date' : self.timeinfo.close_date,
's3_interface' : self.system.s3_interface,
'skip_basic_checks' : self.skip_basic_checks,
}
self.task_xml = definition['task_xml']
......
......@@ -110,7 +110,8 @@ class OpenEndedModule(openendedchild.OpenEndedChild):
'rubric': rubric_string,
'initial_display': self.initial_display,
'answer': self.answer,
'problem_id': self.display_name
'problem_id': self.display_name,
'skip_basic_checks': self.skip_basic_checks,
})
updated_grader_payload = json.dumps(parsed_grader_payload)
......
......@@ -99,6 +99,7 @@ class OpenEndedChild(object):
self.accept_file_upload = static_data['accept_file_upload']
self.close_date = static_data['close_date']
self.s3_interface = static_data['s3_interface']
self.skip_basic_checks = static_data['skip_basic_checks']
# Used for progress / grading. Currently get credit just for
# completion (doesn't matter if you self-assessed correct/incorrect).
......
......@@ -48,6 +48,7 @@ class OpenEndedChildTest(unittest.TestCase):
'close_date': None,
's3_interface' : "",
'open_ended_grading_interface' : {},
'skip_basic_checks' : False,
}
definition = Mock()
descriptor = Mock()
......@@ -167,6 +168,7 @@ class OpenEndedModuleTest(unittest.TestCase):
'close_date': None,
's3_interface' : test_util_open_ended.S3_INTERFACE,
'open_ended_grading_interface' : test_util_open_ended.OPEN_ENDED_GRADING_INTERFACE,
'skip_basic_checks' : False,
}
oeparam = etree.XML('''
......@@ -301,6 +303,7 @@ class CombinedOpenEndedModuleTest(unittest.TestCase):
'close_date' : "",
's3_interface' : test_util_open_ended.S3_INTERFACE,
'open_ended_grading_interface' : test_util_open_ended.OPEN_ENDED_GRADING_INTERFACE,
'skip_basic_checks' : False,
}
oeparam = etree.XML('''
......
......@@ -51,6 +51,7 @@ class SelfAssessmentTest(unittest.TestCase):
'close_date': None,
's3_interface' : test_util_open_ended.S3_INTERFACE,
'open_ended_grading_interface' : test_util_open_ended.OPEN_ENDED_GRADING_INTERFACE,
'skip_basic_checks' : False,
}
self.module = SelfAssessmentModule(test_system, self.location,
......
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