Introduction

Research interest in school well-being has increased in recent years, as there is both theoretical and empirical evidence of its importance in the learning process at school (Choi, 2018; OECD, 2015, 2018). The promotion of school well-being is considered a pedagogical goal across all types of schools (e.g., Choi, 2018; Schürer et al., 2021). In particular, positive attitudes toward school – as a dimension of school well-being – play an important role, since this aspect is strongly related to students’ motivation, willingness to make an effort, and acquisition of knowledge (e.g., Borgonovi & Pál, 2016; Longobardi et al., 2021; Thornberg et al., 2022). However, there is evidence that school well-being decreases over the course of a students’ school career. A differentiated investigation of the dimensions of school well-being shows that positive attitudes toward school are particularly affected over time (Hascher & Hagenauer, 2011a; Kleinkorres et al., 2023; Obermeier & Gläser-Zikuda 2022). To counteract this decline, it is necessary to gain a more precise understanding of the aspects that exacerbate or inhibit it. Since data collected in schools has a nested structure (students in classes, classes in schools), it is particularly relevant to consider the topic from a multi-level analytical perspective.

According to self-determination theory (e.g., Deci & Ryan, 1993, 2012), school well-being – and thus also positive attitudes of students – can be fostered by satisfying the basic human needs for autonomy, competence, and social relatedness. High-quality teaching can contribute to the satisfaction of these needs (Chen & Lu, 2022; Govorova et al., 2020; Hascher & Hagenauer, 2011b; Kanonire et al., 2020; Obermeier, 2021; Obermeier et al., 2022). With regard to teaching quality, classroom management can be emphasized in particular, as it promotes, among other things, the effective use of learning time as well as social interactions (Longobardi et al., 2021; Seidel, 2020). Both aspects are highly relevant to the satisfaction of basic human needs in the learning context (Self-determination theory (SDT), Deci & Ryan, 2012). While high-quality classroom management promotes primarily students’ feelings of autonomy and competence (Furrer et al., 2014), social relationships (teacher-student relationships and peer relationships) enable satisfaction of the basic human need for social relatedness (Furrer et al., 2014). Positive relations with teachers and peers – characterized by (emotional) support and mutual respect – are conducive to enhancing students' emotional experiences (e.g., Borgonovi & Pál, 2016; García-Moya et al., 2015). Thus, both classroom management and social relationships have proved to be beneficial in nurturing positive attitudes toward school (Borgonovi & Pál, 2016; Raufelder & Kulakow, 2021).

Additionally, the two constructs are related to each other, since some studies have found positive effects of effective classroom management on social relationships in class (e.g., Longobardi et al., 2021). These findings that classroom management affects both positive attitudes and social relations imply that the effect of perceived classroom management could be mediated by social relations. To our knowledge, however, this has not yet been investigated. Another aspect that has been neglected is that within one class or school, students tend to share their assessments of their lessons and the social relationships with teachers and peers. While positive effects of student-perceived teacher-student relationships on positive attitudes of students have already been shown to be significant at the individual and class level (Schürer et al., 2021), there is no research concerning such effects of aggregated student perceptions of peer relationships. Peer relationships are an important source of social support that help students to meet academic needs and maintain a positive attitude toward school (Knapp et al., 2019; Wentzel, 2017). We assume that peer relationships also have a nested structure and that students within one class or school share their assessments with their classmates. However, effects have so far been studied only at an individual level, although it can be assumed that the aggregated assessment of peer relationships – and the associated class climate – also have an effect on the attitudes of individual students (Borgonovi & Pál, 2016; Raufelder & Kulakow, 2021).

The school types in the vocational education system, in particular, have rarely been examined with regard to the aspects mentioned above. The current study aimed to generate initial evidence regarding possible mediation of the relationship between classroom management and students’ positive attitudes toward school, by means of teacher-student relationships and peer relationships. By calculating a model with two levels of analysis (individual and school level), the nested data structure was taken into account, correlations between the individual and the aggregated perceptions of classroom management and social relationships of the students and their correlations with the students positive attitudes were analyzed.

Positive attitudes toward school

The well-being of students at school is important for a successful learning process (Froiland et al., 2019; Huebner & Gilman, 2007; Li, 2021; Putwain et al., 2020). A high level of school well-being furthermore supports personal development, and is associated with better physical and mental health (García-Moya et al., 2015; Hascher & Winkler-Ebner, 2010). It also reduces truancy, refusal to go to school, and dropping out of school (Morinaj & Hascher, 2019), as students feel more connected to school and educational institutions in general.

