From af871d92aa9165668ad920c8b54a8549fb56f652 Mon Sep 17 00:00:00 2001 From: kimth Date: Sun, 26 Aug 2012 21:15:34 +0000 Subject: [PATCH] Send ext grader the time of submission --- common/lib/capa/capa/responsetypes.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index fb7a69a2f2..580c4f979a 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -27,6 +27,7 @@ import xml.sax.saxutils as saxutils # specific library imports from calc import evaluator, UndefinedVariable from correctmap import CorrectMap +from datetime import datetime from util import * from lxml import etree from lxml.html.soupparser import fromstring as fromstring_bs # uses Beautiful Soup!!! FIXME? @@ -1141,8 +1142,11 @@ class CodeResponse(LoncapaResponse): contents = self.payload.copy() - # Anonymized student identifier to the external grader - student_info = {'anonymous_student_id': anonymous_student_id} + # Metadata related to the student submission revealed to the external grader + current_time = datetime.now() + student_info = {'anonymous_student_id': anonymous_student_id, + 'submission_time': str(current_time), + } contents.update({'student_info': json.dumps(student_info)}) # Submit request. When successful, 'msg' is the prior length of the queue