<a href="{% url 'teleforma-quiz' period_id=period.id course_id=course.pk quiz_name=quiz.url %}" class="component_icon button icon_loading">Refaire le quiz</a>
</div>
<div class="flex-item" id="flex">
- <a class="component_icon button icon_next">Quiz suivant</a>
+ <a href="{% url 'teleforma-quiz' period_id=period.id course_id=course.pk quiz_name=quiz_next.url %}" class="component_icon button icon_next">Quiz suivant</a>
</div>
</div>
<td class="border-top" width="5%" align="center">
{% if quiz|quiz_validated:user %}
<img src="{{ STATIC_URL }}teleforma/images/ok.png" style="vertical-align:middle" alt="" title="{% trans "Validated" %}" />
- {% else %}
- <img src="{{ STATIC_URL }}teleforma/images/delete.png" style="vertical-align:middle" alt="" title="{% trans ' not viewed yet' %}" />
+ {% else %}
+ <img src="{{ STATIC_URL }}teleforma/images/delete.png" style="vertical-align:middle" alt="" title="{% trans ' not viewed yet' %}" />
{% endif %}
</td>
</tr>
self.period = Period.objects.get(pk=self.kwargs['period_id'])
self.course = Course.objects.get(pk=self.kwargs['course_id'])
self.quiz = Quiz.objects.get(url=self.kwargs['quiz_name'])
+ self.quiz_next = self.course.quizzes.filter(id__gt=self.quiz.id).order_by('id').first()
+ if not self.quiz_next:
+ self.quiz_next = self.course.quizzes.first()
def get_user(self):
user_id = self.request.user.id
context['course_id'] = self.kwargs['course_id']
context['course'] = self.course
context['quiz'] = self.quiz
+ context['quiz_next'] = self.quiz_next
return context
def final_result_user(self):
'period': self.period,
'course': self.course,
'quiz': self.quiz,
+ 'quiz_next': self.quiz_next,
'all_courses': get_courses(self.user, num_order=True, period=self.period),
}