verbose_name = _('Auditor')
ordering = ['user__last_name']
-
class SeminarRevision(models.Model):
seminar = models.ForeignKey(Seminar, related_name="revision", verbose_name=_('seminar'))
{% include "teleforma/inc/document_step.html" %}
{% endwith %}
-{% with seminar.question as questions %}
+ {% if not seminar.conference in user.auditor.get.conferences.all %}
+
+ {% with seminar.question as questions %}
<div class="course_subtitle">
<h4><img src="{{ STATIC_URL }}/telemeta/images/item_title.png" width="10px" alt="" /> {% trans "Step" %} 4</h4>
</div>
{% include "teleforma/inc/question_step.html" %}
-{% endwith %}
+ {% endwith %}
-{% if seminar_progress == 100 %}
-{% with seminar.docs_correct as docs %}
- <div class="course_subtitle">
+ {% if seminar_progress == 100 %}
+ {% with seminar.docs_correct as docs %}
+ <div class="course_subtitle">
<h4><img src="{{ STATIC_URL }}/telemeta/images/item_title.png" width="10px" alt="" /> {% trans "Step" %} 5</h4>
</div>
{% include "teleforma/inc/document_step.html" %}
-{% endwith %}
+ {% endwith %}
-{% with seminar.form as form %}
+ {% with seminar.form as form %}
<div class="course_subtitle">
<h4><img src="{{ STATIC_URL }}/telemeta/images/item_title.png" width="10px" alt="" /> {% trans "Step" %} 6 :</h4>
</div>
{% include "teleforma/inc/evaluation_form.html" %}
-{% endwith %}
-{% endif %}
+ {% endwith %}
+ {% endif %}
-{% if seminar|validated:user %}
+ {% if seminar|validated:user %}
<div class="course_subtitle">
<h4><img src="{{ STATIC_URL }}/telemeta/images/item_title.png" width="10px" alt="" /> {% trans "Step" %} 7</h4>
</div>
{% include "teleforma/inc/testimonial_step.html" %}
-{% endif %}
+ {% endif %}
+ {% endif %}
media.set_mime_type()
if not self.request.user in media.readers.all():
media.readers.add(self.request.user)
+ context['HOST'] = self.request.META.get('HOST')
context['media'] = media
context['mime_type'] = media.mime_type
context['course'] = media.course
from teleforma.views.core import *
from teleforma.context_processors import *
+from django.core.exceptions import PermissionDenied
from telemeta.util.unicode import UnicodeWriter
self.question = Question.objects.get(pk=self.kwargs['pk'])
self.user = self.get_user()
+
+ if self.question.seminar.conference in self.user.auditor.get().conferences.all():
+ raise PermissionDenied
+
answers = Answer.objects.filter(user=self.user,
question=self.question).order_by('-date_submitted')
if answers: