fix bug introduced in fdf0d141844d where MODULE_TYPES defined after it was used

This commit is contained in:
Ernie Park
2012-01-09 20:38:09 -05:00
parent dc44eac627
commit bc3a6d38fd

View File

@@ -41,6 +41,10 @@ from django.contrib.auth.models import User
class StudentModule(models.Model):
# For a homework problem, contains a JSON
# object consisting of state
MODULE_TYPES = (('problem','problem'),
('video','video'),
('html','html'),
)
module_type = models.CharField(max_length=32, choices=MODULE_TYPES, default='problem')
module_id = models.CharField(max_length=255) # Filename for homeworks, etc.
student = models.ForeignKey(User)
@@ -50,10 +54,6 @@ class StudentModule(models.Model):
state = models.TextField(null=True, blank=True)
grade = models.FloatField(null=True, blank=True)
MODULE_TYPES = (('problem','problem'),
('video','video'),
('html','html'),
)
created = models.DateTimeField(auto_now_add=True)
modified = models.DateTimeField(auto_now=True)