openfun / joanie

👛 A headless ERP for education to manage course enrollment/subscription, payment and certificates delivery.
MIT License
20 stars 2 forks source link

Order Flow - State Passed / Not passed #860

Open jbpenrath opened 1 week ago

jbpenrath commented 1 week ago

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.

Currently, we are not able to know if a certificate generation has been tried for an order. This is not a problem for learners that have passed exams as a certificate is generated but for those who have failed to exams, we are not able to distinguish them to other for who we don't have yet try to generate a certificate.

Describe the solution you'd like

In the order flow we could add two new states passed / not passed. To transition to those states, the previous state should be completed. Furthermore if there is a contract, this one should be fully signed (by the learner and the organization)

So during certificate generation, we iterate over completed orders. Then for learners who pass exam, we transition to the passed state, and for those who fail, order transitions to the not passed state.

So in this way, an order should be submitted once to the certificate generation.