TELEFORMA_GLOBAL_TWEETER = False
TELEFORMA_PERIOD_TWEETER = True
TELEFORMA_EXAM_TOPIC_DEFAULT_DOC_TYPE_NUMBER = 2
+TELEFORMA_EXAM_SCRIPT_UPLOAD = True
JQCHAT_DISPLAY_COUNT = 50
JQCHAT_DISPLAY_TIME = 48
{% load thumbnail %}
{% block extra_javascript %}
+{% if upload %}
<script>
$(document).ready(function(){
$('#loading').hide();
});
});
</script>
+{% endif %}
{% endblock extra_javascript %}
{% block answers %}
{% endfor %}
</table>
</form>
+ {% if upload %}
<br />
<center>
<a href="#" id="submit_button" class="component_icon button icon_next">{% trans "Submit" %}</a>
<img id="loading" src="{{STATIC_URL}}teleforma/images/loading.gif" style="vertical-align:middle" alt="loading" />
</center>
+ {% endif %}
<br /><br />
</div>
</div>
</div>
+
+{% if upload %}
{% block module-action %}
<div class="module_action">
<a href="{% url teleforma-exam-script-create period.id %}" class="component_icon button" id="action_green">{% trans "New script" %}</a>
</div>
{% endblock module-action %}
+{% endif %}
{% endblock modules %}
def get_context_data(self, **kwargs):
context = super(ScriptsView, self).get_context_data(**kwargs)
context['period'] = Period.objects.get(id=self.kwargs['period_id'])
+ context['upload'] = getattr(settings, 'TELEFORMA_EXAM_SCRIPT_UPLOAD', True)
return context
@method_decorator(login_required)