Skip to content

Commit 7091bcd

Browse files
authored
Merge pull request #1165 from EsupPortail/develop
[FREEZE] Develop #3.8.0
2 parents 0298e29 + 0eebb34 commit 7091bcd

File tree

142 files changed

+4606
-3110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+4606
-3110
lines changed

CONFIGURATION_EN.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,8 @@ Set `USE_AI_ENHANCEMENT` to True to activate this application.<br>
399399
* `AI_ENHANCEMENT_CGU_URL`
400400
> default value: ``
401401
>> URL for General Terms and Conditions for API uses for the AI video enhancement.<br>
402-
>> Example: 'https://aristote.univ.fr/cgu'<br>
403-
>> Project Link: https://www.demainestingenieurs.centralesupelec.fr/aristote/<br>
402+
>> Example: '<https://aristote.univ.fr/cgu>'<br>
403+
>> Project Link: <https://www.demainestingenieurs.centralesupelec.fr/aristote/><br>
404404
* `AI_ENHANCEMENT_CLIENT_ID`
405405
> default value: `mocked_id`
406406
>> The video enhancement AI client ID.<br>
@@ -622,6 +622,15 @@ Set `USE_DRESSING` to True to activate this application.<br>
622622
###
623623

624624

625+
### Seaker application configuration
626+
627+
Speaker application to add speakers to video.<br>
628+
Set `USE_SPEAKER` to True to activate this application.<br>
629+
630+
* `USE_SPEAKER`
631+
> default value: `False`
632+
>> Activation of the Speaker application<br>
633+
625634
### Video import application configuration
626635

627636
Import_video app to import external videos into Pod.<br>

CONFIGURATION_FR.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,9 @@ Il faudra pour cela créer un fichier de langue et traduire chaque entrée.<br>
475475
* `ARCHIVE_OWNER_USERNAME`
476476
> valeur par défaut : `"archive"`
477477
>> Nom de l’utilisateur pour l’archivage des vidéos.<br>
478+
* `ARCHIVE_HOW_MANY_DAYS`
479+
> valeur par défaut : `365`
480+
>> Délai avant qu'une vidéo archivée ne soit déplacée vers archive_ROOT.<br>
478481
* `POD_ARCHIVE_AFFILIATION`
479482
> valeur par défaut : `[]`
480483
>> Affiliations pour lesquelles on souhaite archiver la vidéo plutôt que de la supprimer.<br>
@@ -727,8 +730,8 @@ Mettre `USE_AI_ENHANCEMENT` à True pour activer cette application.<br>
727730
* `AI_ENHANCEMENT_CGU_URL`
728731
> valeur par défaut : ``
729732
>> L’URL des conditions générales d’utilisation de l’API pour l’IA d’amélioration des vidéos.<br>
730-
>> Exemple : 'https://aristote.univ.fr/cgu'<br>
731-
>> Lien du projet : https://www.demainestingenieurs.centralesupelec.fr/aristote/<br>
733+
>> Exemple : '<https://aristote.univ.fr/cgu>'<br>
734+
>> Lien du projet : <https://www.demainestingenieurs.centralesupelec.fr/aristote/><br>
732735
* `AI_ENHANCEMENT_CLIENT_ID`
733736
> valeur par défaut : `mocked_id`
734737
>> L’ID du client de l’IA d’amélioration des vidéos.<br>
@@ -1028,6 +1031,15 @@ Mettre `USE_DRESSING` à True pour activer cette application.<br>
10281031
### Configuration de l’application enrichment
10291032
10301033
1034+
### Configuration de l’application Intervenant
1035+
1036+
Application Intervenant permettant d'ajouter des intervenants à la vidéo.<br>
1037+
Mettre `USE_SPEAKER` à True pour activer cette application.<br>
1038+
1039+
* `USE_SPEAKER`
1040+
> valeur par défaut : `False`
1041+
>> Activation de l’application Intervenant<br>
1042+
10311043
### Configuration de l’application d’import vidéo
10321044
10331045
Application Import_video permettant d’importer des vidéos externes dans Pod.<br>

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
![last commit push](https://img.shields.io/github/last-commit/EsupPortail/Esup-Pod)
1111
[![Author](https://img.shields.io/badge/author-Ptitloup-blue)](https://www.linkedin.com/in/nicolas-can-a6bb7869/)
1212

13-
1413
## [FR]
1514

1615
### Plateforme de gestion de fichier vidéo

pod/ai_enhancement/static/ai_enhancement/js/enrich-form.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* @since 3.7.0
55
*/
66

7+
// Read-only globals defined in main.js
8+
/* global decodeString remove_quotes removeAccentsAndLowerCase */
79

810
const BORDER_CLASS = 'border-d';
911

@@ -92,7 +94,7 @@ function addTogglePairInput(aiVersionElement, initialVersionElement, input, elem
9294
aiVersionElement.addEventListener('click', () => {
9395
let input = document.getElementById('id_' + element);
9496
togglePairInput(aiVersionElement, initialVersionElement, input, element);
95-
})
97+
});
9698
input.addEventListener('input', () => event__inputChange(initialVersionElement, aiVersionElement));
9799
}
98100

@@ -182,7 +184,7 @@ function addEventListeners(videoSlug, videoTitle, videoDescription, videoDiscipl
182184
'description',
183185
'tags',
184186
'disciplines',
185-
]
187+
];
186188
const options = {
187189
method: 'GET',
188190
headers: {
@@ -227,7 +229,7 @@ function addEventListeners(videoSlug, videoTitle, videoDescription, videoDiscipl
227229
});
228230
aiVersionElement.addEventListener('click', () => {
229231
toggleMultiplePairInput(aiVersionElement, initialVersionElement, input);
230-
})
232+
});
231233
input.addEventListener('input', () => event__inputChange(initialVersionElement, aiVersionElement));
232234
break;
233235
}

