The dissemination of knowledge is currently being improved by e-learning, which consists of a combination of teaching methodologies and computerbased tools. Recently e-learning environments have started to exploit web technology to provide a simple, flexible, distributed and open platform. In this paper we propose a model for an e-learning system, aiming at sharing both course contents and teaching materials, in order to provide students with a single and uniform set of concepts to be learned, and promoting active learning by allowing the construction of courses which are personalized in terms of both contents and teaching materials, selected according to each student's needs and capabilities. A first, open-source prototype based on the proposed model has been implemented to validate the model. Work carried out under the partial financial support of the Ministero dell'Istruzione, dell'Universita' e della Ricerca (MIUR) in the framework of the Project P38 -CLUSTER 22.