Merge remote-tracking branch 'origin/dev-1.1-patch-1' into development

This commit is contained in:
anhefti 2021-05-18 09:35:07 +02:00
commit a9fef7d136

View file

@ -168,8 +168,13 @@ public interface LmsAPIService {
quizzes.subList(start, end));
}
final int mod = quizzes.size() % pageSize;
return new Page<>(
(quizzes.size() <= pageSize) ? 1 : quizzes.size() / pageSize + 1,
(quizzes.size() <= pageSize)
? 1
: (mod > 0)
? quizzes.size() / pageSize + 1
: quizzes.size() / pageSize,
pageNumber,
sortAttribute,
quizzes.subList(start, end));