In this paper, we propose a constraint-based model for the combination of a course timetabling problem and a course allocation problem for secondary schools in Switzerland. Course timetabling has been widely studied for Universities, but for schools, solutions have only been proposed for specific countries or even for specific schools. In fact, timetabling problems presents the difficulty to be case-specific through specific constraints satisfaction. In addition, due to a recent reform of the education system in Switzerland, the timetabling problem is combined with a course allocation problem that has an important impact on timetables. Indeed, some topics are defined by a curriculum but each student may be assigned to up to five different options depending on past grades and students choices. Both problems, timetabling and allocation must be solved simultaneously and educational objectives are related to both composition of classes and timetables of students. A description of the problem and the educational objectives to consider are presented. Finally, a complete constraint-based model based on hard and soft constraints has been designed to solve the combined problem, both types of constraints are described in detail and a qualitative complexity analysis of this model is given.