Students learn in short iterations, just beyond their current knowledge or comfort level. When they make that small step forward, they are ready for the next iteration, which is again just beyond their current level. Taken all together, they can move well beyond where they started. This allows students all at levels to thrive.
To do this create teams of students, who choose their own goals and a context for these goals (within the guidelines of the class). Students can then explore small aspects of their bigger objective, increasingly building their knowledge as they work and reflect. Encourage students to learn from each other before asking the teacher for help and guidance.