Students’ positive attitudes toward school are not only a core element of school-related well-being, but are also regarded as the main cognitive dimension of satisfaction with school. In terms of Pekrun’s (2006) control-value theory, it can be assumed that the subjective value or significance of a situation, some content, or an entire context influences the genesis of emotions, and thus an individual’s socio-emotional experiences in that context. Accordingly, positive attitude as a measure of the subjective significance of school for individual students, is a central factor regarding their perception of the context, which has far-reaching consequences for the assessment of quality of life, school adjustment, and school performance (Diener et al., 1999; Huebner & Gilman, 2007; Longobardi et al., 2021). However, it is known from longitudinal studies that students’ positive attitudes toward school are subject to a decline throughout the academic career (Hascher & Hagenauer, 2011a; Kleinkorres et al., 2023; Obermeier & Gläser-Zikuda 2022).

Positive attitudes toward school differ among students of different genders, and those with or without a migration background. For example, some studies report that girls have a more positive attitude toward school than boys (Hascher & Hagenauer, 2020; Obermeier & Gläser-Zikuda 2022; Schürer et al., 2021). With regard to students with a migration background, results are inconsistent, since it has been found that they appear to have more (Hascher & Hagenauer, 2020; Schürer et al., 2021) or less positive attitudes toward school than their native peers (Obermeier & Gläser-Zikuda 2022; Schürer et al., 2021).

Students’ positive attitudes toward school are influenced by a large number of different determinants, in combination with each other (e.g., Hascher et al., 2018). In the school context, process characteristics of teaching quality and classroom management have been emphasized (as discussed in Sect. 1). Positive social relationships with teachers and with classmates (peers) are also considered to be important factors that influence students’ attitudes toward school (Borgonovi & Pál, 2016; Raufelder & Kulakow, 2021; Schürer et al., 2021). However, multi-level and mediation-analyses regarding the correlations between all those aspects are rare.

Classroom management as a characteristic of teaching quality

Classroom management is a central issue in educational research and can be defined as “the action teachers take to create an environment that supports and facilitates both academic and social-emotional learning” (Evertson & Weinstein, 2006, p. 4). It is understood as one of three generic basic dimensions of teaching quality besides cognitive activation and learning support (Praetorius et al., 2018). After Kounin’s (2006) research shaped the field for many years by focusing on the techniques of classroom management, the term has since been considered from various perspectives. Thus, today, classroom management is a broad term that includes a range of different aspects of teaching practice. In this study, classroom management was operationalized by using items concerning the management of learning time and disruptions, as well as the degree of structure and organization of teaching and learning processes by the teacher, which corresponds with several other existing conceptualizations (Helmke, 2014b; Helmke & Weinert, 1997; Pianta & Hamre, 2009; Praetorius et al., 2018; Schönbächler, 2006; Seidel, 2020; Seidel & Shavelson, 2007; Thiel, 2016).

The perception of classroom management practices is closely related to students’ interests, emotions, and performance (Chen & Lu, 2022; Kunter et al., 2007), as it engenders feelings of competence, autonomy, and social relatedness. These feelings can be characterized as basic human needs whose satisfaction is associated with positive motivational and affective outcomes (SDT, Deci & Ryan, 2012). The quality of classroom management depends largely on whether teachers are able to build positive relationships with their students, and improve social interaction between students (Marzano et al., 2003). It can be theoretically assumed that other characteristics of classroom management (e.g., managing learning time, monitoring learning processes, etc.) support the creation of positive teacher-student relationships. Furthermore, if the effective learning time for the students is high – due to appropriate management by the teacher, then the students can build up more skills in the classroom that are, in turn, related to student satisfaction with, and positive attitudes toward school (Helmke, 2014a, b; Schürer et al., 2021).

Social relationships in school

Social relationships with teachers and peers are an important social resource in the school context (Kleinkorres et al., 2023; Knapp et al., 2019; Raufelder & Kulakow, 2021), which influence the experience of positive emotions for students, and their satisfaction with school (Choi, 2018; Jiang et al., 2013; Knapp et al., 2019; Kröske, 2020; Rathmann et al., 2018). As previously mentioned, social relationships enable the satisfaction of the basic human needs for social relatedness, autonomy, and competence (Deci & Ryan, 2012; Furrer et al., 2014; Schürer et al., 2021).

Social relationships in school are related to classroom management, since it has been shown that effective classroom management has positive effects on the pro-social behavior of students (Evertson & Weinstein, 2006; Kröske, 2020; Seidel & Shavelson, 2007). By reinforcing positive behaviors and supporting students’ conflict management, peer relationships can benefit from good classroom management (Chen et al., 2020; Longobardi et al., 2021). Additionally, teacher-student relationships are promoted by higher learning effectiveness that results from effective classroom management (Fauth et al., 2019; Hattie, 2023),

Teacher-student relationships

