From c0e98c3df47ba09a9810184b921ff6b732e19f1c Mon Sep 17 00:00:00 2001 From: Yoan Le Clanche Date: Fri, 26 Jun 2020 09:30:58 +0200 Subject: [PATCH] WIP notelemeta --- .gitignore | 1 + requirements-new.txt | 1 - teleforma/admin.py | 5 + .../exam/templates/exam/inc/script_list.html | 1 - .../exam/templates/exam/mass_score_form.html | 1 - .../templates/exam/messages/script_fix.txt | 2 +- .../templates/exam/messages/script_marked.txt | 2 +- .../exam/messages/script_rejected.txt | 2 +- teleforma/exam/templates/exam/quotas.html | 1 - teleforma/exam/templates/exam/score_form.html | 1 - teleforma/exam/templates/exam/scores.html | 1 - .../exam/templates/exam/script_detail.html | 1 - .../exam/templates/exam/script_detail2.html | 149 ++ .../exam/templates/exam/script_form.html | 1 - teleforma/exam/templates/exam/scripts.html | 3 +- teleforma/fields.py | 154 ++ teleforma/forms.py | 1 + teleforma/locale/en/LC_MESSAGES/django.po | 46 +- ...forma-reset-all-passwords-with-mail-fix.py | 2 +- ...orma-reset-all-passwords-with-mail-test.py | 2 +- ...teleforma-reset-all-passwords-with-mail.py | 2 +- .../commands/teleforma-send-payment-emails.py | 2 +- .../teleforma-send-subscription-email-test.py | 2 +- .../teleforma-send-subscription-email.py | 2 +- ...field_period_department__add_field_medi.py | 784 ++++++++++ teleforma/models/ae.py | 1 - teleforma/models/core.py | 53 +- teleforma/models/crfpa.py | 1 - teleforma/models/pro.py | 1 - teleforma/models/profile.py | 20 + teleforma/static/teleforma/css/base.css | 1263 +++++++++++++++++ .../teleforma/css/jquery.autocomplete.css | 48 + teleforma/static/teleforma/css/player.css | 53 + teleforma/static/teleforma/css/search_bg.png | Bin 0 -> 257 bytes teleforma/static/teleforma/css/teleforma.css | 68 +- .../static/teleforma/css/teleforma_ie.css | 17 + .../static/teleforma/css/teleforma_ie6.css | 4 + teleforma/static/teleforma/images/add.png | Bin 0 -> 612 bytes .../teleforma/images/add_playlist_marker.png | Bin 0 -> 514 bytes .../teleforma/images/add_to_playlist.png | Bin 0 -> 579 bytes teleforma/static/teleforma/images/asc.png | Bin 0 -> 222 bytes teleforma/static/teleforma/images/cancel.png | Bin 0 -> 765 bytes .../static/teleforma/images/copy_page.png | Bin 0 -> 799 bytes teleforma/static/teleforma/images/csv.png | Bin 0 -> 673 bytes .../static/teleforma/images/del_marker.png | Bin 0 -> 260 bytes .../static/teleforma/images/delete copy.png | Bin 0 -> 534 bytes teleforma/static/teleforma/images/delete.png | Bin 0 -> 534 bytes teleforma/static/teleforma/images/desc.png | Bin 0 -> 222 bytes .../static/teleforma/images/dublin_core.png | Bin 0 -> 909 bytes .../static/teleforma/images/edit_marker.png | Bin 0 -> 861 bytes .../static/teleforma/images/edit_page.png | Bin 0 -> 710 bytes teleforma/static/teleforma/images/filter.png | Bin 0 -> 429 bytes teleforma/static/teleforma/images/find.png | Bin 0 -> 874 bytes teleforma/static/teleforma/images/grid_bg.png | Bin 0 -> 120 bytes .../static/teleforma/images/item_title.png | Bin 0 -> 495 bytes .../static/teleforma/images/marker_tiny.png | Bin 0 -> 205 bytes .../static/teleforma/images/media-record.png | Bin 0 -> 735 bytes .../teleforma/images/module_playlist.png | Bin 0 -> 196 bytes .../static/teleforma/images/module_world.png | Bin 0 -> 1058 bytes teleforma/static/teleforma/images/more.png | Bin 0 -> 398 bytes teleforma/static/teleforma/images/next.png | Bin 0 -> 726 bytes teleforma/static/teleforma/images/ok.png | Bin 0 -> 661 bytes .../static/teleforma/images/password.png | Bin 0 -> 818 bytes .../static/teleforma/images/playlist.png | Bin 0 -> 327 bytes .../static/teleforma/images/previous.png | Bin 0 -> 733 bytes teleforma/static/teleforma/images/save.png | Bin 0 -> 695 bytes .../static/teleforma/images/search_wh2.png | Bin 0 -> 815 bytes teleforma/static/teleforma/images/tw_hd.png | Bin 0 -> 3494 bytes teleforma/static/teleforma/images/vox.png | Bin 0 -> 691 bytes teleforma/static/teleforma/images/vox_wh.png | Bin 0 -> 442 bytes teleforma/static/teleforma/js/application.js | 249 ++++ teleforma/templates/404.html | 7 +- teleforma/templates/500.html | 7 +- teleforma/templates/postman/base.html | 2 +- teleforma/templates/postman/email_user.txt | 2 +- .../templates/postman/email_user_init.txt | 2 +- teleforma/templates/postman/view.html | 4 +- teleforma/templates/receipt/receipt_pdf.html | 1 - .../registration/registration_complete.html | 3 +- .../registration_corrector_complete.html | 1 - .../registration_corrector_pdf.html | 1 - .../registration/registration_form.html | 1 - .../registration/registration_pdf.html | 1 - teleforma/templates/teleforma/annals.html | 9 +- .../templates/teleforma/appointments.html | 3 +- teleforma/templates/teleforma/base.html | 268 +++- .../teleforma/course_conference.html | 1 - .../teleforma/course_conference_audio.html | 1 - .../teleforma/course_conference_record.html | 1 - .../templates/teleforma/course_document.html | 3 +- .../templates/teleforma/course_media.html | 1 - .../teleforma/course_media_video_embed.html | 1 - teleforma/templates/teleforma/courses.html | 19 +- .../templates/teleforma/courses_pending.html | 1 - teleforma/templates/teleforma/help.html | 3 +- teleforma/templates/teleforma/home.html | 28 + .../templates/teleforma/inc/chat_room.html | 3 +- .../teleforma/inc/conference_list.html | 6 +- .../teleforma/inc/document_list.html | 2 +- .../templates/teleforma/inc/media_list.html | 8 +- .../teleforma/inc/media_list_pending.html | 6 +- .../inc/module_searches.html | 3 +- .../teleforma/inc/newsitems_portlet.html | 1 - .../inc/user_list.html | 1 - .../{telemeta => teleforma}/lists.html | 12 +- .../{telemeta => teleforma}/login.html | 8 +- .../teleforma/newsitem_confirm_delete.html | 2 +- .../templates/teleforma/newsitem_form.html | 2 +- .../templates/teleforma/newsitem_list.html | 2 +- .../profile_detail.html | 8 +- .../search_criteria.html | 3 +- .../{telemeta => teleforma}/users.html | 11 +- teleforma/templates/telemeta/base.html | 263 ---- teleforma/templates/telemeta/home.html | 29 - .../telemeta/inc/module_revisions.html | 49 - .../telemeta/inc/module_user_revisions.html | 11 - teleforma/templatetags/teleforma_tags.py | 15 + teleforma/urls.py | 16 +- teleforma/views/__init__.py | 1 + teleforma/views/core.py | 1 - teleforma/views/crfpa.py | 2 +- teleforma/views/profile.py | 95 ++ teleforma/webclass/models.py | 2 +- .../templates/webclass/appointments.html | 2 +- .../webclass/appointments_professor.html | 3 +- .../webclass/templates/webclass/record.html | 3 +- 126 files changed, 3361 insertions(+), 527 deletions(-) create mode 100644 teleforma/exam/templates/exam/script_detail2.html create mode 100644 teleforma/migrations/0125_auto__add_mediatranscoded__chg_field_period_department__add_field_medi.py create mode 100644 teleforma/models/profile.py create mode 100644 teleforma/static/teleforma/css/base.css create mode 100644 teleforma/static/teleforma/css/jquery.autocomplete.css create mode 100644 teleforma/static/teleforma/css/player.css create mode 100644 teleforma/static/teleforma/css/search_bg.png create mode 100644 teleforma/static/teleforma/css/teleforma_ie.css create mode 100644 teleforma/static/teleforma/css/teleforma_ie6.css create mode 100644 teleforma/static/teleforma/images/add.png create mode 100644 teleforma/static/teleforma/images/add_playlist_marker.png create mode 100644 teleforma/static/teleforma/images/add_to_playlist.png create mode 100644 teleforma/static/teleforma/images/asc.png create mode 100644 teleforma/static/teleforma/images/cancel.png create mode 100644 teleforma/static/teleforma/images/copy_page.png create mode 100644 teleforma/static/teleforma/images/csv.png create mode 100644 teleforma/static/teleforma/images/del_marker.png create mode 100644 teleforma/static/teleforma/images/delete copy.png create mode 100644 teleforma/static/teleforma/images/delete.png create mode 100644 teleforma/static/teleforma/images/desc.png create mode 100644 teleforma/static/teleforma/images/dublin_core.png create mode 100644 teleforma/static/teleforma/images/edit_marker.png create mode 100644 teleforma/static/teleforma/images/edit_page.png create mode 100644 teleforma/static/teleforma/images/filter.png create mode 100644 teleforma/static/teleforma/images/find.png create mode 100644 teleforma/static/teleforma/images/grid_bg.png create mode 100644 teleforma/static/teleforma/images/item_title.png create mode 100644 teleforma/static/teleforma/images/marker_tiny.png create mode 100644 teleforma/static/teleforma/images/media-record.png create mode 100644 teleforma/static/teleforma/images/module_playlist.png create mode 100644 teleforma/static/teleforma/images/module_world.png create mode 100644 teleforma/static/teleforma/images/more.png create mode 100644 teleforma/static/teleforma/images/next.png create mode 100644 teleforma/static/teleforma/images/ok.png create mode 100644 teleforma/static/teleforma/images/password.png create mode 100644 teleforma/static/teleforma/images/playlist.png create mode 100644 teleforma/static/teleforma/images/previous.png create mode 100644 teleforma/static/teleforma/images/save.png create mode 100644 teleforma/static/teleforma/images/search_wh2.png create mode 100644 teleforma/static/teleforma/images/tw_hd.png create mode 100644 teleforma/static/teleforma/images/vox.png create mode 100644 teleforma/static/teleforma/images/vox_wh.png create mode 100644 teleforma/templates/teleforma/home.html rename teleforma/templates/{telemeta => teleforma}/inc/module_searches.html (84%) rename teleforma/templates/{telemeta => teleforma}/inc/user_list.html (98%) rename teleforma/templates/{telemeta => teleforma}/lists.html (94%) rename teleforma/templates/{telemeta => teleforma}/login.html (71%) rename teleforma/templates/{telemeta => teleforma}/profile_detail.html (88%) rename teleforma/templates/{telemeta => teleforma}/search_criteria.html (98%) rename teleforma/templates/{telemeta => teleforma}/users.html (78%) delete mode 100644 teleforma/templates/telemeta/base.html delete mode 100644 teleforma/templates/telemeta/home.html delete mode 100644 teleforma/templates/telemeta/inc/module_revisions.html delete mode 100644 teleforma/templates/telemeta/inc/module_user_revisions.html create mode 100644 teleforma/views/profile.py 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 cf21dbf7..dc7ae16c 100644 --- a/teleforma/admin.py +++ b/teleforma/admin.py @@ -303,10 +303,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 79fd94a5..59917766 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 %} +