Assigning users to submissions
[edumed.git] / wtem / models.py
index bef8b7c..8e9d505 100644 (file)
@@ -1,14 +1,19 @@
 import random
 import string
+import os
 
 from django.db import models
 from django.contrib.auth.models import User
 from django.core.exceptions import ValidationError
+from django.utils import simplejson
 from django.utils.translation import ugettext as _
 from jsonfield import JSONField
 
 from contact.models import Contact
 
+f = file(os.path.dirname(__file__) + '/fixtures/exercises.json')
+exercises = simplejson.loads(f.read())
+f.close()
 
 DEBUG_KEY = '12345'
 
@@ -21,6 +26,7 @@ class Submission(models.Model):
     answers = models.CharField(max_length = 65536, null = True, blank = True)
     key_sent = models.BooleanField(default = False)
     marks = JSONField()
+    examiners = models.ManyToManyField(User, null = True, blank = True)
 
     def __unicode__(self):
         return ', '.join((self.last_name, self.first_name, self.email))