pod/ai_enhancement/views.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from pod.main.lang_settings import ALL_LANG_CHOICES, PREF_LANG_CHOICES
2626
from pod.main.utils import json_to_web_vtt
2727
from pod.main.views import in_maintenance
28-
from pod.podfile.models import UserFolder
2928
from pod.quiz.utils import import_quiz
3029
from pod.video.models import Video, Discipline
3130
from pod.video_encode_transcript.transcript import saveVTT
@@ -349,10 +348,7 @@ def enhance_subtitles(request: WSGIRequest, video_slug: str) -> HttpResponse:
349348
+ str(True)
350349
)
351350

352-
video_folder, created = UserFolder.objects.get_or_create(
353-
name=video.slug,
354-
owner=request.user,
355-
)
351+
video_folder = video.get_or_create_video_folder()
356352
if enhancement_is_already_asked(video):
357353
enhancement = AIEnhancement.objects.filter(video=video).first()
358354
if enhancement.is_ready:

pod/bbb/views.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def list_meeting(request):
3535
attendee__user_id=request.user.id, recording_available=True
3636
)
3737
meetings_list = meetings_list.order_by("-session_date")
38-
# print(str(meetings_list.query))
3938

4039
page = request.GET.get("page", 1)
4140

@@ -145,7 +144,6 @@ def live_list_meeting(request):
145144
last_date_in_progress__gte=dateSince10Min,
146145
)
147146
meetings_list = meetings_list.order_by("-session_date")
148-
# print(str(meetings_list.query))
149147

150148
meetings_list = check_meetings_have_live_in_progress(meetings_list, request)
151149

pod/completion/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class Contributor(models.Model):
7979

