Browse Source

Fix Grade model when grade is None and add Back link on lab page

raylu 14 years ago
parent
commit
a9d64c77d9
2 changed files with 3 additions and 1 deletions
  1. 1 1
      pyc/grader/models.py
  2. 2 0
      pyc/templates/lab.html

+ 1 - 1
pyc/grader/models.py

@@ -19,4 +19,4 @@ class Submission(models.Model):
 	class Meta:
 		unique_together = (('lab', 'user'),)
 	def __unicode__(self):
-		return "%d, %s, %d" % (self.lab.id, self.user, self.grade)
+		return "%d, %s, %s" % (self.lab.id, self.user, self.grade)

+ 2 - 0
pyc/templates/lab.html

@@ -25,5 +25,7 @@ Users' highest scores and earliest time with that score are displayed.
 
 <p>
 <a href="/submit/{{ lab.id }}/">Submit</a> your solution
+<br>
+<a href="/">Back</a> to the homepage
 </p>
 {% endblock %}