Cannot generate certificate for passing student (Sumac)

Hi everyone,

I’m trying to generate a certificate for a student in a course on our Tutor/Open edX instance, but I keep running into issues. I’ve tried marking the user as passed manually and running cert_generation, but the LMS still shows the course as incomplete, and the certificate is not being generated.

Environment:

  • Open edX / Tutor instance (2025)

  • Python 3.11

  • Using Docker containers for LMS/Studio

Steps I’ve taken:

  1. Attempted generating certificate via command line:
./manage.py lms --settings=tutor.production cert_generation --user 49 --course "course-v1:SSVN+SCC002+2025"

Output:

49 does not have a passing grade in course-v1:SSVN+SCC002+2025. Certificate cannot be generated.
  1. Tried marking user as passed in Python shell:
from django.contrib.auth.models import User
from opaque_keys.edx.keys import CourseKey
from lms.djangoapps.grades.models import PersistentCourseGrade
from lms.djangoapps.courseware.models import StudentModule

user = User.objects.get(id=49)
course_key = CourseKey.from_string("course-v1:SSVN+SCC002+2025")

# Set grade
grade, _ = PersistentCourseGrade.objects.get_or_create(user_id=user.id, course_id=course_key)
grade.percent_grade = 1.0
grade.letter_grade = "Pass"
grade.passed = True
grade.save()

# Mark all course blocks completed
StudentModule.objects.filter(student_id=user.id, course_id=course_key).update(grade=1.0, done=True)
  1. Attempted to recalc course grade using CourseGradeFactory():
from lms.djangoapps.grades.course_grade_factory import CourseGradeFactory
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview

course = CourseOverview.get_from_id(course_key)
CourseGradeFactory().update(user, course)

Output:

AttributeError: 'CourseOverview' object has no attribute 'grade_cutoffs'

Tried using generate_certificate_for_user and other suggested methods from documentation/examples, but either imports fail or the commands don’t exist on Tutor.

Problems I’m facing:

  • The LMS still shows the course as incomplete for the user.

  • Certificate cannot be generated via cert_generation because either:

    • The user is not “passing”

    • The enrollment mode (audit/honor) mismatch

  • Cannot locate the generated PDF anywhere in the container.

  • Celery worker commands either don’t exist or cannot be run due to the Tutor setup.

  • Python shell approaches fail due to import errors or attribute errors.

What I want:

  • To generate a certificate for a user manually for testing purposes.

  • To locate the certificate PDF to download/view.

Has anyone successfully bypassed the “passing grade” / “enrollment mode” checks for testing certificates in a Tutor/Open edX 2025 instance?

Any guidance on the correct sequence of steps in Tutor to get a test certificate would be extremely helpful.

Hi @Ssin and welcome to the community.

Do you mean by this the Teak version / Tutor 20? We do two releases per year so simply saying the year isn’t quite enough detail. And, you could still be running an older release. So it’s best to be specific about the Tutor version you’re running.

Hello, I am using version 19.0.0.

I’ve edited your post title to reflect Sumac version. I am sorry I can’t help further.