Skip to content

Commit

Permalink
Merge branch 'bc-6609-grading-parenttype-migration' of github.com:hpi…
Browse files Browse the repository at this point in the history
…-schul-cloud/schulcloud-client into bc-6609-grading-parenttype-migration
  • Loading branch information
dyedwiper committed Mar 20, 2024
2 parents d2d7e8a + 3345301 commit eba2fd5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions controllers/administration.js
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ router.get(
'/teachers/:id/edit',
permissionsHelper.permissionsChecker(['ADMIN_VIEW', 'TEACHER_EDIT'], 'or'),
(req, res, next) => {
const userPromise = api(req).get(`users/admin/teachers/${req.params.id}`);
const userPromise = api(req, { version: 'v3' }).get(`users/admin/teachers/${req.params.id}`);
const classesPromise = getSelectOptions(req, 'classes', {
$populate: ['year'],
$sort: 'displayName',
Expand Down Expand Up @@ -1119,7 +1119,7 @@ router.get(
'/students/:id/skipregistration',
permissionsHelper.permissionsChecker('STUDENT_SKIP_REGISTRATION'),
(req, res, next) => {
api(req).get(`/users/admin/students/${req.params.id}`)
api(req, { version: 'v3' }).get(`/users/admin/students/${req.params.id}`)
.then((user) => {
res.render('administration/users_skipregistration', {
title: res.$t('administration.controller.link.toGiveConsent'),
Expand Down Expand Up @@ -1165,7 +1165,7 @@ router.get(
$skip: itemsPerPage * (currentPage - 1),
};
query = Object.assign(query, filterQuery);
api(req)
api(req, { version: 'v3' })
.get('/users/admin/students', {
qs: query,
})
Expand Down Expand Up @@ -1288,13 +1288,14 @@ const getUsersWithoutConsent = async (req, roleName, classId) => {
const batchSize = 50;
while (users.length > 0) {
usersWithMissingConsents.push(
...(await api(req).get('/users/admin/students', {
...(await api(req, { version: 'v3' }).get('/users/admin/students', {
qs: {
users: users
.splice(0, batchSize)
.map((u) => u._id),
consentStatus: ['missing', 'parentsAgreed'],
consentStatus: { $in: ['missing', 'parentsAgreed'] },
$limit: batchSize,
$sort: { 'lastName': 1},
},
})).data,
);
Expand Down Expand Up @@ -1400,7 +1401,7 @@ router.get(
'/students/:id/edit',
permissionsHelper.permissionsChecker(['ADMIN_VIEW', 'STUDENT_EDIT'], 'or'),
(req, res, next) => {
const userPromise = api(req).get(`/users/admin/students/${req.params.id}`);
const userPromise = api(req, { version: 'v3' }).get(`/users/admin/students/${req.params.id}`);
const accountPromise = api(req, { json: true, version: 'v3' })
.get('/account', {
qs: { type: 'userId', value: req.params.id },
Expand Down
2 changes: 1 addition & 1 deletion static/scripts/topicEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ class TopicH5P extends TopicBlock {
const { parentType, parentId } = this.props;

const editorPopup = window.open(
`/h5p/editor/${id ?? ''}?parentType=${parentType}&parentId=${parentId}&inline=1`,
`/h5p/editor/${id ?? 'new'}?parentType=${parentType}&parentId=${parentId}&inline=1`,
'h5p-editor',
`width=${w}, height=${h}, left=${x}, top=${y},
fullscreen=yes, toolbar=no, location=no, directories=no, status=no, scrollbars=yes, resizable=yes`,
Expand Down

0 comments on commit eba2fd5

Please sign in to comment.