According to Nickel’s (1976) transactional model, the teacher-student relationship refers to “dynamic interactions […] [that] are determined by multiple cognitive and emotional patterns and processes” (Hagenauer & Raufelder, 2020, p. 6). As a dyadic social process, it encompasses both the ongoing interaction between a student and a teacher, as well as reciprocal feelings or affect, and an aggregated assessment of the shared relationship by both parties. Positive relationships between teachers and students are characterized by, among other things, emotional warmth, fairness, affection, and connectedness, as well as an equally positive assessment of the relationship by the teacher and the student (Robinson, 2022).

Positive relationships between students and teachers represent a resource for coping with stress (Choi et al., 2019; García-Moya et al., 2015; Løhre et al., 2010; Santana-Monagas et al., 2022). Hagenauer & Raufelder (2020) summarize various findings on the effect of a positive teacher-student relationship, and also mention its influence on school adjustment as a measure of the students’ fit with the school environment. A connection between the teacher-student relationship and positive attitudes of students toward school has also been demonstrated (Jiang et al., 2013; Schürer et al., 2021). Various studies additionally show the importance of the quality of teacher-student relationships regarding motivation, as well as the social and emotional development of students (Froiland et al., 2019; García-Moya et al., 2015; García-Rodríguez et al., 2023; Knierim et al., 2016; Lei et al., 2017; Robinson, 2022; Schlesier et al., 2023).

Students who rate their relationship with their teachers as a positive one also show higher levels of school engagement (Roorda et al., 2011). Additionally, correlations have been established between positive interactions with teachers and various dimensions of school well-being (García-Moya et al., 2015; Lera et al., 2023; Li, 2021; OECD, 2018). In their systematic review, García-Rodríguez et al. (2023) summarize findings that specifically point to a connection between positive teacher-student relationships and ‘school liking’, while Kiuru and colleagues (2020) report negative effects of students’ conflicts with teachers on their school well-being.

The relationship with teachers can also influence the social experiences students have with their peers (Chen et al., 2020). Such effects appear to differ in relation to the gender of the students, since Liu et al. (2016) found that gender moderated the correlation between school satisfaction and teacher-student relationships. Lui et al. (2016) also found that teacher support was more significant for girls in terms of school satisfaction, than for boys.

Peer relationships

Building and maintaining relationships with peers can be seen as a developmental task of adolescence (Eschenbeck & Lohaus, 2022). Peers are important companions who provide support in solving problems, offer recognition and emotional support, and promote identity development (Wentzel, 2017). In the current study, positive peer relationships are operationalized by the extent of helpfulness and support that students show each other. Belonging to, and identifying with a social group determines a variety of aspects relevant to learning, such as academic self-concept, motivation, and students’ positive attitudes toward school (Knapp et al., 2019; Wentzel, 2017). It has been observed in several studies that students who are better socially integrated generally report higher levels of school well-being (Borgonovi & Pál, 2016; Choi, 2018; OECD, 2015; Wentzel, 2017), and school satisfaction (Kiuru et al., 2020). The importance of peer relationships for school well-being is has been studied from both the qualitative (e.g., Gysin, 2017) and the quantitative (Choi, 2018; Knapp et al., 2019; Kutsyuruba et al., 2015; Llorca-Mestre et al., 2017) perspectives. Above all, good integration into a school or classroom increases positive attitudes toward school and reduces the presence of school-related worries and physical complaints (Borgonovi & Pál, 2016; Raufelder & Kulakow, 2021).

Again, gender seems to influence the associations between school satisfaction and social relationships, as Lui et al. (2016) found that boys benefited more from peer support than girls did. Those findings relate to the subjective assessment of peer relationships by the students themselves. The influence of aggregated perceptions of peer relationships between students within a class on their positive attitudes toward school has not yet been researched. However, there are studies that show that negative peer relationships that lead to bullying or mobbing have a negative impact on the entire class and might push students out of school, and converse (Låftman et al., 2017; Schlesier et al., 2024).

Rationale for multilevel analyses

Student ratings have been the method of choice when it comes to assessing the effects of various teaching features or practices on student-related outcomes. However, as already stated in the previous sections, data collected in schools has a hierarchical structure as students can be assigned to individual classes and schools. Belonging to a particular class/school influences the response behavior and the assessment of school- and class-related aspects. Classroom management studies (e.g., Fauth et al., 2020) show that students’ assessments depend on their class affiliation. Accordingly, it is necessary to take membership of a class into account in any data analyses.

