Bug: Learners are able to earn certificates past course end date

We’re facing an undesired behaviour in Open edX (open-release/koa.master). This behaviour goes against the documentation of course end dates in relation to certificate issuing.

What’s more interesting is the behaviour is only reproducible in community deployments but not courses.edx.org. So I suspect that it’s a missing feature or waffle flag.

Could you please help?

Steps to Reproduce:

  • Get a Tutor Koa instance.
  • Create an instructor-paced course with a end date (course.end) in the past e.g. December 2020
  • Enable and configure certificates for the course
  • Make one graded assignment in the course e.g. a multiple choice problem
  • Register as a learner and enroll the learner in the course in honor mode.
    • The learner cannot cannot earn a certificate now due to having a low grade
  • As the learner answer the graded problem

Expected behaviour (what happens on courses.edx.org)

  • Learner progress page stays at 0% despite answering the problem correctly because the course.end date is in the past
  • Learner cannot earn a certificate due to incomplete progress

Actual behaviour: (what happens on open-release/koa.master)

  • Progress page gets updated and the learner earns 100%
  • Learner is now able to earn a certificate in January 2021 despite course.end being in the past

Which part of the code is responsible about such logic? I have found both CapaMixin.closed and course_metadata_utils.has_course_ended but couldn’t find a piece of code that combines both of them.

How should I configure my instance to match the courses.edx.org behaviour?

Note: We’re running an honor course, so the track upgrade logic isn’t applicable to this use case.

1 Like