Skip to content

Commit

Permalink
Merge branch 'main' into BC-482-character-not-shown-properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaellinaresxk authored Sep 11, 2023
2 parents 0942c2c + ec32b27 commit 55f575b
Show file tree
Hide file tree
Showing 12 changed files with 107 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:

- name: Build and push ${{ github.repository }}
if: ${{ env.IMAGE_EXISTS == 0 }}
uses: docker/build-push-action@v4
uses: docker/build-push-action@v4.1.1
with:
build-args: |
SC_THEME_BUILD=${{ matrix.tenants }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
password: ${{ secrets.QUAY_TOKEN }}

- name: Build and push ${{ github.repository }}
uses: docker/build-push-action@v4
uses: docker/build-push-action@v4.1.1
with:
build-args: |
SC_THEME_BUILD=${{ matrix.tenants }}
Expand Down
21 changes: 8 additions & 13 deletions controllers/administration.js
Original file line number Diff line number Diff line change
Expand Up @@ -1737,17 +1737,15 @@ router.get(
$sort: 'lastName',
$limit: false,
});
const yearsPromise = getSelectOptions(req, 'years', { $limit: false });

const usersWithConsentsPromise = getUsersWithoutConsent(req, 'student', currentClass._id);

Promise.all([
classesPromise,
teachersPromise,
studentsPromise,
yearsPromise,
usersWithConsentsPromise,
]).then(([classes, teachers, students, schoolyears, allUsersWithoutConsent]) => {
]).then(([classes, teachers, students, allUsersWithoutConsent]) => {
const isAdmin = res.locals.currentUser.permissions.includes(
'ADMIN_VIEW',
);
Expand Down Expand Up @@ -1849,7 +1847,6 @@ router.get(
teachers,
students: filterStudents(res, students),
schoolUsesLdap: res.locals.currentSchoolData.ldapSchoolIdentifier,
schoolyears,
notes,
referrer: '/administration/classes/',
consentsMissing: usersWithoutConsent.length !== 0,
Expand Down Expand Up @@ -2101,16 +2098,14 @@ router.get(
const schoolYears = res.locals.currentSchoolData.years.schoolYears
.sort((a, b) => b.startDate.localeCompare(a.startDate));
const lastDefinedSchoolYear = (schoolYears[0] || {})._id;
const currentYear = res.locals.currentSchoolData.currentYear;

const currentYearObj = schoolYears.filter((year) => year._id === currentYear).pop();

const showTab = (req.query || {}).showTab || 'current';

const currentYear = res.locals.currentSchoolData.currentYear;
const upcomingYears = schoolYears
.filter((year) => year.startDate > currentYearObj.endDate);
.filter((year) => year.startDate > currentYear.endDate);
const archivedYears = schoolYears
.filter((year) => year.endDate < currentYearObj.startDate);
.filter((year) => year.endDate < currentYear.startDate);

let defaultYear;
switch (showTab) {
Expand All @@ -2123,7 +2118,7 @@ router.get(
break;
case 'current':
default:
query['year[$in]'] = [currentYear];
query['year[$in]'] = [currentYear._id];
break;
}

Expand All @@ -2138,7 +2133,7 @@ router.get(
},
{
key: 'current',
title: `${currentYearObj.name}`,
title: `${currentYear.name}`,
link: `/administration/classes/?showTab=current${filterQueryString}`,
}, {
key: 'archive',
Expand Down Expand Up @@ -2217,7 +2212,7 @@ router.get(
};

const years = schoolYears
.filter((year) => year.endDate < currentYearObj.startDate)
.filter((year) => year.endDate < currentYear.startDate)
.map((year) => [
year._id,
year.name,
Expand Down Expand Up @@ -2814,7 +2809,7 @@ router.use(
const [school, totalStorage, schoolMaintanance, consentVersions] = await Promise.all([
api(req).get(`/schools/${res.locals.currentSchool}`, {
qs: {
$populate: ['systems', 'currentYear', 'federalState'],
$populate: ['systems', 'federalState'],
$sort: req.query.sort,
},
}),
Expand Down
88 changes: 85 additions & 3 deletions helpers/content/tutorials.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,18 @@
},
{
"id": "21921821",
"title": "Kurse duplizieren (klonen)",
"title": "Kurse kopieren (klonen)",
"type": "article"
},
{
"id": "39387173",
"title": "Kurse teilen und importieren",
"type": "article"
},
{
"id": "178658305",
"title": "Kurse sortieren",
"type": "article"
}
]
},
Expand All @@ -71,6 +76,16 @@
"id": "13828893",
"title": "Themen teilen und importieren",
"type": "article"
},
{
"id": "246055834",
"title": "Themen kopieren",
"type": "article"
},
{
"id": "270827606",
"title": "Spalten-Board",
"type": "article"
}
]
},
Expand Down Expand Up @@ -103,6 +118,16 @@
"id": "13829061",
"title": "Aufgaben abgeben",
"type": "article"
},
{
"id": "246055003",
"title": "Aufgaben kopieren",
"type": "article"
},
{
"id": "254476906",
"title": "Aufgaben teilen",
"type": "article"
}
]
},
Expand All @@ -126,15 +151,30 @@
"title": "An Videokonferenzen teilnehmen",
"type": "article"
},
{
"id": "170594138",
"title": "In Videokonferenzen präsentieren",
"type": "article"
},
{
"id": "113653222",
"title": "Videokonferenzen moderieren",
"type": "article"
},
{
"id": "170596102",
"title": "Technische Probleme während Videokonferenzen",
"type": "article"
},
{
"id": "123409850",
"title": "Umfragen in Videokonferenzen",
"type": "article"
},
{
"id": "215516270",
"title": "Externe Personen in Videokonferenzen",
"type": "article"
}
]
},
Expand All @@ -155,6 +195,12 @@
"title": "Texteditor",
"type": "category",
"articles": []
},
{
"id": "148537453",
"title": "Bettermarks",
"type": "category",
"articles": []
}
]
},
Expand Down Expand Up @@ -213,7 +259,12 @@
"articles": [
{
"id": "98598995",
"title": "Browser konfigurieren",
"title": "Browser konfigurieren mit Windows",
"type": "article"
},
{
"id": "170593514",
"title": "Browser konfigurieren mit mac OS/OS X",
"type": "article"
},
{
Expand All @@ -226,6 +277,11 @@
"title": "Teams für Schüler:innen aktivieren",
"type": "article"
},
{
"id": "223674916",
"title": "Teams bearbeiten Verwaltung",
"type": "article"
},
{
"id": "113640783",
"title": "Moodle-Hinweise für Schulen",
Expand Down Expand Up @@ -260,6 +316,26 @@
"id": "123407609",
"title": "E-Mail-Adressen ungültig machen (Schulwechsel)",
"type": "article"
},
{
"id": "154188767",
"title": "Schulweit Sprache ändern",
"type": "article"
},
{
"id": "196739599",
"title": "Migrationsprozess",
"type": "article"
},
{
"id": "236650836",
"title": "Migrationsprozess in der dBildungscloud",
"type": "article"
},
{
"id": "246055610",
"title": "Externe Tools anbinden und verwalten",
"type": "article"
}
]
},
Expand Down Expand Up @@ -359,7 +435,7 @@
},
{
"id": "130778703",
"title": "Sprache ändern",
"title": "Sprache ändern / Change language / Cambiar idioma",
"type": "article"
}
]
Expand Down Expand Up @@ -409,6 +485,12 @@
"title": "Schuljahreswechsel",
"type": "category",
"articles": []
},
{
"id": "214237489",
"title": "Dateien in Nextcloud",
"type": "category",
"articles": []
}
]
}
Expand Down
1 change: 1 addition & 0 deletions locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@
"activeMatrixFunction": "Matrix Messenger aktivieren",
"afterTheTransferPhaseEnded": "Nach Beenden der Transferphase",
"allStudentsVisibility": "Die Aktivierung dieser Option hat datenschutzrechtlich eine hohe Schwelle. Um die Sichtbarkeit aller Schüler:innen der Schule für jede Lehrkraft zu aktivieren, ist es erforderlich, dass jede/r Schüler:in wirksam in diese Datenverarbeitung eingewilligt hat.",
"allStudentsVisibilityBrandenburg": "Die Aktivierung dieser Option schaltet die Sichtbarkeit aller Schüler:innen der Schule für jede Lehrkraft an.",
"authentication": "Authentifizierung",
"newPage": "Zur neuen Admin-Seite",
"changeOfClasses": "Änderung von Klassen/neue Klassen",
Expand Down
1 change: 1 addition & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@
"activeMatrixFunction": "Activate Matrix Messenger",
"afterTheTransferPhaseEnded": "After the transfer phase has ended",
"allStudentsVisibility": "Activating this option has a high threshold under data protection law. In order to activate the visibility of all students in the school for each teacher, it is necessary that each student has effectively consented to this data processing.",
"allStudentsVisibilityBrandenburg": "Enabling this option turns on the visibility of all students of this school for each teacher.",
"authentication": "Authentication",
"newPage": "To the new admin page",
"changeOfClasses": "Change of classes / new classes",
Expand Down
1 change: 1 addition & 0 deletions locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@
"activeMatrixFunction": "Activar Matrix Messenger",
"afterTheTransferPhaseEnded": "Una vez finalizada la fase de transferencia",
"allStudentsVisibility": "La activación de esta opción tiene un nivel alto según la ley de protección de datos. Para activar la visibilidad de todos los alumnos de la escuela para cada profesor, es necesario que cada alumno haya dado su consentimiento de manera efectiva para este tratamiento de datos.",
"allStudentsVisibilityBrandenburg": "Activando esta opción se activa la visibilidad de todos los alumnos de esta escuela para cada profesor.",
"authentication": "Autenticación",
"newPage": "A la nueva página de administración",
"changeOfClasses": "Cambio de clases / nuevas clases",
Expand Down
3 changes: 2 additions & 1 deletion locales/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,8 @@
"label": {
"activeChatFunction": "Активувати функцію чату",
"afterTheTransferPhaseEnded": "Після завершення фази переходу",
"allStudentsVisibility": "Активація цього варіанта має високий поріг згідно із законодавством про захист даних. Щоб активувати видимість усіх учнів у школі для кожного викладача, необхідно, щоб кожен учень дав фактичну згоду на таку обробку даних.",
"allStudentsVisibility": "Активація цієї опції має високе граничне значення згідно із законодавством про захист даних. Щоб активувати видимість усіх учнів у школі для кожного викладача, необхідно, щоб кожен учень надав свою фактичну згоду на таку обробку даних.",
"allStudentsVisibilityBrandenburg": "Увімкнення цієї опції вмикає видимість всіх учнів цієї школи для кожного вчителя.",
"authentication": "Аутентифікація",
"changeOfClasses": "Зміна класів / нові класи",
"changeOfUserData": "Зміна даних користувача / нові користувачі",
Expand Down
1 change: 0 additions & 1 deletion static/scripts/administration.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ $(document).ready(() => {
const $addPolicyModal = $('.add-modal--policy');
const $editModal = $('.edit-modal');
const $invitationModal = $('.invitation-modal');
const $importModal = $('.import-modal');
const $deleteSystemsModal = $('.delete-modal');
const $deleteRSSModal = $('.delete-modal--rss');

Expand Down
23 changes: 0 additions & 23 deletions static/scripts/administration/classes/manage.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import printQRs from '../../helpers/printQRs';

/* globals populateModalForm */

window.addEventListener('load', () => {
document
.getElementById('filter_schoolyear')
Expand Down Expand Up @@ -31,27 +29,6 @@ window.addEventListener('load', () => {
}
});

const $importModal = $('.import-modal');

$importModal.find('.btn-submit').on('click', async (event) => {
event.preventDefault();
const selections = $('#student_from_class_import')
.val();
const requestUrl = `/administration/classes/students?classes=${encodeURI(
JSON.stringify(selections),
)}`;
$importModal.modal('hide');
const res = await fetch(requestUrl, {
credentials: 'same-origin',
});
const students = await res.json();
students.forEach((student) => {
document.querySelector(
`option[value="${student._id}"]`,
).selected = true;
});
});

function btnSendLinksEmailsHandler(e) {
e.preventDefault();
const $this = $(this);
Expand Down
28 changes: 0 additions & 28 deletions views/administration/forms/form-classes-manage.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -126,32 +126,4 @@
</div>
</div>

{{#embed "lib/components/modal-form" class="import-modal"}}
{{#content "fields"}}

<div class="form-group">
<label for="filter_schoolyear">{{$t "administration.classes.label.filterBySchoolYear" }}</label>
<select id="filter_schoolyear" name="classes" data-placeholder="{{$t "administration.classes.label.filterBySchoolYear" }}">
<option value="" selected>{{$t "administration.classes.label.all" }}</option>
{{#each schoolyears}}
<option value="{{this._id}}">
{{this.name}}
</option>
{{/each}}
</select>
<p>{{$t "administration.classes.text.attentionIfYouChangeTheSchoolYear" }}</p>
</div>
<div class="form-group">
<label for="student_from_class_import">{{$t "administration.classes.label.addStudentFromPreviousYearClass" }}</label>
<select id="student_from_class_import" name="classes" multiple data-placeholder="{{$t "administration.global.placeholder.selectOldClasses" }}">
{{#each classes}}
<option value="{{this._id}}" {{#if this.selected}}selected{{/if}}>
{{this.displayName}}
</option>
{{/each}}
</select>
</div>
{{/content}}
{{/embed}}

{{#embed "lib/components/modal-cancel" class="cancel-modal"}}{{/embed}}
8 changes: 7 additions & 1 deletion views/administration/school.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,13 @@
<input type="checkbox" name="studentVisibility" value="true"
{{#if ../school.permissions.teacher.STUDENT_LIST}}checked{{/if}}>
{{$t "administration.school.label.studentVisibility" }} <i class="fa fa-eye"></i>
<p class="text-muted">{{$t "administration.school.label.allStudentsVisibility" }}</p>
<p class="text-muted">
{{#ifeq @root.theme.name "brb"}}
{{$t "administration.school.label.allStudentsVisibilityBrandenburg" }}
{{else}}
{{$t "administration.school.label.allStudentsVisibility" }}
{{/ifeq}}
</p>
</label>
</div>
{{/ifConfig}}
Expand Down

0 comments on commit 55f575b

Please sign in to comment.