summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
authorCruiseDevice2019-02-14 16:39:02 +0530
committerCruiseDevice2019-02-14 16:39:02 +0530
commit2d40cc641cb0b8c61f283e00ed6e59faa0b84410 (patch)
tree942dc12be6417c1babffeb20cec6c09e4eb76162 /yaksh
parent07a8d5ec2660bd0e675a5c6f8460837b53826d21 (diff)
downloadonline_test-2d40cc641cb0b8c61f283e00ed6e59faa0b84410.tar.gz
online_test-2d40cc641cb0b8c61f283e00ed6e59faa0b84410.tar.bz2
online_test-2d40cc641cb0b8c61f283e00ed6e59faa0b84410.zip
Show link only to the creator of the question in Design Question Paper
Diffstat (limited to 'yaksh')
-rw-r--r--yaksh/templates/yaksh/design_questionpaper.html33
1 files changed, 29 insertions, 4 deletions
diff --git a/yaksh/templates/yaksh/design_questionpaper.html b/yaksh/templates/yaksh/design_questionpaper.html
index 449c12d..d4f7baf 100644
--- a/yaksh/templates/yaksh/design_questionpaper.html
+++ b/yaksh/templates/yaksh/design_questionpaper.html
@@ -113,7 +113,14 @@ select
<li>
<label>
<input type="checkbox" name="questions" data-qid="{{question.id}}" value={{question.id}}>
- <span><a href="{{URL_ROOT}}/exam/manage/addquestion/{{ question.id }}">{{ question.summary }}</a></span> <span> {{ question.points }} </span>
+ <span>
+ {% if user == question.user %}
+ <a href="{{URL_ROOT}}/exam/manage/addquestion/{{ question.id }}">{{ question.summary }}</a>
+ {% else %}
+ {{question.summary}}
+ {% endif %}
+ </span>
+ <span> {{ question.points }}</span>
</label>
</li>
{% endfor %}
@@ -134,7 +141,13 @@ select
<label>
<input type="checkbox" name="added-questions"
data-qid="{{question.id}}" value={{question.id}}>
- <span> <a href="{{URL_ROOT}}/exam/manage/addquestion/{{ question.id }}">{{ question.summary }}</a></span>
+ <span>
+ {% if user == question.user %}
+ <a href="{{URL_ROOT}}/exam/manage/addquestion/{{ question.id }}">{{ question.summary }}</a>
+ {% else %}
+ {{question.summary}}
+ {% endif %}
+ </span>
<span> {{ question.points }} </span>
</label>
</li>
@@ -175,7 +188,13 @@ select
<li>
<label>
<input type="checkbox" name="random_questions" data-qid="{{question.id}}" value={{question.id}}>
- <span> <a href="{{URL_ROOT}}/exam/manage/addquestion/{{ question.id }}">{{ question.summary }}</a></span> <span> {{ question.points }} </span>
+ <span>
+ {% if user == question.user %}
+ <a href="{{URL_ROOT}}/exam/manage/addquestion/{{ question.id }}">{{ question.summary }}</a>
+ {% else %}
+ {{question.summary}}
+ {% endif %}</span>
+ <span> {{ question.points }} </span>
</label>
</li>
{% endfor %}
@@ -201,7 +220,13 @@ select
{% for question in random_set.questions.all %}
<li>
<label>
- <span> <a href="{{URL_ROOT}}/exam/manage/addquestion/{{ question.id }}">{{ question.summary }}</a></span> <span> {{ question.points }} </span>
+ <span>
+ {% if user == question.user %}
+ <a href="{{URL_ROOT}}/exam/manage/addquestion/{{ question.id }}">{{ question.summary }}</a>
+ {% else %}
+ {{question.summary}}
+ {% endif %}</span>
+ <span> {{ question.points }} </span>
</label>
</li>
{% endfor %}