In particular, since student perceptions of class leadership and social relationships in the classroom relate to their assessment of the lessons, or of the (same) teacher and (same) classmates, it can be assumed that such assessments are also influenced by their affiliation to a particular class/school, and the educational level of the school. Therefore, from a methodological perspective, in order to avoid possible distortions in the findings due to particular class/school affiliations, it is necessary to at least estimate the extent to which group membership correlates with the assessment of these aspects (Lüdtke et al., 2009). From a practical perspective, it is also important to assess whether the shared perceptions of the students are related to an individual outcome (e.g., positive attitudes) since such findings could help to understand the complex interactions between subjective and aggregated assessments of students regarding social relationships and classroom management.

In this study, it is of interest as to whether there are associations between individual assessments (of classroom management, the teacher-student relationship and peer relationships) by single students and the aggregated assessment of all students within one class, and the respective single students’ positive attitudes toward school. Although a positive association has already been found between the aggregated perception of the teacher-student relationship and the positive attitudes of the students (Schürer et al., 2021), it remains unclear as to whether the aggregated assessment of the other aspects (classroom management and peer relationships) is also related to the students’ positive attitudes. The question of the correlation between the two levels of analysis (individual and aggregated) is the subject of various other studies (e.g. Voss et al., 2022) which provide insights into the validity of aggregated assessments. However, it is also clear that the analysis of such aspects – in particular social relationships and interactions – is very complex, and assessment of the same teacher by different classes depends on the teacher's skills, and psychological and pedagogical knowledge (Higgins-D’Alessandro, 2021). Hence, the study reported in this article was not able to analyze such associations between an individual and superordinate level in detail, due to the chosen methods of data collection.

Research questions

Effective classroom management has been confirmed as a direct influencing factor on students’ positive attitudes toward school (Obermeier et al., 2022; Raufelder & Kulakow, 2021). This relation has been shown on the individual level, but not on the aggregated class/school level. Based on prior findings, it can be assumed that students within one class have a more similar perception of the teacher's classroom management skills than students in different classes (Fauth et al., 2020). However, students’ perceptions of teaching quality (so that classroom management) also depend highly on teacher competencies, and vary less when teachers possess higher psychological and pedagogical knowledge (Voss et al., 2022). In order to estimate correlations between individual and aggregated student perceptions of classroom management, we investigated the following question:

  • Research question 1: Is there a correlation between students’ assessment of classroom management and their positive attitudes toward school, at a) an individual level, and b) an aggregated level?

A positive association has been found between individual and aggregated perceptions of teacher-student relationship and positive attitudes of the students (Schürer et al., 2021), as well as between students’ perceptions of positive peer relationships and positive attitudes of students at the individual level (Borgonovi & Pál, 2016). Despite increasing awareness of the importance of positive social relationships, findings regarding the correlation between social relationships and students’ positive attitudes toward school are rare. We could find no studies on aggregated perceptions of peer relationships. To address this gap, we investigated the following exploratory questions.

  • Research question 2: Is there a correlation between students’ assessments of teacher-student relationships and students’ positive attitudes toward school, at a) the individual level, and b) the aggregated school level?

  • Research question 3: Is there a correlation between students’ assessments of peer relationships and their positive attitudes toward school, at a) the individual level, and b) the school level?

There is also evidence that effective classroom management can promote social interaction between students (Kröske, 2020; Longobardi et al., 2021; Seidel & Shavelson, 2007). It is therefore possible that student-perceived social relationships (teacher-student relationship and peer relationships) mediate the correlation between classroom management and students’ positive attitudes toward school (RQ1).

  • Research question 4: Does the teacher-student relationship at a) the individual level, and b) the school level mediate the correlation between classroom management at a) the individual level, and b) the school level and students’ positive attitudes toward school (at the individual level)?

  • Research question 5: Do peer relationships between students at a) the individual level, and b) the school level mediate the correlation between classroom management at a) the individual level, and b) the school level and students’ positive attitudes toward school?

Methods

Design and sample

The data is from a cross-sectional digital survey conducted by the institutions Anonymous 1 and Anonymous 2 in March and April 2022 – two to three months before transition to apprenticeship or alternative types of (vocational) schools. A total of N = 453 students were surveyed at nine polytechnic schools (PTS) in rural areas in Upper Austria. This school type has rarely been addressed in empirical studies to date, although it holds an important position in preparing students before they take up vocational training. PTS offer a one-year educational program in the transition from school to work, which aims to teach vocationally relevant skills by offering various vocational subject areas for students to choose from. Another main task of the PTS is to teach key attributes, i.e. basic skills and abilities. Although the students in one class are often separated from each other when they attending classes in different subject areas, they still know each other and the teachers, due to the small size of the schools (which usually contain two to five classes). Additionally, the division into subject areas is accompanied by a reduced class size, leading to deeper contact between teachers and students. Teachers in the subject areas support the students in small groups (12–14 students) and are responsible for teaching 12 h a week. The good level of contact between all students and teachers is particularly emphasized for this type of school, where the atmosphere is generally perceived as being positive (Bauer & Kainzmayer, 2017; Obermeier et al., 2022). Thus, this type of school seems to be appropriate for investigating social relationships, not only at the individual, but also at the school level.

