summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaheshgudi2016-08-09 18:13:22 +0530
committermaheshgudi2016-08-29 14:07:07 +0530
commit80e3a68ddfcc15fc88442d7af53d804653c4d2a4 (patch)
treea0ae4c9f445ed041bfdf73f4184503a43762ca7d
parentd9f6a93ea8d4ddf9f139649567bd680e3f101556 (diff)
downloadonline_test-80e3a68ddfcc15fc88442d7af53d804653c4d2a4.tar.gz
online_test-80e3a68ddfcc15fc88442d7af53d804653c4d2a4.tar.bz2
online_test-80e3a68ddfcc15fc88442d7af53d804653c4d2a4.zip
added Course and question paper classes in admin.py
-rw-r--r--yaksh/admin.py4
-rw-r--r--yaksh/models.py4
2 files changed, 7 insertions, 1 deletions
diff --git a/yaksh/admin.py b/yaksh/admin.py
index 2ce3ac4..b25c0af 100644
--- a/yaksh/admin.py
+++ b/yaksh/admin.py
@@ -1,10 +1,14 @@
from yaksh.models import Question, Quiz
from yaksh.models import TestCase, StandardTestCase, StdoutBasedTestCase, Course
+from yaksh.models import Question, Quiz, Course, QuestionPaper
+from yaksh.models import TestCase, StandardTestCase, StdoutBasedTestCase
from django.contrib import admin
admin.site.register(Question)
admin.site.register(TestCase)
admin.site.register(StandardTestCase)
admin.site.register(StdoutBasedTestCase)
+admin.site.register(Course)
admin.site.register(Quiz)
admin.site.register(Course)
+admin.site.register(QuestionPaper)
diff --git a/yaksh/models.py b/yaksh/models.py
index 73d4b27..898662c 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -570,7 +570,9 @@ class QuestionPaper(models.Model):
if self.quiz.has_prerequisite():
prerequisite = self._get_prequisite_paper()
return prerequisite._is_questionpaper_passed(user)
-
+
+ def __unicode__(self):
+ return "Question Paper for " + self.quiz.description
###############################################################################
class QuestionSet(models.Model):