The paper implements a target detection and tracking method to record students behavior in the classroom and constructs a behavioral database to be applied to ideological and political education classes. Following the preprocessing of the behavioral data, enhancement of the representation of the learning behavior characteristics of the students, and incorporation of the TELF-HC model, a TELF-PSPOC model on the basis of a three-layer integrated learning framework is proposed. A number of public video datasets are chosen and the best accuracy of the dataset built in this work is compared with those of the chosen public datasets. The TELF-PSPOC model is then employed to evaluate and classify the online classroom learning behaviors of the students, track the presence of the activities like listening, taking notes, discussion and imitation, and determine the level of participation of the students in ideological and political education courses. The levels of achievement of the students in these courses could also be obtained by combining various types of learning behavior. On the dataset of this paper, the SlowFast model and the Swin Transformer model achieve a prediction accuracy of 78.79% and 81.06 respectively, which indicates that the dataset built is both reasonable and practical. Students 3, 7, 8, 9, 24, 28, 34, and 36 have low values of overall individual engagement in the classroom of ideological and political education. Student 4 has the highest engagement during teacher instruction, whereas student 3 has the lowest.