diff --git a/.eslintrc.js b/.eslintrc.js
index 7938d77952..5409490e58 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -36,7 +36,10 @@ module.exports = {
"interpolate": "readonly",
"bootstrap": "readonly",
"videojs": "readonly",
+ "CKEDITOR": "readonly",
"send_form_data": "writable",
"showalert": "writable",
+ "showLoader": "writable",
+ "manageDisableBtn": "writable"
}
};
diff --git a/.github/workflows/pod.yml b/.github/workflows/pod.yml
index 024cafe9f5..ed7671d3dd 100644
--- a/.github/workflows/pod.yml
+++ b/.github/workflows/pod.yml
@@ -17,7 +17,7 @@ jobs:
python-version: ['3.8', '3.9', '3.10']
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Configure sysctl limits (for ES)
run: |
@@ -27,7 +27,7 @@ jobs:
sudo sysctl -w vm.max_map_count=262144
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
diff --git a/CONFIGURATION_FR.md b/CONFIGURATION_FR.md
index c047d0ca75..13e5eaad94 100644
--- a/CONFIGURATION_FR.md
+++ b/CONFIGURATION_FR.md
@@ -739,13 +739,13 @@ Vous pouvez tout à fait rajouter des langues comme vous le souhaitez. Il faudra
> valeur par défaut : `False`
- >> Si True, permet de ne pas afficher les cursus dans la colonne de droite
+ >> Si True, permet de ne pas afficher les cursus dans la colonne de droite.
- `HIDE_DISCIPLINES`
> valeur par défaut : `False`
- >> Si True, permet de ne pas afficher les disciplines dans la colonne de droite
+ >> Si True, permet de ne pas afficher les disciplines dans la colonne de droite.
- `HIDE_LANGUAGE_SELECTOR`
@@ -769,7 +769,7 @@ Vous pouvez tout à fait rajouter des langues comme vous le souhaitez. Il faudra
> valeur par défaut : `False`
- >> si True, permet de ne pas afficher la liste des types dans la colonne de droite
+ >> Si True, permet de ne pas afficher la liste des types dans la colonne de droite.
- `HIDE_TYPES_TAB`
@@ -1552,13 +1552,13 @@ Mettre `USE_IMPORT_VIDEO` à True pour activer cette application.
- `USE_BBB`
- > valeur par défaut : `True`
+ > valeur par défaut : `False`
>> Utilisation de BigBlueButton - [TODO] À retirer dans les futures versions de Pod
- `USE_BBB_LIVE`
- > valeur par défaut : `False `
+ > valeur par défaut : `False`
>> Utilisation du système de diffusion de Webinaires en lien avec BigBlueButton - [TODO] À retirer dans les futures versions de Pod
@@ -1882,7 +1882,7 @@ Mettre `USE_PLAYLIST` à True pour activer cette application.
}
```
- >> Les clés VAPID sont nécessaires à la lib [django-webpush](https://github.com/safwanrahman/django-webpush). Elles peuvent être générées avec [https://web-push-codelab.glitch.me/]()
+ >> Les clés VAPID sont nécessaires à la lib [django-webpush](https://github.com/safwanrahman/django-webpush). Elles peuvent être générées avec [https://web-push-codelab.glitch.me/]().
### Configuration application recorder
@@ -1890,7 +1890,7 @@ Mettre `USE_PLAYLIST` à True pour activer cette application.
> valeur par défaut : `False`
- >> si True, active un lien dans le menu de l’utilisateur permettant de réclamer un enregistrement
+ >> Si True, active un lien dans le menu de l’utilisateur permettant de réclamer un enregistrement.
- `ALLOW_RECORDER_MANAGER_CHOICE_VID_OWNER`
@@ -1916,7 +1916,7 @@ Mettre `USE_PLAYLIST` à True pour activer cette application.
> valeur par défaut : `1`
>> Identifiant du type de vidéo par défaut (si non spécifié).
- >> (Exemple : 3 pour Colloque/conférence, 4 pour Cours...)
+ >> (Exemple : 3 pour Colloque/conférence, 4 pour Cours…)
- `DEFAULT_RECORDER_USER_ID`
@@ -2357,7 +2357,7 @@ Mettre `USE_PLAYLIST` à True pour activer cette application.
>> _(
>> "In this field you can select and add additional owners to the "
>> "video. These additional owners will have the same rights as "
- >> "you except that they can't delete this video."
+ >> "you except that they can’t delete this video."
>> )
>> ],
>> ),
@@ -2512,7 +2512,7 @@ Mettre `USE_PLAYLIST` à True pour activer cette application.
>> "{0}".format(_("Restricted access")),
>> [
>> _(
- >> "If you don't select “Draft mode”, you can restrict "
+ >> "If you don’t select “Draft mode”, you can restrict "
>> "the content access to only people who can log in"
>> )
>> ],
@@ -2521,7 +2521,7 @@ Mettre `USE_PLAYLIST` à True pour activer cette application.
>> "{0}".format(_("Password")),
>> [
>> _(
- >> "If you don't select “Draft mode”, you can add a password "
+ >> "If you don’t select “Draft mode”, you can add a password "
>> "which will be asked to anybody willing to watch "
>> "your content."
>> ),
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 21a953ef24..438452f2b1 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -139,7 +139,7 @@ Start reading our code and you'll get the hang of it. We optimize for readabilit
* Configuration variables are uppercase and can be called in all modules keeping the same name. For example, MAVAR = getattr(settings, "MAVAR", default value)
* Global variables to a module are also in uppercase but are considered private to the module and therefore must be prefixed and suffixed with a double underscore
- * We indent using two spaces (soft tabs)
+ * All .py files must be indented using 4 spaces, and all other files (.css, .html, .js) with 2 spaces (soft tabs)
* This is open source software. Consider the people who will read your code, and make it look nice for them. It's sort of like driving a car: Perhaps you love doing donuts when you're alone, but with passengers the goal is to make the ride as smooth as possible.
### JavaScript Styleguide
@@ -150,3 +150,18 @@ All JavaScript code is linted with [eslint](https://eslint.org/).
All python code is linted with [flake8](https://flake8.pycqa.org/en/latest/)
+### Typography
+
+Please use these typographic characters in all displayed strings:
+
+* Use Apostrophe (’) instead of single quote (')
+ * English samples: don’t, it’s
+ * French samples : J’aime, l’histoire
+* Use the ellipsis (…) instead of 3 dots (...)
+ * English sample: Loading…
+ * French sample : Chargement…
+* Use typographic quotes (“ ”) instead of neutral quotes (" ")
+ * English sample: You can use the “Description” field below.
+ * French sample : Utilisez le champ « Description » ci-dessous
+
+
diff --git a/Makefile b/Makefile
index add22ca179..f3e38371b2 100755
--- a/Makefile
+++ b/Makefile
@@ -20,8 +20,8 @@ start:
starts:
# nécessite les django-extensions
# cf https://timonweb.com/django/https-django-development-server-ssl-certificate/
- (sleep 15 ; open https://localhost:8000) &
- python3 manage.py runserver_plus --cert-file cert.pem --key-file key.pem
+ (sleep 15 ; open https://localhost:9090) &
+ python3 manage.py runserver_plus localhost:9090 --cert-file cert.pem --key-file key.pem
# Première installation de pod (BDD SQLite intégrée)
install:
@@ -49,9 +49,9 @@ createDB:
# Mise à jour des fichiers de langue
lang:
echo "Processing python files..."
- python3 manage.py makemessages --all -i "opencast-studio/*" -i "pod/custom/settings_local.py" --add-location=file
+ python3 manage.py makemessages --all -i "opencast-studio/*" -i "pod/custom/*" --add-location=file
echo "Processing javascript files..."
- python3 manage.py makemessages -d djangojs -l fr -l nl -i "*.min.js" -i "pod/static/*" -i "opencast-studio/*" -i "*/node_modules/*" -i "node_modules/*" --add-location=file
+ python3 manage.py makemessages -d djangojs -l fr -l nl -i "*.min.js" -i "pod/static/*" -i "opencast-studio/*" -i "*/node_modules/*" -i "node_modules/*" -i "pod/custom/*" --add-location=file
#compilation des fichiers de langue
compilelang:
diff --git a/README.md b/README.md
index aaad9b9ed7..5f31cde423 100644
--- a/README.md
+++ b/README.md
@@ -27,6 +27,6 @@ The project and the platform of the same name are aimed at users of our institut
### Technical documentation
* The documentation (to install, customize, etc…) is on the [ESUP Wiki](https://www.esup-portail.org/wiki/display/ES/esup-pod "Documentation")
- |
|
Ministère de lʼEnseignement supérieur, de la Recherche et de lʼInnovation
+
|
|
Ministère de lʼEnseignement supérieur et de la Recherche
:-----:|:-----:|:----:
diff --git a/docs/index.md b/docs/index.md
index 0f80fe6c44..d1d1347be1 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -3,5 +3,5 @@
## Retrouvez toute la documentation à cette adresse : https://www.esup-portail.org/wiki/display/ES/esup-pod
-[
](https://www.univ-lille.fr "Université de Lille") | [
](https://www.esup-portail.org "Esup Portail") | [
Ministère de lʼEnseignement supérieur, de la Recherche et de lʼInnovation](http://www.enseignementsup-recherche.gouv.fr "Ministère de lʼEnseignement supérieur, de la Recherche et de lʼInnovation")
+[
](https://www.univ-lille.fr "Université de Lille") | [
](https://www.esup-portail.org "Esup Portail") | [
Ministère de lʼEnseignement supérieur et de la Recherche](http://www.enseignementsup-recherche.gouv.fr "Ministère de lʼEnseignement supérieur et de la Recherche")
:-----:|:-----:|:----:
diff --git a/pod/authentication/backends.py b/pod/authentication/backends.py
index 57bda9b203..82d2139ea9 100644
--- a/pod/authentication/backends.py
+++ b/pod/authentication/backends.py
@@ -1,3 +1,5 @@
+"""Esup-Pod Authentication backends."""
+
from shibboleth.backends import ShibbolethRemoteUserBackend
from mozilla_django_oidc.auth import OIDCAuthenticationBackend
from django.contrib.sites.shortcuts import get_current_site
@@ -14,10 +16,13 @@
def is_staff_affiliation(affiliation):
+ """Check if user affiliation correspond to AFFILIATION_STAFF."""
return affiliation in AFFILIATION_STAFF
class ShibbBackend(ShibbolethRemoteUserBackend):
+ """Shibboleth backend authentication."""
+
def authenticate(self, request, remote_user, shib_meta):
"""
Username passed as `remote_user` is considered trusted.
@@ -44,6 +49,7 @@ def authenticate(self, request, remote_user, shib_meta):
@staticmethod
def update_owner_params(user, params):
+ """Update owner params from Shibboleth."""
user.owner.auth_type = "Shibboleth"
if get_current_site(None) not in user.owner.sites.all():
user.owner.sites.add(get_current_site(None))
@@ -73,7 +79,10 @@ def update_owner_params(user, params):
class OIDCBackend(OIDCAuthenticationBackend):
+ """OIDC backend authentication."""
+
def create_user(self, claims):
+ """Create user connectd by OIDC."""
user = super(OIDCBackend, self).create_user(claims)
user.first_name = claims.get(OIDC_CLAIM_GIVEN_NAME, "")
@@ -93,6 +102,7 @@ def create_user(self, claims):
return user
def update_user(self, user, claims):
+ """Update OIDC user."""
user.first_name = claims.get(OIDC_CLAIM_GIVEN_NAME, "")
user.last_name = claims.get(OIDC_CLAIM_FAMILY_NAME, "")
user.save()
diff --git a/pod/authentication/populatedCASbackend.py b/pod/authentication/populatedCASbackend.py
index 99951db668..76cca6ddee 100644
--- a/pod/authentication/populatedCASbackend.py
+++ b/pod/authentication/populatedCASbackend.py
@@ -1,3 +1,5 @@
+"""Esup-Pod CAS & LDAP authentication backend."""
+
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
@@ -72,6 +74,7 @@
def populateUser(tree):
+ """Populate user form CAS or LDAP attributes."""
username_element = tree.find(
".//{http://www.yale.edu/tp/cas}%s" % AUTH_CAS_USER_SEARCH
)
@@ -130,6 +133,7 @@ def get_server():
def get_ldap_conn():
+ """Open and get LDAP connexion."""
try:
server = get_server()
conn = Connection(
@@ -145,6 +149,7 @@ def get_ldap_conn():
def get_entry(conn, username, list_value):
+ """Get LDAP entries."""
try:
conn.search(
AUTH_LDAP_USER_SEARCH[0],
@@ -256,6 +261,7 @@ def populate_user_from_entry(user, owner, entry):
def populate_user_from_tree(user, owner, tree):
+ """Populate user from CAS attributes."""
if DEBUG:
print_xml_tree(tree)
# Mail
@@ -307,6 +313,7 @@ def populate_user_from_tree(user, owner, tree):
def print_xml_tree(tree):
+ """Print XML tree for debug purpose."""
import xml.etree.ElementTree as ET
import xml.dom.minidom
import os
diff --git a/pod/authentication/tests/test_models.py b/pod/authentication/tests/test_models.py
index b1c667cbfe..e7e433a4ad 100644
--- a/pod/authentication/tests/test_models.py
+++ b/pod/authentication/tests/test_models.py
@@ -9,7 +9,6 @@
class OwnerTestCase(TestCase):
-
"""OwnerTestCase"""
def setUp(self):
@@ -34,7 +33,6 @@ def test_suppression_owner(self):
class AccessGroupTestCase(TestCase):
-
"""AcessGroupTestCase"""
def setUp(self):
diff --git a/pod/authentication/tests/test_populated.py b/pod/authentication/tests/test_populated.py
index 86279388af..92a0c881c6 100644
--- a/pod/authentication/tests/test_populated.py
+++ b/pod/authentication/tests/test_populated.py
@@ -1,4 +1,5 @@
"""test populated authentication."""
+
import random
from django.conf import settings
from django.test import TestCase, override_settings
diff --git a/pod/authentication/tests/test_utils.py b/pod/authentication/tests/test_utils.py
index 623f2d369f..84a1aeedd0 100644
--- a/pod/authentication/tests/test_utils.py
+++ b/pod/authentication/tests/test_utils.py
@@ -1,4 +1,5 @@
"""Test authentication utils."""
+
import json
from django.test import TestCase
diff --git a/pod/authentication/tests/test_views.py b/pod/authentication/tests/test_views.py
index f5f73022d6..2efe8071d7 100644
--- a/pod/authentication/tests/test_views.py
+++ b/pod/authentication/tests/test_views.py
@@ -2,6 +2,7 @@
* run with 'python manage.py test pod.authentication.tests.test_views'
"""
+
from django.test import TestCase
from django.test import Client
from django.contrib.auth.models import User
diff --git a/pod/authentication/views.py b/pod/authentication/views.py
index cbb22db662..2376b5c751 100644
--- a/pod/authentication/views.py
+++ b/pod/authentication/views.py
@@ -1,4 +1,5 @@
"""Authentication views."""
+
from django.http import HttpResponse
from django.shortcuts import render
from django.shortcuts import redirect
diff --git a/pod/bbb/forms.py b/pod/bbb/forms.py
index f668a840cb..69824b7b4e 100644
--- a/pod/bbb/forms.py
+++ b/pod/bbb/forms.py
@@ -1,3 +1,5 @@
+"""Esup-Pod BBB forms."""
+
from django import forms
from django.conf import settings
from .models import BBB_Meeting
diff --git a/pod/bbb/management/commands/bbb.py b/pod/bbb/management/commands/bbb.py
index fc956af8b9..7412b42194 100644
--- a/pod/bbb/management/commands/bbb.py
+++ b/pod/bbb/management/commands/bbb.py
@@ -44,6 +44,7 @@
/data/www/%userpod%/django_projects/podv3; source
/usr/bin/virtualenvwrapper.sh; workon django_pod; python manage.py bbb
main' """
+
import os
import traceback
from django.utils import translation
diff --git a/pod/bbb/models.py b/pod/bbb/models.py
index a379072cdf..aafd4e5d2a 100644
--- a/pod/bbb/models.py
+++ b/pod/bbb/models.py
@@ -229,10 +229,10 @@ class Livestream(models.Model):
)
# If the user wants to download the video of this meeting after the live
download_meeting = models.BooleanField(
- verbose_name=_("Save meeting in My videos"),
+ verbose_name=_("Save meeting in dashboard"),
help_text=_(
"Do you want to save the video of "
- 'this meeting, at the end of the live, directly in "My videos"?'
+ "this meeting, at the end of the live, directly in “Dashboard”?"
),
default=False,
)
@@ -241,8 +241,8 @@ class Livestream(models.Model):
verbose_name=_("Enable chat"),
help_text=_(
"Do you want a chat on the live page "
- "for students? Messages sent in this live page's chat will "
- "end up in BigBlueButton's public chat."
+ "for students? Messages sent in this live page’s chat will "
+ "end up in BigBlueButton’s public chat."
),
default=False,
)
diff --git a/pod/bbb/templates/bbb/list_meeting.html b/pod/bbb/templates/bbb/list_meeting.html
index c40cc2dc52..eed06c22a2 100644
--- a/pod/bbb/templates/bbb/list_meeting.html
+++ b/pod/bbb/templates/bbb/list_meeting.html
@@ -11,21 +11,17 @@
{% block breadcrumbs %}
{{ block.super }}
-
{% trans 'There are no BigBlueButton records.'%}
+{% trans 'There are no BigBlueButton records.'%}
{% else %} -+ {% trans "This is the list of current BigBlueButton sessions for which you are moderator. This module allows you to make a live stream from this BigBlueButton session (useful if there are more than 100 users)." %} + {% trans "Remember to not use breakout rooms in this case and end the meeting once it is over." %} +
+ {% blocktrans %}Shortly after clicking the “Perform a BigBlueButton live” button, and select the desired options, the live stream will be available to users on the Lives page.{% endblocktrans %} +
{% if records.paginator.count == 0 %} -{% trans 'There are no BigBlueButton sessions in progress.'%}
+{% trans 'There are no BigBlueButton sessions in progress.'%}
{% else %} {% include "bbb/live_record_list.html" %} {% endif %} - {% trans "Please note: this page refreshes automatically every 30 seconds." %} +{% trans "Please note: this page refreshes automatically every 30 seconds." %}
{% endblock page_content %} -{% block collapse_page_aside %} -{% endblock collapse_page_aside %} - -{% block page_aside %} -{% endblock page_aside %} +{% block collapse_page_aside %}{% endblock collapse_page_aside %} +{% block page_aside %}{% endblock page_aside %} {% block more_script %} - - + + + @@ -221,5 +221,5 @@{% trans "To delete the dressing, please check the box and click “Delete”." %}
+ +{% endblock page_content %} + +{% block collapse_page_aside %}{% endblock collapse_page_aside %} +{% block page_aside %}{% endblock page_aside %} diff --git a/pod/dressing/templates/dressing_edit.html b/pod/dressing/templates/dressing_edit.html new file mode 100644 index 0000000000..569fecf62e --- /dev/null +++ b/pod/dressing/templates/dressing_edit.html @@ -0,0 +1,81 @@ +{% extends 'base.html' %} +{% load i18n %} +{% load static %} +{% load tagging_tags %} +{% load thumbnail %} +{% block page_extra_head %} + +{% endblock page_extra_head %} + +{% block breadcrumbs %}{{ block.super }} +{% trans 'Title' %} | +{% trans 'Owners' %} | +{% trans 'Users' %} | +{% trans 'Allow to Groups' %} | +{% trans 'Watermark' %} | +{% trans 'Position' %} | +{% trans 'Opacity' %} | +{% trans 'Opening credits' %} | +{% trans 'Ending credits' %} | +{% trans 'Actions' %} | +|
---|---|---|---|---|---|---|---|---|---|---|
{{ dressing.title }} | ++ {% for owner in dressing.owners.all %} + + {% if owner.first_name %} + {{ owner.first_name }} {{ owner.last_name }} + {% else %} + {{ owner.username }} + {% endif %} + {% if not forloop.last %}, {% endif %} + {% empty %} + {% trans 'No owners' %} + {% endfor %} + | ++ {% for user in dressing.users.all %} + + {% if user.first_name %} + {{ user.first_name }} {{ user.last_name }} + {% else %} + {{ user.username }} + {% endif %} + {% if not forloop.last %}, {% endif %} + {% empty %} + {% trans 'No users' %} + {% endfor %} + | ++ {% for group in dressing.allow_to_groups.all %} + {{ group }}{% if not forloop.last %}, {% endif %} + {% empty %} + {% trans 'No groups' %} + {% endfor %} + | +
+ {% if dressing.watermark %}
+ |
+
+ {% if dressing.watermark %}
+ {{ dressing.get_position_display }}
+ {% else %}
+
+
+
+ {% endif %}
+ |
+
+ {% if dressing.watermark %}
+ {{ dressing.opacity }}
+ {% else %}
+
+
+
+ {% endif %}
+ |
+ + {% if dressing.opening_credits %} + {{ dressing.opening_credits }} + {% else %} + {% trans 'None' %} + {% endif %} + | ++ {% if dressing.ending_credits %} + {{ dressing.ending_credits }} + {% else %} + {% trans 'None' %} + {% endif %} + | ++ + | +|
{% trans 'No dressings found.' %} | +
- {% trans 'The fields “Start“ and “End“ must contain an indication value in seconds. Start playback of the video, pause the video and click on “Get time from the player“ to fill in the field untitled “Start“. Then do the same to fill in the field untitled “End“.' %} + {% trans 'The fields “Start” and “End” must contain an indication value in seconds. Start playback of the video, pause the video and click on “Get time from the player” to fill in the field untitled “Start”. Then do the same to fill in the field untitled “End”.' %}
{% trans 'You cannot overlap enrichments.' %}
{% trans 'You must save your enrichments to view the result.' %}
@@ -122,9 +87,29 @@{% trans 'Title' %} | -{% trans 'Type' %} | -{% trans 'Start' %} | -{% trans 'End' %} | -{% trans 'Actions' %} | -
---|---|---|---|---|
{{enrich.title}} | -{% if enrich.type %}{% trans enrich.type %}{% endif %} | -{{enrich.start}} | -{{enrich.end}} | -- - - | -
{% trans 'Title' %} | +{% trans 'Type' %} | +{% trans 'Start' %} | +{% trans 'End' %} | +{% trans 'Actions' %} | +
---|---|---|---|---|
{{enrich.title}} | +{% if enrich.type %}{% trans enrich.type %}{% endif %} | +{{enrich.start}} | +{{enrich.end}} | ++ + + | +
- {% trans "Access to adding external recording has been restricted. If you want to add external recordings on the platform, please" %} {% trans 'contact us' %} + {% url "contact_us" as contact_us %} + {% blocktrans with url=contact_us %}Access to adding external recording has been restricted. If you want to add external recordings on the platform, please contact us.{% endblocktrans %}
{% else %}