This paper presents Lecomps5, a web-based system for automated course personalization in distance learning environments. This system is an upgraded version of the Lecomps4 system, where the student model was represented by means of the student's starting knowledge, measured by initial assessment tests. In the Lecomps5 system, personalization is obtained taking into account the student's learning styles, building a dynamic student model where both student's knowledge and learning styles are represented and updated during navigation in the learning environment. The most important feature of the system is the personalization of content presentation on the basis of the student's learning styles with the possibility of using different teaching strategies, showing learning components in different ways according to the student's learning preferences. Moreover, an adaptation of the course contents, based on the student's learning progresses, is also provided by t...