Skip to content

Commit

Permalink
Merge pull request #9 from hpi-schul-cloud/N21-1563-ldap-sync-multi-t…
Browse files Browse the repository at this point in the history
…eacher

N21-1563 changes generation of new teachers role
  • Loading branch information
arnegns authored Jan 5, 2024
2 parents 660531a + d568269 commit 7a82e1d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions generateLdif.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,15 @@ for (let schoolId = 0; schoolId < options.numberOfSchools; schoolId += 1) {
const r = Math.random();
if (r < 0.1 && admins.length < 10) { admins.push(user.dn); continue; }
if (r < 0.1 && ignored.length < 10) { ignored.push(user.dn); continue; }
if (r < 0.2 && substituteTeachers.length < 10) { substituteTeachers.push(user.dn); continue; }
if (r < 0.2) { teachers.push(user.dn); continue; }
if (r < 0.2) {
if (substituteTeachers.length < 10) {
substituteTeachers.push(user.dn);
} else {
teachers.push(user.dn);
}

continue;
}
students.push(user.dn);
}

Expand Down

0 comments on commit 7a82e1d

Please sign in to comment.