Commit 7749bbbe by Carlos Andrés Rocha

Add module grade to problem_check tracking log event

parent c484dc6c
...@@ -884,6 +884,8 @@ class CapaModule(CapaFields, XModule): ...@@ -884,6 +884,8 @@ class CapaModule(CapaFields, XModule):
'max_value': score['total'], 'max_value': score['total'],
}) })
return {'grade': score['score'], 'max_grade': score['total']}
def check_problem(self, data): def check_problem(self, data):
""" """
Checks whether answers to a problem are correct Checks whether answers to a problem are correct
...@@ -951,7 +953,7 @@ class CapaModule(CapaFields, XModule): ...@@ -951,7 +953,7 @@ class CapaModule(CapaFields, XModule):
return {'success': msg} return {'success': msg}
raise raise
self.publish_grade() published_grade = self.publish_grade()
# success = correct if ALL questions in this problem are correct # success = correct if ALL questions in this problem are correct
success = 'correct' success = 'correct'
...@@ -961,6 +963,8 @@ class CapaModule(CapaFields, XModule): ...@@ -961,6 +963,8 @@ class CapaModule(CapaFields, XModule):
# NOTE: We are logging both full grading and queued-grading submissions. In the latter, # NOTE: We are logging both full grading and queued-grading submissions. In the latter,
# 'success' will always be incorrect # 'success' will always be incorrect
event_info['grade'] = published_grade['grade']
event_info['max_grade'] = published_grade['max_grade']
event_info['correct_map'] = correct_map.get_dict() event_info['correct_map'] = correct_map.get_dict()
event_info['success'] = success event_info['success'] = success
event_info['attempts'] = self.attempts event_info['attempts'] = self.attempts
......
...@@ -162,6 +162,10 @@ The Student Event Type table lists the event types logged for interaction with t ...@@ -162,6 +162,10 @@ The Student Event Type table lists the event types logged for interaction with t
| | | | +---------------------+---------------+---------------------------------------------------------------------+ | | | | +---------------------+---------------+---------------------------------------------------------------------+
| | | | | ``attempts`` | integer | | | | | | | ``attempts`` | integer | |
| | | | +---------------------+---------------+---------------------------------------------------------------------+ | | | | +---------------------+---------------+---------------------------------------------------------------------+
| | | | | ``grade`` | integer | Current grade value |
| | | | +---------------------+---------------+---------------------------------------------------------------------+
| | | | | ``max_grade`` | integer | Maximum possible grade value |
| | | | +---------------------+---------------+---------------------------------------------------------------------+
| | | | | ``correct_map`` | string / JSON | **See the table in** | | | | | | ``correct_map`` | string / JSON | **See the table in** |
| | | | | | | **Addendum:** ``correct_map`` **Fields and Values below** | | | | | | | | **Addendum:** ``correct_map`` **Fields and Values below** |
+-----------------------------------+-------------------------------+---------------------+-----------------+---------------------+---------------+---------------------------------------------------------------------+ +-----------------------------------+-------------------------------+---------------------+-----------------+---------------------+---------------+---------------------------------------------------------------------+
......
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