While students can only learn the language they are exposed to, they don't learn everything they are taught, of course.
For learning to be successful, the language taught must be appropriate for their level of development.
Students learn a lot of language that they are not taught.