Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion common/lib/xmodule/xmodule/capa_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,8 @@ def publish_grade(self):
'max_value': score['total'],
})

return {'grade': score['score'], 'max_grade': score['total']}

def check_problem(self, data):
"""
Checks whether answers to a problem are correct
Expand Down Expand Up @@ -951,7 +953,7 @@ def check_problem(self, data):
return {'success': msg}
raise

self.publish_grade()
published_grade = self.publish_grade()

# success = correct if ALL questions in this problem are correct
success = 'correct'
Expand All @@ -961,6 +963,8 @@ def check_problem(self, data):

# NOTE: We are logging both full grading and queued-grading submissions. In the latter,
# '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['success'] = success
event_info['attempts'] = self.attempts
Expand Down
16 changes: 10 additions & 6 deletions docs/data/source/internal_data_formats/tracking_logs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Tracking Logs
===============

The following is an inventory of all LMS event types.
The following is an inventory of all LMS event types.

This inventory is comprised of a table of Common Fields that appear in all events, a table of Student Event Types which lists all interaction with the LMS outside of the Instructor Dashboard,
This inventory is comprised of a table of Common Fields that appear in all events, a table of Student Event Types which lists all interaction with the LMS outside of the Instructor Dashboard,
and a table of Instructor Event Types of all interaction with the Instructor Dashboard in the LMS.

Common Fields
Expand Down Expand Up @@ -38,16 +38,16 @@ This section contains a table of fields common to all events.
| | string is empty for anonymous events (i.e., user not logged | | |
| | in). | | |
+---------------------------+-------------------------------------------------------------+-------------+------------------------------------+


Event Types
===========

There are two tables of event types -- one for student events, and one for instructor events.
Table columns describe what each event type represents, which component it originates from, what scripting language was used to fire the event, and what ``event`` fields are associated with it.
The ``event_source`` field from the "Common Fields" table above distinguishes between events that originated in the browser (in javascript) and events that originated on the server (during the processing of a request).
The ``event_source`` field from the "Common Fields" table above distinguishes between events that originated in the browser (in javascript) and events that originated on the server (during the processing of a request).

Event types with several different historical names are enumerated by forward slashes.
Event types with several different historical names are enumerated by forward slashes.
Rows identical after the second column have been combined, with the corresponding event types enumerated by commas.


Expand Down Expand Up @@ -162,6 +162,10 @@ The Student Event Type table lists the event types logged for interaction with t
| | | | +---------------------+---------------+---------------------------------------------------------------------+
| | | | | ``attempts`` | integer | |
| | | | +---------------------+---------------+---------------------------------------------------------------------+
| | | | | ``grade`` | integer | Current grade value |
| | | | +---------------------+---------------+---------------------------------------------------------------------+
| | | | | ``max_grade`` | integer | Maximum possible grade value |
| | | | +---------------------+---------------+---------------------------------------------------------------------+
| | | | | ``correct_map`` | string / JSON | **See the table in** |
| | | | | | | **Addendum:** ``correct_map`` **Fields and Values below** |
+-----------------------------------+-------------------------------+---------------------+-----------------+---------------------+---------------+---------------------------------------------------------------------+
Expand Down Expand Up @@ -241,7 +245,7 @@ Table of ``correct_map`` field types and values for the ``problem_check`` studen
| | | string dump of a DateTime object of the form | |
| | | `'%Y%m%d%H%M%S'`. | |
+--------------------------------------------------+--------------------------------------------------+--------------------------------------------------+--------------------------------------------------+


Instructor Event Types
----------------------
Expand Down