Commit cbcb83bc by David Ormsbee

Merge pull request #235 from edx/ormsbee/add_more_event_info

Add more info to manually created scoring analytics event.
parents 8f4afcfc 52e0ff04
......@@ -9,6 +9,7 @@ need to then generate a matching migration for it using:
./manage.py schemamigration openassessment.workflow --auto
"""
from datetime import datetime
import logging
import importlib
......@@ -162,11 +163,21 @@ class AssessmentWorkflow(TimeStampedModel, StatusModel):
score["points_earned"],
score["points_possible"]
)
# This should be replaced by using the event tracking API, but
# that's not quite ready yet. So we're making this temp hack.
emit_event({
"context": {
"course_id": self.course_id
},
"event": {
"submission_uuid": self.submission_uuid,
"points_earned": score["points_earned"],
"points_possible": score["points_possible"],
},
"event_source": "server",
"event_type": "openassessment.workflow.score",
"submission_uuid": self.submission_uuid,
"points_earned": score["points_earned"],
"points_possible": score["points_possible"]
"time": datetime.utcnow(),
})
new_status = self.STATUS.done
......
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