Effective learning requires students to set objectives and adopt appropriate cognitive behaviors. This research aims to enhance scaffolding by allowing tutors to observe learners' cognitive behaviors, particularly their cognitive engagement. An automatic system is proposed to classify learners by their cognitive engagement levels through analyzing social interactions in online discussion forums. The system involves two main steps: constructing learners' vectors and using an SVM-based classifier. The results demonstrate the system's efficiency with an accuracy of 0.9 and Cohen's Kappa of 0.89.