From: Yoan Le Clanche Date: Fri, 26 Jun 2020 07:30:58 +0000 (+0200) Subject: WIP X-Git-Tag: 2.1~66^2^2~93^2~3 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=87771ae076a74c0ef255781cb073811c0d106a0b;p=teleforma.git WIP --- diff --git a/.gitignore b/.gitignore index 24a0c1a5..3d195fcc 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ develop-eggs .installed.cfg .directory *.e4p +select2-4.0.5 # Installer logs pip-log.txt diff --git a/requirements-new.txt b/requirements-new.txt index 5b943de6..80dc8fc3 100644 --- a/requirements-new.txt +++ b/requirements-new.txt @@ -1,7 +1,6 @@ setuptools uwsgi django==1.6.11 -telemeta south django-pagination django-postman diff --git a/teleforma/admin.py b/teleforma/admin.py index ae9a3a2c..773592ef 100644 --- a/teleforma/admin.py +++ b/teleforma/admin.py @@ -245,10 +245,15 @@ class ConferenceDateBeginFilter(admin.SimpleListFilter): else: return queryset +class MediaTranscodedInline(admin.TabularInline): + model = MediaTranscoded + class MediaAdmin(admin.ModelAdmin): exclude = ['readers'] search_fields = ['id', 'title', 'course__title', 'course__code'] list_filter = (ConferenceDateBeginFilter, ) + inlines = [MediaTranscodedInline] + class ConferenceAdmin(admin.ModelAdmin): exclude = ['readers'] diff --git a/teleforma/exam/templates/exam/inc/script_list.html b/teleforma/exam/templates/exam/inc/script_list.html index 96f88ade..c6edfbfd 100644 --- a/teleforma/exam/templates/exam/inc/script_list.html +++ b/teleforma/exam/templates/exam/inc/script_list.html @@ -1,5 +1,4 @@ {% load i18n %} -{% load telemeta_utils %} {% load teleforma_tags %} {% load pagination_tags %} diff --git a/teleforma/exam/templates/exam/mass_score_form.html b/teleforma/exam/templates/exam/mass_score_form.html index de9d4fcf..4b5aeda1 100644 --- a/teleforma/exam/templates/exam/mass_score_form.html +++ b/teleforma/exam/templates/exam/mass_score_form.html @@ -1,5 +1,4 @@ {% extends "exam/scores.html" %} -{% load telemeta_utils %} {% load teleforma_tags %} {% load i18n %} {% load thumbnail %} diff --git a/teleforma/exam/templates/exam/messages/script_fix.txt b/teleforma/exam/templates/exam/messages/script_fix.txt index 2b0a7de3..b1c651bb 100644 --- a/teleforma/exam/templates/exam/messages/script_fix.txt +++ b/teleforma/exam/templates/exam/messages/script_fix.txt @@ -1,4 +1,4 @@ -{% load i18n %}{% load telemeta_utils %}{% load teleforma_tags %}{% autoescape off %}Bonjour, +{% load i18n %}{% load teleforma_tags %}{% autoescape off %}Bonjour, Votre copie soumise le {{ script.date_added }} en {{ script.course }} pour la séance {{ script.session }} a été rejetée par erreur. diff --git a/teleforma/exam/templates/exam/messages/script_marked.txt b/teleforma/exam/templates/exam/messages/script_marked.txt index 628853d0..6d62e43c 100644 --- a/teleforma/exam/templates/exam/messages/script_marked.txt +++ b/teleforma/exam/templates/exam/messages/script_marked.txt @@ -1,4 +1,4 @@ -{% load i18n %}{% load telemeta_utils %}{% load teleforma_tags %}{% autoescape off %}Bonjour, +{% load i18n %}{% load teleforma_tags %}{% autoescape off %}Bonjour, Votre copie soumise le {{ script.date_added }} en {{ script.course }} pour la séance {{ script.session }} a été corrigée. diff --git a/teleforma/exam/templates/exam/messages/script_rejected.txt b/teleforma/exam/templates/exam/messages/script_rejected.txt index 0c27290d..26a15f57 100644 --- a/teleforma/exam/templates/exam/messages/script_rejected.txt +++ b/teleforma/exam/templates/exam/messages/script_rejected.txt @@ -1,4 +1,4 @@ -{% load i18n %}{% load telemeta_utils %}{% load teleforma_tags %}{% autoescape off %}Bonjour, +{% load i18n %}{% load teleforma_tags %}{% autoescape off %}Bonjour, Votre copie soumise le {{ script.date_added }} en {{ script.course }} pour la séance {{ script.session }} a été rejetée pour le motif suivant : {% trans script.reject_reason %}. diff --git a/teleforma/exam/templates/exam/quotas.html b/teleforma/exam/templates/exam/quotas.html index 4f8b8ff2..171eea13 100644 --- a/teleforma/exam/templates/exam/quotas.html +++ b/teleforma/exam/templates/exam/quotas.html @@ -1,5 +1,4 @@ {% extends "exam/scripts.html" %} -{% load telemeta_utils %} {% load teleforma_tags %} {% load i18n %} diff --git a/teleforma/exam/templates/exam/score_form.html b/teleforma/exam/templates/exam/score_form.html index 6ba49a26..1846de9e 100644 --- a/teleforma/exam/templates/exam/score_form.html +++ b/teleforma/exam/templates/exam/score_form.html @@ -1,5 +1,4 @@ {% extends "exam/scores.html" %} -{% load telemeta_utils %} {% load teleforma_tags %} {% load i18n %} {% load thumbnail %} diff --git a/teleforma/exam/templates/exam/scores.html b/teleforma/exam/templates/exam/scores.html index 7953c62f..76daf8f4 100644 --- a/teleforma/exam/templates/exam/scores.html +++ b/teleforma/exam/templates/exam/scores.html @@ -1,6 +1,5 @@ {% extends "exam/scripts.html" %} {% load i18n %} -{% load telemeta_utils %} {% load teleforma_tags %} {% load static %} {% load nvd3_tags %} diff --git a/teleforma/exam/templates/exam/script_detail.html b/teleforma/exam/templates/exam/script_detail.html index 6a094104..525dc74d 100644 --- a/teleforma/exam/templates/exam/script_detail.html +++ b/teleforma/exam/templates/exam/script_detail.html @@ -1,5 +1,4 @@ {% extends "teleforma/course_detail.html" %} -{% load telemeta_utils %} {% load teleforma_tags %} {% load i18n %} {% load static %} diff --git a/teleforma/exam/templates/exam/script_detail2.html b/teleforma/exam/templates/exam/script_detail2.html new file mode 100644 index 00000000..2adc1932 --- /dev/null +++ b/teleforma/exam/templates/exam/script_detail2.html @@ -0,0 +1,149 @@ +{% extends "teleforma/course_detail.html" %} +{% load teleforma_tags %} +{% load i18n %} +{% load static %} +{% load webviewer %} +{% load thumbnail %} + +{% block extra_javascript %} + + + + + + + + + +{% endblock extra_javascript %} + +{% block content %} + +{% block course %} +
+ +
+ + {{ script.title }} + +
+ {% if topic.file %} +  {% trans "Topic" %} + {% endif %} + {% if script.score %} + {% trans "Score" %} : {{ script.score|floatformat }}/20 + {% trans "Comments" %} + {% trans "Imprimer" %} + {% elif script.status == 0 %} + {% trans "Rejected" %} + {% else %} + {% if user.quotas.all %} + {% trans "Scoring" %} + {% trans "Reject" %} + {% else %} + {% trans "Submitted" %} + {% endif %} + {% endif %} + +
+ +
+ +
+ {{ script.comments }} +
+ +
+
{% csrf_token %} + + + {% for field in form %} + + {% if not field.html_name in mark_fields %} + + {% else %} + {% if field.html_name == 'score' %} + + {% else %} + + {% endif %} + + {% endif %} + + {% endfor %} +
{% for error in form.non_field_errors %}
  • {{ error }}
  • {% endfor %}
    {{ field.label_tag.as_hidden }}{{ field.as_hidden }}{{ field.label_tag }}: {{ field }}/20
    (utilisez la virgule pour les décimales)
    {{ field.label_tag }}: {{ field }}
    +
    +
    +
    + {% trans "Send" %} +
    +

    +
    + +
    +
    {% csrf_token %} + + + {% for field in form %} + + {% if not field.html_name in reject_fields %} + + {% else %} + + + {% endif %} + + {% endfor %} +
    {% for error in form.non_field_errors %}
  • {{ error }}
  • {% endfor %}
    {{ field.label_tag.as_hidden }}{{ field.as_hidden }}
    {{ field.errors }}
    {{ field.label_tag }}: {{ field }}
    +
    +
    +
    + {% trans "Reject" %} +
    +

    +
    + +
    +

    Impression de la copie corrigée

    + Pour imprimer votre copie corrigée avec les annotations, veuillez : +
      +
    • Téléchager votre copie à l'aide du boutton "flêche vers le bas" du menu au dessus de la copie (Download annotated PDF)
    • +
    • Ouvir le fichier PDF obtenu avec Acrobat Reader
    • +
    • Imprimer le document avec l'option "Document et annotations" comme expliqué ici
    • +
    +
    + +{% if access_error %} +

    {{ access_error }}

    +

    {{ message }}

    + +{% else %} +

    +
    +
    + {% if script.has_annotations_file %} +