Chapka's suggestion of moot is a good one, because it doesn't carry any connotation that the speaker prefers either option (eating in the classroom, or leaving the classroom to eat), as OP mentioned in a comment. As far as I can tell, the OP is asking for:
- [Action] makes it so that [subject] can do A or B, with no clearly stated preference for either option
- [Action] makes it so that [subject] is more likely to/must/will be inclined to select B over A in the future
Moot does indeed accomplish this; however, since it does require restructuring the sentence a bit, I offer what first popped into my head when I read the sample sentence:
Allowing the students to eat in the classroom prevents them from having to leave the class [so as] to eat.
Note other minor changes: classroom is the place they eat, not the class: you can either say in the classroom or in class (the state of being in class, not an actual physical location), but not in the class, in this case. The "so as" is grammatically acceptable, but not really necessary; it just makes the sentence sound more formal.
Now, as for the actual word suggestion: prevents [noun] from having to. All parts of the construction are required; prevents by itself means that they are no longer able to eat outside the classroom now that they can eat within it (option 2 above, which I believe you are not looking for). To fall in line with option 1, we add from having to, which gives the students free choice.
Before, students could only eat outside the classroom [perform action A].
Now, students have free choice to eat either inside or outside of the classroom [perform action A] or [perform action B].
Allowing them to choose either option prevents them from having to (alternately: makes it so they are no longer required to) [perform action A].
Of course, you do want at least some of the students to eat inside the classroom, or you would have no reason to propose this change in the first place. But you now have a neutral way to express this, without letting your opinion be known.