diff options
author | ankitjavalkar | 2017-01-23 16:15:33 +0530 |
---|---|---|
committer | ankitjavalkar | 2017-01-23 16:15:33 +0530 |
commit | 2670ef89672777bcfda9e8e97e8a976d53dd1a1f (patch) | |
tree | 462a107fdd7a0029b2835f978b6e1efae598787f /yaksh | |
parent | 8009453578839f811b4d353dd61ff8d4ce5b68c4 (diff) | |
download | online_test-2670ef89672777bcfda9e8e97e8a976d53dd1a1f.tar.gz online_test-2670ef89672777bcfda9e8e97e8a976d53dd1a1f.tar.bz2 online_test-2670ef89672777bcfda9e8e97e8a976d53dd1a1f.zip |
Minor fixes to instruction field rendering
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/models.py | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/quizzes_user.html | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index 805bf25..5800ebd 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -146,7 +146,7 @@ class Course(models.Model): created_on = models.DateTimeField(auto_now_add=True) teachers = models.ManyToManyField(User, related_name='teachers') is_trial = models.BooleanField(default=False) - instructions = models.TextField(null=True, blank=True) + instructions = models.TextField(default=None, null=True, blank=True) objects = CourseManager() def request(self, *users): diff --git a/yaksh/templates/yaksh/quizzes_user.html b/yaksh/templates/yaksh/quizzes_user.html index 46d6663..63f22a1 100644 --- a/yaksh/templates/yaksh/quizzes_user.html +++ b/yaksh/templates/yaksh/quizzes_user.html @@ -61,6 +61,7 @@ {% endif %} </div> + {% if course.instructions %} <div class="row"> <div class="panel-group"> <div class="panel panel-default"> @@ -70,11 +71,12 @@ </h4> </div> <div id="collapse{{ forloop.counter }}" class="panel-collapse collapse"> - <div class="panel-body"> {{ course.instructions }}</div> + <div class="panel-body"> {{ course.instructions|safe }}</div> </div> </div> </div> </div> + {% endif %} </div> </div><!--/row--> </br> |