From 5208fd129d0c219e9364f3a2ebcd2bc63ebc5a50 Mon Sep 17 00:00:00 2001 From: Yoan Le Clanche Date: Tue, 14 Dec 2021 10:20:18 +0100 Subject: [PATCH] No telemeta --- teleforma/admin.py | 17 +- .../exam/templates/exam/script_detail2.html | 149 ---- ...ation__chg_field_conference_city__chg_f.py | 788 ++++++++++++++++++ .../0138_auto__del_field_media_item.py | 556 ++++++++++++ teleforma/models/core.py | 49 +- .../templates/teleforma/answer_detail.html | 4 +- .../templates/teleforma/answer_form.html | 4 +- .../templates/teleforma/evaluation_form.html | 4 +- .../teleforma/inc/document_simple_list.html | 2 +- .../teleforma/inc/document_step.html | 2 +- .../teleforma/inc/evaluation_form.html | 2 +- .../teleforma/inc/media_package_list.html | 4 +- .../templates/teleforma/inc/media_step.html | 2 +- .../teleforma/inc/question_list.html | 6 +- .../teleforma/inc/question_step.html | 4 +- .../templates/teleforma/inc/quiz_list.html | 4 +- teleforma/templates/teleforma/inc/steps.html | 14 +- .../templates/teleforma/inc/webclass.html | 4 +- teleforma/templates/teleforma/quiz_form.html | 2 +- .../templates/teleforma/search_criteria.html | 10 +- .../templates/teleforma/seminar_detail.html | 24 +- .../teleforma/seminar_media_audio.html | 2 +- .../teleforma/seminar_media_video.html | 4 +- teleforma/templates/teleforma/seminars.html | 17 +- teleforma/templatetags/teleforma_tags.py | 6 +- 25 files changed, 1444 insertions(+), 236 deletions(-) delete mode 100644 teleforma/exam/templates/exam/script_detail2.html create mode 100644 teleforma/migrations/0137_auto__add_locationtype__add_location__chg_field_conference_city__chg_f.py create mode 100644 teleforma/migrations/0138_auto__del_field_media_item.py diff --git a/teleforma/admin.py b/teleforma/admin.py index d369db3a..f1f9ea3e 100644 --- a/teleforma/admin.py +++ b/teleforma/admin.py @@ -224,8 +224,8 @@ class SeminarAdmin(admin.ModelAdmin): search_fields = ['course__title', 'title', 'sub_title'] list_filter = ('period', 'publish_date', 'expiry_date') actions = ['clone_seminars', 'export_seminar'] - # raw_id_fields = [ 'media_preview', - # 'quiz', 'conference'] + raw_id_fields = [ 'media_preview', + 'quiz', 'conference'] def render_change_form(self, request, context, *args, **kwargs): """ @@ -260,19 +260,6 @@ class SeminarAdmin(admin.ModelAdmin): Q(id=preview_id) ) - # Suggested seminars / conferences - # if instance: - # current_values = [doc.id for doc in instance.suggested_seminars.all()] - # context['adminform'].form.fields['suggested_seminars'].queryset = Seminar.objects.filter( - # Q(private=2) | - # Q(id__in=current_values) - # ) - # if instance: - # current_values = [doc.id for doc in instance.suggested_conferences.all()] - # context['adminform'].form.fields['suggested_conferences'].queryset = Conference.objects.filter( - # Q(status=2) | - # Q(id__in=current_values) - # ) return super(SeminarAdmin, self).render_change_form(request, context, *args, **kwargs) def clone_seminars(self, request, queryset): diff --git a/teleforma/exam/templates/exam/script_detail2.html b/teleforma/exam/templates/exam/script_detail2.html deleted file mode 100644 index 2adc1932..00000000 --- a/teleforma/exam/templates/exam/script_detail2.html +++ /dev/null @@ -1,149 +0,0 @@ -{% 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 %} -