Skip to content

Commit d754d60

Browse files
committed
tech(api): remove seeds orga withOrganizationLearners boolean
1 parent 93fb20a commit d754d60

6 files changed

+39
-12
lines changed

api/db/seeds/data/common/tooling/organization-tooling.js

+5-8
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ async function createOrganization({
6464
features = [],
6565
configOrganization,
6666
parentOrganizationId,
67-
withOrganizationLearners = true,
6867
}) {
6968
organizationId = _buildOrganization({
7069
databaseBuilder,
@@ -109,13 +108,11 @@ async function createOrganization({
109108
features,
110109
});
111110

112-
if (withOrganizationLearners) {
113-
_buildOrganizationLearners({
114-
databaseBuilder,
115-
organizationId,
116-
configOrganization,
117-
});
118-
}
111+
_buildOrganizationLearners({
112+
databaseBuilder,
113+
organizationId,
114+
configOrganization,
115+
});
119116

120117
await databaseBuilder.commit();
121118
return { organizationId };

api/db/seeds/data/common/tooling/session-tooling.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import _ from 'lodash';
22

3+
import { SESSIONS_VERSIONS } from '../../../../../src/certification/shared/domain/models/SessionVersion.js';
34
import { Assessment } from '../../../../../src/shared/domain/models/Assessment.js';
45
import {
56
CLEA_COMPLEMENTARY_CERTIFICATION_ID,
@@ -381,6 +382,7 @@ async function createPublishedScoSession({
381382
juryCommentAuthorId,
382383
juryCommentedAt,
383384
invigilatorPassword,
385+
version: SESSIONS_VERSIONS.V3,
384386
});
385387
databaseBuilder.factory.buildFinalizedSession({
386388
sessionId,

api/db/seeds/data/team-certification/create-pro-organization-with-certif-center.js

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ async function _createProOrganization({ databaseBuilder }) {
4444
configOrganization: {
4545
learnerCount: 8,
4646
},
47-
withOrganizationLearners: false,
4847
});
4948
}
5049

api/db/seeds/data/team-certification/create-sco-organization-managing-agri-student-with-fregata.js

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ async function _createScoOrganization({ databaseBuilder }) {
4343
learnerCount: 8,
4444
},
4545
tagIds: [COLLEGE_TAG.id],
46-
withOrganizationLearners: false,
4746
});
4847
}
4948

api/db/seeds/data/team-certification/create-sco-organization-managing-student-with-siecle.js

+32-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,38 @@ import {
1313
export async function scoOrganizationManaginStudentsWithSiecle({ databaseBuilder }) {
1414
await _createScoOrganization({ databaseBuilder });
1515
await _createScoCertificationCenter({ databaseBuilder });
16+
17+
const sessionDate = new Date();
18+
await tooling.session.createPublishedScoSession({
19+
databaseBuilder,
20+
sessionId: 19999,
21+
certificationCenterId: SCO_CERTIFICATION_CENTER_ID,
22+
organizationId: SCO_MANAGING_STUDENTS_ORGANIZATION_ID,
23+
accessCode: 'SCOS34',
24+
address: '1 rue Certification sco',
25+
certificationCenter: 'Centre de certification sco managing students',
26+
date: sessionDate,
27+
description: 'une description',
28+
examiner: 'Un super examinateur',
29+
room: '42',
30+
time: '12:00',
31+
examinerGlobalComment: 'Session sans pb',
32+
hasIncident: false,
33+
hasJoiningIssue: false,
34+
createdAt: sessionDate,
35+
finalizedAt: sessionDate,
36+
resultsSentToPrescriberAt: sessionDate,
37+
publishedAt: sessionDate,
38+
assignedCertificationOfficerId: null,
39+
juryComment: '',
40+
juryCommentAuthorId: null,
41+
juryCommentedAt: sessionDate,
42+
configSession: {
43+
learnersToRegisterCount: 8,
44+
maxLevel: 3,
45+
sessionDate,
46+
},
47+
});
1648
}
1749

1850
async function _createScoOrganization({ databaseBuilder }) {
@@ -43,7 +75,6 @@ async function _createScoOrganization({ databaseBuilder }) {
4375
learnerCount: 8,
4476
},
4577
tagIds: [COLLEGE_TAG.id],
46-
withOrganizationLearners: false,
4778
});
4879
}
4980

api/db/seeds/data/team-certification/create-sco-organization-not-managing-students.js

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ async function _createScoOrganization({ databaseBuilder }) {
4343
learnerCount: 8,
4444
},
4545
tagIds: [COLLEGE_TAG.id],
46-
withOrganizationLearners: false,
4746
});
4847
}
4948

0 commit comments

Comments
 (0)