Commit bc3a6d38 by Ernie Park

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

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