Electronic Learning (E-Learning) played a significant role in education during the Covid-19 pandemic. It is a way to teach and learn online, and it is an efficient method of knowledge transfer for the instructors and students, who must practice social distancing and have less interaction during the pandemic. However, although multimedia applications have provided convenience for online learning, they still present challenges for instructors to measure and assess students' attentiveness during online classes. This study aims to develop an assessment framework based on machine learning methods to analyze students' attentiveness in online sessions and provide a guiding solution for instructors to manage their online classes. The framework detects the behavior of learners and analyzes signs of distraction, drowsiness, and varied emotions while they participate in online classes. These three signs have been used as features to train the Long Short-Term Memory (LSTM) model for predicting whether learners are 'Focused' or 'Not Focused' during their online classes. The developed model achieves an accuracy of 90.2% on the test dataset based on the experiment results. However, this project could be further developed for more efficient research. It can also serve as a foundational guideline for the efficacy of online teaching systems, which can play a key role in helping instructors adopt suitable teaching methods for learners in the future.