Merge branch 'master' into develop

This commit is contained in:
Enno Rehling 2018-10-07 08:24:24 +02:00
commit 53f2564eca
1 changed files with 3 additions and 3 deletions

View File

@ -81,13 +81,13 @@ void autostudy_run(scholar scholars[], int nscholars)
int mint;
ts += scholars[se].u->number; /* count total scholars */
mint = (ts + 10) / 11; /* need a minimum of ceil(ts/11) teachers */
for (; mint > tt && si != nscholars; ++si) {
for (; mint > tt && si != nscholars && scholars[si].sk == sk; ++si) {
tt += scholars[si].u->number;
}
}
/* now si splits the teachers and students 1:10 */
/* first student must be 2 levels below first teacher: */
for (; si != se && scholars[ti].level - TEACHDIFFERENCE > scholars[si].level; ++si) {
for (; si != se && scholars[ti].level - TEACHDIFFERENCE > scholars[si].level && scholars[si].sk == sk; ++si) {
tt += scholars[si].u->number;
}
if (si == se) {
@ -134,7 +134,7 @@ void autostudy_run(scholar scholars[], int nscholars)
learning(scholars + s, (n - i));
i = 0;
if (++s == se) {
continue;
break;
}
n = scholars[s].u->number;
} while (scholars[t].level - TEACHDIFFERENCE < scholars[s].level);