This dissertation presents a web-based framework for assessing the correctness of students' programs, detecting code quality, and assisting students in a form of pair programming. The controlled experiment indicates that there were various code quality issues (CQIs) in the past. By applying the framework in three different online programming courses during the COVID-19 pandemic, 93% of the detected CQIs were solved by students. Meanwhile, the teachers have helped the students who faced difficulties during the programming lab sessions 56 times. Based on the students' survey, 95.5% of students think the framework is helpful for learning programming and 93.2% of them want to use it in future courses.