In this work a number of online e-activities are presented for the process of teaching and learning of code refactoring tasks. The pedagogical design of the set of activities is progressive, according to the levels of knowledge of Bloom's taxonomy. First, activities to help knowing and understanding a concept are proposed, then activities to apply refactorings in the context of small software implementations, and last, the analysis and synthesis of the use of refactorings in software maintenance tasks in open source projects. The resources used to solve the activities are related to those the student may find during their professional career, if oriented towards software development: integrated development environments, task tracking systems and revision control systems. It is also described the use of these e-activities in the context of the course Software Engineering of the Bachelor's Degree in Computer Science at the University of Burgos, and the consequences of the experience are analyzed.