Puzzles are only collected when a student successfully completes a level. When a student runs out of JiJis, they are taken back to the beginning of the level without collecting puzzles.
Students only collect puzzles when they play an orange level. If they play a level that has a green checkmark on it, they will not earn any new puzzles.