Classroom education has public good aspects. The technology is such that when one student disrupts the class, learning is reduced for all other students. A disruption model of educational production is presented. It is shown that optimal class size is larger for better-behaved students, which helps explain why it is difficult to find class size effects in the data. Additionally, the role of discipline is analyzed and applied to differences in performance of Catholic and public schools. An empirical framework is discussed where the importance of sorting students, teacher quality, and other factors can be assessed.