diff options
author | prathamesh | 2018-01-02 16:46:52 +0530 |
---|---|---|
committer | prathamesh | 2018-01-02 16:46:52 +0530 |
commit | e14514e01052fb36cd9f14675cbe7ca940945a34 (patch) | |
tree | 994f3d5dd6d8c4f3614d3b1a655c91caa7426dcf /yaksh/models.py | |
parent | 7fe8e17438b8e67e7290f11ddcd29cda3953921b (diff) | |
download | online_test-e14514e01052fb36cd9f14675cbe7ca940945a34.tar.gz online_test-e14514e01052fb36cd9f14675cbe7ca940945a34.tar.bz2 online_test-e14514e01052fb36cd9f14675cbe7ca940945a34.zip |
Allowed user to skip and view solution if the answer is correct.
Added solution attribute to the Question model.
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index 839043f..aa65ad9 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -751,6 +751,8 @@ class Question(models.Model): min_time = models.IntegerField("time in minutes", default=0) + solution = models.TextField(blank=True) + def consolidate_answer_data(self, user_answer, user=None): question_data = {} metadata = {} |