We explored a theoretical model of relations between students’ perceptions of emotional support, numeracy, and assessment for learning and their perceptions of relevance of schoolwork, motivation, persistence, and mastery experiences. We also investigated possible differences between students in lower- and upper secondary school. Participants were 44 702 students in 8th to 13th grade in Norway. The data was analyzed by means of structural equation modeling. The results revealed moderate to strong correlations between the three aspects of the learning environment. In general, they related positively to the outcome variables. However, the relations were almost entirely mediated through relevance and motivation. The present study adds to our understanding of how to work with the learning environment.