After years of assigning the kind of homework she had done as a student and observing students’ disengagement with it, a teacher overhauled how she assigns math practice.