openfun / joanie

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

CourseState - Add label field #604

Open jbpenrath opened 8 months ago

jbpenrath commented 8 months ago

Sometimes, we do not want to concat the course state text with its datetime but we simply want to display a label which explicit the course state.

So we could assume to add a label property to the CourseState dict output.

STATE_LABELS = {
    ONGOING_OPEN: _("On going and still opened for enrollment"),
    FUTURE_OPEN: _("Opened for enrollment"),
    ARCHIVED_OPEN: _("Archived but opened for enrollment"),
    FUTURE_NOT_YET_OPEN: _("Not yet opened for enrollment"),
    FUTURE_CLOSED: _("Not yet started"),
    ONGOING_CLOSED: _("On-going"),
    ARCHIVED_CLOSED: _("Archived"),
    TO_BE_SCHEDULED: _("To be scheduled"),
}
jbpenrath commented 8 months ago

After some thoughts, I'm not quit sure this is relevant to add those kind of labels to backend. Indeed, the label to display really depend to the user context. As a learner, if I'm not yet enrolled to the course, I surely want to know if enrollment are still opened and when the course will begin. Then if the learner is enrolled, enrollment dates are no more relevant. Now, from a course leader point of view, maybe only course dates are relevant (when the course will start? It is ongoing ? When it will be ended ?) Then from an content editor point of view, maybe it's relevant to display both information : what is the course state ? what is the enrollment state ?

Ping @PanchoutNathan