The students in the sample were between 14 and 18 years old (Average age: M = 14.98, SD = 0.67; 85.4% 14–15 years old); 36.1% of respondents assign themselves to the female gender, while 2% of them stated that they are ‘diverse’; 32.2% of the students have a migration background.Footnote 1 For the analyses, the sample was weighted according to the data on the basic population of students at PTS in Upper Austria,Footnote 2 on gender distribution (39.43% female) and the proportion of students with a migration background (32.06%). Data from students who selected ‘diverse’ for gender, or did not provide any information on one of the weighting variables, was weighted at least with regard to the other variable. If no information was provided for either weighting variable, the case was assigned a weight of 1.00.

Instruments

Standardized instruments with satisfactory reliability were used to record the students’ perceptions of all the variables, as listed below. Response categories on a five-point Likert scale (1 = strongly disagree, to 5 = strongly agree) were offered for all questionnaire items.

Students’ positive attitudes toward school. We assessed the students’ positive attitudes toward school, that was tested as dependent variable, using a dimension of Hascher’s (2004) school well-being instrument (seven items; e.g., “like going to school”, α = 0.85).

Classroom management as independent variable was measured by five items formulated by Lenske and colleagues (2013), with adequate reliability (α = 0.71). The items are generally used for teachers’ self-assessment of their lessons, and provide information on several characteristics of classroom management, i.e. clarity and structure of lessons (e.g., “Teachers have their things to hand in class and don’t have to search for long.”), and the management of disruptions and learning time (e.g., “I can work undisturbed in class.”).

The teacher-student relationship, that was used as a mediator, was operationalized by five items (Bos et al., 2012, e.g., “I am nice to my teachers.”, α = 0.79). These items reflect the reciprocal relationship by assessing the extent of mutual respect and appreciation between students and teachers, which is a core aspect of positive teacher-student relationships (according to Robinson et al., 2022).

The nature of peer relationship, which werer also introduced as mediator, was measured by the extent of helpfulness, using seven items (e.g., “Most students in our class help each other in class.”, α = 0.84), taken from the Landau scales on social climate (Saldern & Littig, 1987). Since peers are a great source of social support and help (Wentzel, 2017), helpfulness is a core aspect of social climate that is used to operationalize positive peer relationships.

The questionnaire items were formulated in such a general way that assessments of classroom management and relationships with teachers and classmates refer to all teachers and classmates.

Statistical procedures

After weighting the data according to information on gender and migrant distribution in the whole population of students in PTS (Statistics Austria, 2023), descriptive statistics and the ICC1 and the ICC2 were analyzed. The ICCs represent a measure of the reliability of aggregated values (Lüdtke et al., 2009). They were calculated for the variables classroom management, teacher-student relationships and peer relationships, which were aggregated at the school level since we assumed that they are influenced by school affiliation. This approach was chosen because the schools are very small and teaching staff are in intensive and frequent contact with the students, in particular for lessons in vocational subjects. Another reason was that the number of students in the subject areas at the individual schools was not large enough to carry out a multilevel analysis at that level. Only variables that had appropriate ICC1 and ICC2 values were included as level-2 predictors in the models. For ICC1, values > 0.05 are regarded as an indicator that the influence of group affiliation should be taken into account (LeBreton & Senter, 2008). For ICC2, values > 0.70 are considered an appropriate limit with regard to the accuracy of the assessment of aggregated perceptions (Lüdtke et al., 2009).

Multilevel confirmatory factor analyses (CFAs) were conducted in order to take the hierarchical data structure into account, and to prove that factor structures at the individual and group levels are equal. Weak invariance (indicating equal factor loadings) and strong invariance (postulating equal factor loadings and intercepts) for both groups were tested and compared by means of the χ2-difference test (Dyer et al., 2005; Huang, 2017).

The specification of the mediation model with the weighted data set was conducted using RStudio (version 2022.07.2) and the ‘lavaan’ packages. Based on the recommendation of Lüdtke et al. (2009), all predictors in the model were centered at the grand mean. The model fit was assessed using common criteria (Hu & Bentler, 1999; CFI ≥ 0.95/0.90 and RMSEA ≤ 0.05/0.08). The model includes direct paths (c-paths) from classroom management (at individual and school level) to students’ positive attitudes toward school. The direct link between classroom management and the mediators (teacher-student relationships and peer relationships) is represented by the a-paths. The b-paths represent the correlation between the mediators and students’ positive attitudes toward school. Regarding peer relationships, only the individual level was analyzed, due to low ICC1 and ICC2 values. It was included in the figure as it represents RQ3b and RQ5b. Further, three indirect paths (d-paths) were modeled, which depict the influence of classroom management (at individual- and school levels), mediated by the teacher-student relationships (on both levels) and peer relationships (individual level only).