8080
video = models.ForeignKey(Video, verbose_name=_("video"), on_delete=models.CASCADE)
8181
name = models.CharField(
82-
verbose_name=_("lastname / firstname"), max_length=200, default=""
82+
verbose_name=_("last name / first name"), max_length=200, default=""
8383
)
8484
email_address = models.EmailField(
8585
verbose_name=_("mail"), null=True, blank=True, default=""

pod/completion/static/js/completion.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ var ajaxfail = function (data, form) {
4949
document.addEventListener("submit", (e) => {
5050
if (
5151
e.target.id !== "form_new_contributor" &&
52+
e.target.id !== "form_new_speaker" &&
5253
e.target.id !== "form_new_document" &&
5354
e.target.id !== "form_new_track" &&
5455
e.target.id !== "form_new_overlay" &&
@@ -219,6 +220,10 @@ var sendAndGetForm = async function (elt, action, name, form, list) {
219220
deleteConfirm = confirm(
220221
gettext("Are you sure you want to delete this contributor?"),
221222
);
223+
} else if (name === "speaker") {
224+
deleteConfirm = confirm(
225+
gettext("Are you sure you want to delete this speaker?"),
226+
);
222227
} else if (name === "document") {
223228
deleteConfirm = confirm(
224229
gettext("Are you sure you want to delete this document?"),

pod/completion/templates/contributor/list_contributor.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<caption>{% trans 'List of contributors' %}&nbsp;({{list_contributor|length}})</caption>
77
<thead>
88
<tr>
9-
<th scope="col" class="contributor-name">{% trans 'Lastname / Firstname' %}</th>
9+
<th scope="col" class="contributor-name">{% trans 'Last name / First name' %}</th>
1010
<th scope="col">{% trans 'Mail' %}</th>
1111
<th scope="col">{% trans 'Role' %}</th>
1212
<th scope="col">{% trans 'Web link' %}</th>

pod/completion/templates/video_completion.html

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,32 @@ <h2 class="accordion-header">
4949
</div>
5050

5151
{% if request.user.is_staff %}
52+
{% if USE_SPEAKER %}
53+
<div class="accordion-item">
54+
<h2 class="accordion-header">
55+
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#compSpeakers" aria-expanded="false" aria-controls="compSpeakers">
56+
{% trans 'Speaker(s)' %}
57+
</button>
58+
</h2>
59+
<div id="compSpeakers" class="accordion-collapse collapse">
60+
<div class="accordion-body">
61+
{% include 'speaker/list_speaker.html' %}
62+
<span id="form_speaker">
63+
{% if form_speaker %}
64+
{% include 'speaker/form_speaker.html' with form_speaker=form_speaker %}
65+
{% endif %}
66+
</span>
67+
<form class="form_new completion" id="form_new_speaker" action="{% url 'video:completion:video_completion_speaker' slug=video.slug %}" method="POST">
68+
{% csrf_token %}
69+
<input type="hidden" name="action" value="new">
70+
<input type="submit" value="{% trans 'Add a new speaker' %}" class="new_speaker btn btn-primary">
71+
</form>
72+
</div>
73+
</div>
74+
</div>
75+
{% endif %}
76+
77+
5278
<div class="accordion-item">
5379
<h2 class="accordion-header">
5480
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#compSubtitles" aria-expanded="false" aria-controls="compSubtitles">
@@ -175,6 +201,18 @@ <h2 class="card-header card-title pod-card__title h4">{% trans "Help"%}</h2>
175201
<p>{% trans 'A contributor must at least have a name and a role. You can also join the email of this contributor as well as a link (professional website for example).' %}</p>
176202
</div>
177203
</div>
204+
<!-- Speaker -->
205+
{% if USE_SPEAKER %}
206+
<div id="speaker-info">
207+
<button class="btn btn-link rounded-0 pod-btn" id="heading-5" data-bs-toggle="collapse" data-bs-target="#collapse-speaker" aria-expanded="false" aria-controls="collapse-speaker">
208+
{% trans 'Speaker(s)' %}
209+
</button>
210+
<div id="collapse-speaker" class="collapse card-text small">
211+
<p>{% trans 'List of speakers related to this video.' %}</p>
212+
<p>{% trans "You can add speakers to this video by searching by their last name, first name or job. If you can't find the speaker, contact a super admin." %}</p>
213+
</div>
214+
</div>
215+
{% endif %}
178216
<div id="track-info">
179217
<button class="btn btn-link rounded-0 pod-btn" id="heading-2" data-bs-toggle="collapse" data-bs-target="#collapse-track" aria-expanded="false" aria-controls="collapse-track">
180218
{% trans 'Subtitle(s) and Caption(s)' %}
@@ -240,5 +278,7 @@ <h2 class="card-header card-title pod-card__title h4">{% trans "Help"%}</h2>
240278
{% endblock page_aside %}
241279

242280
{% block more_script %}
281+
<script src="{% static 'admin/js/vendor/select2/select2.full.min.js' %}?ver={{VERSION}}"></script>
282+
<script src="{% static 'django_select2/django_select2.js' %}?ver={{VERSION}}"></script>
243283
<script src="{% static 'js/completion.js' %}?ver={{VERSION}}"></script>
244284
{% endblock more_script %}

0 commit comments

Comments
 (0)