A growing number of studies seek to evaluate the impact of school closures during the ongoing COVID-19 pandemic. While most studies reported severe learning losses in students, some studies found positive effects of school closures on academic performance. However, it is still unclear which factors contribute to the differential effects observed in these studies. In this article, we examine the impact of assignment strategies for problem sets on the academic performance of students (n ≈ 16,000 from grades 4–10 who calculated ≈ 170,000 problem sets) in an online learning environment for mathematics, during the first and second period of pandemic-related school closures in Germany. We observed that, if teachers repeatedly assigned single problem sets (i.e., a small chunk of on average eight mathematical problems) to their class, students’ performance increased significantly during both periods of school closures compared to the same periods in the previous year (without school closures). In contrast, our analyses also indicated that, if teachers assigned bundles of problem sets (i.e., large chunks) or when students self-selected problem sets, students’ performance did not increase significantly. Moreover, students’ performance was generally higher when single problem sets were assigned, compared to the other two assignment types. Taken together, our results imply that teachers’ way of assigning problem sets in online learning environments can have a positive effect on students’ performance in mathematics.