Latent class models for learning in online and e-learning settings are introduced. A real data example of an intervention for learning rotational skills in spatial reasoning is used to illustrate restricted latent class models for item responses, known as cognitive diagnosis models, that are coupled with transition models for learning. An array of possibilities are considered that include models with explanatory variables, such as intervention and practice effects, as well as more parsimonious first-order Markov models. In addition, we consider a higher-order continuous variable that may be thought of as general learning ability. The value of response times in assessing learning is considered, and the concept of fluency in which learned attributes are applied more and more easily is introduced. Extensions of the models that include parameters for the instructional value of individual items are given, and MCMC methods for fitting the models are discussed along with results from numerical studies. An R package that includes the spatial reasoning dataset and tools for fitting learning models is reviewed and future directions and new possibilities for applying learning models in e-learning environments are discussed.