The increasing adoption of virtual classrooms has intensified challenges related to learner distraction, limited supervision, and reduced engagement during online learning sessions. Traditional e-learning platforms largely depend on instructor intervention, which are often insufficient in large or distributed learning environments. This study presents the design and evaluation of an Attention-Aware Learning Enforcement System for virtual classrooms, aimed at collecting learners' distraction details, analysing them and counselling learners to help reduce subsequent distraction occurrences. The proposed system integrates three core enforcement modules: a compulsory class test module, an Artificial Intelligence (AI)-enabled counselling module and a Global System for Mobile Communications (GSM)– Dual-Tone Multi-Frequency (DTMF) call module. At the end of the class, the system collects captured distraction details and triggers enforcement actions on all the students detected with incident(s) of prolonged distraction. The compulsory class test is used to retain and engage the learners after class teaching, while learners are required to undergo AI-driven query and counselling session, with successful interaction serving as a prerequisite for test access. The GSM–DTMF phone calls provides a backup when the AI-driven counselling fails, with successful interaction serving as alternative prerequisite for test access. Performance evaluation results demonstrate high system reliability, with an overall enforcement success rate exceeding 90%, and a notable reduction in the need for human instructor intervention. The findings indicate that this learning enforcement system offers a scalable, intelligent, and effective approach to improving learner attention in virtual classrooms, particularly in resource-constrained and connectivity-challenged environments.