In practice, constructed-response items are commonly used to diagnose students’ performance using polytomous scores. Existing longitudinal cognitive diagnosis models (CDMs) primarily focus on dichotomizing the data, unsuitable for polytomous scores. This article introduces a longitudinal CDM for handling polytomous responses over time. The proposed model expands the capabilities of learning models to handle polytomous data and account for hierarchies among attributes within the CDMs. For estimation, a Gibbs formulation was proposed to estimate parameters in the measurement part, while a Metropolis-Hastings sampler was employed for the transition part. An empirical study was conducted to showcase the practical application and advantages of the proposed model. Additionally, two simulation studies demonstrated that parameters can be well recovered under various conditions.