Considering the general problem of integrating mathematical modelling into current educational systems, this paper focuses on the ecological dimension of this problem—the institutional constraints that hinder the development of mathematical modelling as a normalised teaching activity—and the inevitable step of the professional development of teachers. Within the framework of the Anthropological Theory of the Didactic, this step is approached using the study and research paths for teacher education (SRP-TE), an inquiry-based process combining practical and theoretical questioning of school mathematical activities. We present a research study focusing on the design and analysis of an online and distance-learning course for in-service mathematics teachers based on the SRP-TE methodology. This course starts from the initial question of how to analyse, adapt and integrate a learning process related to mathematical modelling and how to sustain its long-term development. Our analysis is based on a case study consisting in four successive editions of a course for Latin American in-service mathematics teachers held at the Centre for Applied Research in Advanced Science and Technology in Mexico. The starting point is a modelling activity about forecasting the number of Facebook users, which includes functional modelling and regression. The results show how the course represents a valuable instrument to help teachers progress in the critical issue of identifying institutional constraints—most of them beyond the scope of action of teachers and students and not approached by previous research—hindering the integration of mathematical modelling in current secondary schools.