Missing values, which were less than two percent for all constructs and were not systematic,Footnote 3 were estimated using the full information maximum likelihood (FIML) procedure (Graham, 2009; Little & Rubin, 2002). Gender, subject area attended, and migration background were included in the model as covariates (Fig. 1).

Fig. 1
figure 1

Schematic representation of the mediation model with two levels of analysis. Notes: CM = classroom management, TSR = teacher-student relationship, PeerR = peer relationships, PA = positive attitudes toward school. CM.S, TSR.S and PeerR.S refer to the aggregated data at school level

Results

Descriptive statistics

The mean values of all variables included in the analysis tended to be skewed to the right for the positively polarized scales (positive attitudes toward school: M = 3.34, SD = 0.84; classroom management: M = 3.24, SD = 0.79; teacher-student relationships: M = 3.75, SD = 0.73; peer relationships: M = 3.35, SD = 0.87). As expected, the students’ responses regarding classroom management, teacher-student relationships and peer relationships varied between the schools (Table 1).

Table 1 Mean values and standard deviations of classroom management and Teacher-student relationships for each of the nine schools

The calculation of the ICCs suggests that the school level must be taken into account, at least in relation to the assessment of classroom management, as ICC1 = 0.14 and ICC2 = 0.88 clearly exceed the corresponding cut-off values. In terms of teacher-student relationships, 5% of the variance is attributable to the school level (ICC1 = 0.05), whereas the reliability of the aggregated assessment of the students (ICC2 = 0.68) falls slightly below the cut-off value. The assessment of peer relationships appears to be largely independent of school affiliation (ICC1 = 0.02; ICC2 = 0.52).

Multilevel CFAs show the presence of strong (scalar) measurement invariance and respectively equal intercepts for the constructs classroom management and teacher-student relationships, at both levels of analysis (Table 2). Based on the common factor variances at individual level 1 (fixed to 1) and school level 2 (0.060 for classroom management and 0.124 for teacher-student relationships), the proportion of the common factor’s total variance at level 2 (school) was estimated for classroom management (0.06) and for teacher-student relationships (0.11).

Table 2 Measurement invariance test of the nested variables

At the individual level, there are significant correlations between the independent variable (classroom management) and the mediators (teacher-student relationship and peer relationships), as well as between the mediators and the dependent variable (positive attitudes toward school). The aggregated assessments at school level also correlate substantially with positive attitudes toward school (Table 3).

Table 3 Mean values, standard deviation and correlation coefficients with confidence intervals

Mediation analyses

In order to test for between-level effects, we calculated first a model without weights, to estimate the random effects. The results of the mediation analysis with weighted variables show direct and indirect correlations of the variables with a very good model fit (χ2 (19) = 62.45, p < 0.001; CFI = 0.97, TLI = 0.94, RMSEA = 0.07, SRMR = 0.07).

c-paths

The direct correlation between classroom management and students’ positive attitudes toward school has a moderate coefficient at the individual student level (β = 0.29, p < 0.001), and no significant correlation at the school level.

a-paths

The relationships between classroom management and teacher-student relationships (β = 0.46, p < 0.001) as well as peer relationships at the individual level (β = 0.45, p < 0.001) are substantial. The aggregated assessment of teacher-student relationships by the students within a school (TSR.S) is significantly correlated with the aggregated assessment of classroom management (CM.S) by the teachers (β = 0.92,, p < 0.001).

b-paths

The correlations between the assessment of the social relationships in school (teacher-student relationship and peer relationships) at the individual level of the students (TSR and PeerR) and the positive attitudes toward school are significant (teacher-student relationship: β = 0.25, p < 0.001; peer relationships: β = 0.18, p < 0.001). The aggregated level of the assessment of teacher-student relationships (TSR.S) is not significantly related to the students’ positive attitudes toward school.

d-paths

The modeled indirect effects at the individual level are significant. The influence of classroom management (CM) mediated via the teacher-student relationship has a higher coefficient (β = 0.07, p < 0.001) than the correlation mediated via peer relationships (PeerR: β = 0.05, p < 0.001). The total effect is (β = 0.45, p < 0.001). A mediation related to the variables at school level cannot be shown (Fig. 2).

Fig. 2
figure 2

Mediation model with two levels of analysis. Notes: CM = classroom management, TSR = teacher-student relationship, PeerR = peer relationships, PA = positive attitudes. CM.S and TSR.S refer to the aggregated data at school level. Bold paths represent indirect effects, while dotted lines represent non-significant paths. * p < .05, ** p < .001

