This paper describes a novel approach to adaptive courseware generation. This approach adopts its structure from existing intelligent tutoring systems and introduces a new component called pedagogical scenario model to support pedagogical flexibility in the adaptation process of courseware generation system. The adaptation is carried out using Dynamic Constraint Satisfaction Problem framework, which is a variant of classical Constraint Satisfaction Problem, to deliver courseware tailored to individual learner. Such a framework provides a high level of expressiveness to deal with the particular characteristics of courseware generation problem. Further, it automatically designs a sound courseware satisfying the design constraints imposed by the domain, the pedagogical scenario and learner models.