Cognitive diagnosis modeling and applications to assessing learning