Discussion

Theoretical significance

The aim of the study was to analyze correlations between classroom management, teacher-student relationships and peer relationships with students’ positive attitudes toward school, at the individual and school levels (research questions 1, 2 and 3). In addition, possible mediation effects of the relationship between classroom management and variables indicating social relationships were examined at both levels of analysis (research questions 4 and 5).

Research questions regarding the individual student level

The positive relation between the individual assessment of the teacher-student relationship and students’ positive attitudes toward school (research question 2a) is in line with findings by Schürer and colleagues (2021). That is, students who perceive positive relations with their teachers also seem to experience school in a more meaningful way, and enjoy going there. Additionally, a positive association between peer relationships and students’ positive attitudes toward school (research question 3a) was found. According to the assumptions of the self-determination theory (Deci & Ryan, 1993, 2012), this could be explained by the positive impact of social embeddedness on positive attitudes, a finding that has also been empirically proven (Choi, 2018; Knapp et al., 2019; Li, 2021).

Regarding research questions 4a and 5a (mediating role of social relationships), our findings suggest that students’ individual assessments of both the teacher-student relationship and peer relationships can play a role as significant mediators between student-perceived classroom management (at the individual level) and students’ positive attitudes toward school. Existing findings that show a positive correlation either between classroom management and teacher-student relationships (Fauth et al., 2019; Hattie, 2023), or between classroom management and peer relationships (e.g., Longobardi et al., 2021) can therefore be supplemented by the mediation effect, as empirically proven in the current study.

Research questions regarding the aggregated school level

The students’ assessment of classroom management aggregated at the school level, is positively correlated with positive attitudes toward school. However, as soon as all expected variables at individual and school level were included in the mediation model, there was no longer a significant correlation (research question 1b). Further, regarding research question 2b, we did not find a correlation between the aggregated assessment of the teacher-student relationship within one school and the positive attitudes of students (at the individual level). Due to the low ICC values and the missing measurement invariance of peer relationships, these were not aggregated, even though a hierarchical structure of the data could be assumed. Thus, research question 3b could not be answered by the analyses conducted. Both questions (2b and 3b) were based on existing literature findings (Låftman et al., 2017; Schürer et al., 2021) and theoretically framed by self-determination theory (Deci & Ryan, 2012).

Even if there had been substantial correlations between both aggregated variables and students’ positive attitudes toward school, no significant effects were evident in the mediation model. The lack of correlations in the mediation model in the current study could be due to two mechanisms: First, the school level of analysis was included in the calculations by averaging across all students within a school. The reasons for choosing this level of aggregation have already been explained. Although the schools in the sample were very small with few teachers, the aggregation at school level may conceal a possible correlation, as not all students necessarily assessed the same lessons with the same teacher. The second possible explanation lies in the instruments used, which are actually aimed at individual assessments by students. In the study by Schürer and colleagues (2021), the aggregated assessment was queried directly, using a specific survey instrument. Regarding the questions (4b and 5b) about the mediation of the connection between classroom management and students’ positive attitudes toward school via social relationships (at school level), no significant effects were found in our mediation model.

Limitations

There are some limitations with regard to the current study. Firstly, it should be noted that the present sample concerns a relatively specific group of students who attend PTS. PTS are one-year, pre-vocational schools whose primary goal is vocational orientation. They are characterized by a specific social composition and a strong practical orientation (Berger, 2021; Schinko & Heinrichs, 2021). Students who attend the ninth grade in a PTS make up the smallest proportion of ninth graders in Austria (16.4%) (Dornmayr & Nowak, 2019). Secondly, our sample was weighted based on data from Statistics Austria with regard to gender distribution and the proportion of migrants. However, other characteristics of the students (e.g., educational background) or the school (e.g., distribution across subject areas) could not be taken into account in the weighting, as no corresponding population data was available. Thus, a selection effect can be assumed in the present sample, as the participating schools were mainly in rural areas.

With regard to the study design, it should be noted that this was a cross-sectional survey. As the data was collected at only one measurement point and the variables were therefore all recorded at the same time, it is not possible to make causal statements. Despite the selection of the order of the variables based on sound theory, it would be necessary to examine the correlations on longitudinal data in order to gain clarity about possible causalities. In the present study, it was not possible to generate longitudinal data due to the time constraints: (i) the remaining school year was too short for a follow-up survey; and (ii) earlier data collection had not been possible due to distance learning during the COVID-19 pandemic. However, the collection of longitudinal data is planned for the future, as the rather exploratory study that was carried out provides initial insights that should be further examined.

With regard to the survey instruments, it should be noted that not all dimensions of the variables investigated could be represented by the rather short scales. The teacher-student relationship, for example, is a highly complex construct that is difficult to capture (Knierim et al., 2016). The instrument used originates from the TIMMS study (Bos et al., 2012) and maps the relationship and the resulting behavior in both directions (based on the teachers: "My teachers are friendly to me."; based on the students: "I listen well when the teachers explain something."). Nevertheless, it can be assumed that teachers behave very individually toward different students or classes, and that teacher behavior is also perceived very subjectively by students (Frenzel et al., 2015; Knierim et al., 2016). The study by Frenzel and colleagues (2015) displays the variability of teachers’ emotions while teaching different classes. Thus, the analysis at the aggregated level may fall short due to the level of aggregation. This is also evident in the analyses conducted, since the individual assessments by students and the aggregated assessments at school level tend to correlate only slightly to moderately. A similar observation can be made with regard to the recording of peer relationships. Only the students’ willingness to help each other was included in the analyses, although the peer relationship comprises several other components. The items used are therefore suitable for the exploratory approach chosen in this study, but only to a limited extent in terms of reflecting the increasing importance of positive peer relationships during adolescence (Borgonovi & Pál, 2016; Kleinkorres et al., 2023).

Moreover, this study collected assessments by students only, without including other perspectives (e.g., those of the teachers). Other studies (e.g., Fauth et al., 2019; Voss et al., 2022) have shown that not only does the assessment of teaching quality by students (across different classes) vary greatly, but assessments by other groups of people (e.g., external observers) also differ from students’ assessments. By including both levels of analysis in this study (individual assessments by students, and aggregated assessments at the school level), we attempted to increase the reliability of the statements on classroom management and teacher student-relationships; nevertheless it would be important in future studies to record these aspects from multiple perspectives (e.g., by observer ratings).

Additionally, the data for the multilevel analyses was aggregated at the school level, even though the students there attended different classes/subjects. Aggregation at class or subject area level would be more precise in terms of informative value, but could not be carried out in this study due to the often very low number of students in particular subject areas in the selected schools. Although the schools and numbers of teaching staff are very small – implying that social relations among teachers and pupils can be assumed to be quite close and intense, it was not possible to differentiate how the various teachers were perceived in particular. This limits the findings, but could not be avoided due to the specific characteristics of the schools surveyed. However, our approach and the short scales used can be justified, since the aims of the study were to address exploratory associations that have so far seldom been empirically tested, if at all. Nevertheless, follow-up studies should examine the correlations found in further depth, and in a longitudinal design, as the findings generated in this study raise a clear desideratum, especially with regard to peer relationships. Individual and class/school levels should also be taken into account in follow-up studies.

Finally, it must be taken into account that the aggregated assessments may have been affected by the fact that this was a one-year type of school, with classes divided according to subjects. It is unclear as to whether these specifics are beneficial (close cooperation with teachers and classmates in small groups), or detrimental (only one school year, with many interruptions due to vacations and separation into the subject areas) for the development of intense and long-lasting social relationships. Despite – or precisely because of – these special conditions, it is a clear strength of this study that correlations could be found between all survey variables with one exception for the aggregated assessment of peer relationships. It can be assumed that these correlations, and also the relationships between the variables that were included at an aggregated level, would be significantly stronger in regular lessons.

Conclusion

The analyses conducted confirm the importance of social relationships with teachers and peers as direct influencing factors on students’ positive attitudes toward school. This means that existing findings (Choi, 2018; Knapp et al., 2019; Kutsyuruba et al., 2015; Lera et al., 2023; Li, 2021; Llorca-Mestre et al., 2017) can be extended to the PTS school type. In addition, the study provides initial indications of the mediating effects of social relationships, and additional evidence for the consideration of the hierarchical data structure in schools, which should be examined further in follow-up studies.

This study complements the current state of research on the importance of social relationships in the school context and expands it to the mediation of perceived classroom management by teacher-student and peer relationships. Although the students in this sample had little time to build social relationships with teachers and classmates due to the type of school selected (PTS, which are one-year vocational schools), the conditions in PTS seem to hold the potential for building good social relations and fostering positive attitudes toward school, as indicated by correlations found between all the study variables. Thus, the findings of this study underline the potential of social relationships at school to mediate positive attitudes toward school as an important cognitive component of school well-being (Hascher, 2004), as well as classroom management as a central aspect of teaching quality (Seidel, 2020).

The study also provides initial evidence with regard to the inclusion of aggregated assessment as a level of analysis, which can be built upon in follow-up studies in traditional school classrooms. Even if no significant effects were found at the school level in this study, the significant correlations that were found suggest that added value can be achieved by promoting positive relationships at the classroom level, with an associated improvement in classroom climate.