Enable Automatic Certificate Generation is fail on Maple after Lilac upgrade

Hi,
I have a problem on automatic certificate generation issue on Maple after upgrading from Lilac (with Tutor installation method).

On my previous Lilac, I can enabled a course automatic certificate generation by set the early_no_info value (18.5. Ending a Course — Building and Running an Open edX Course documentation) and somehow this Certificates Display Behavior were disappear from Maple’s Course Advanced Settings.
Secondly I then enabled certificates.auto_certificate_generation waffle switch on Django Admin.

Now if a learner go to Progress page it couldn’t be opened and show “There was an error loading this course.” error. Check on LMS log shown:

lms_1 | 2022-01-09 00:13:56,615 INFO 24 [lms.djangoapps.certificates.generation_handler] [user 13] [ip 110.137.195.77] generation_handler.py:44 - Attempt will be made to generate course certificate for user 13 : course-v1:CAx+CA102+2022_T1
lms_1 | 2022-01-09 00:13:56,665 INFO 24 [tracking] [user 13] [ip 110.137.195.77] logger.py:41 - {“name”: “edx.course.grade.now_passed”, “context”: {“user_id”: 13, “path”: “/api/course_home/progress/course-v1:CAx+CA102+2022_T1”, “course_id”: “course-v1:CAx+CA102+2022_T1”, “org_id”: “CAx”, “enterprise_uuid”: “”}, “username”: “billydekid”, “session”: “1e39b84da9b6dc60927266820518603d”, “ip”: “110.137.195.77”, “agent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.62”, “host”: “qa.cybersacademy.id”, “referer”: “https://apps.qa.cybersacademy.id/”, “accept_language”: “en-US,en;q=0.9”, “event”: {“user_id”: “13”, “course_id”: “course-v1:CAx+CA102+2022_T1”, “event_transaction_id”: “None”, “event_transaction_type”: “None”}, “time”: “2022-01-09T00:13:56.665331+00:00”, “event_type”: “edx.course.grade.now_passed”, “event_source”: “server”, “page”: null}
lms_1 | 2022-01-09 00:13:56,668 INFO 24 [lms.djangoapps.certificates.signals] [user 13] [ip 110.137.195.77] signals.py:80 - Attempt will be made to generate a course certificate for 13 : course-v1:CAx+CA102+2022_T1 as a passing grade was received.
lms_1 | 2022-01-09 00:13:56,670 INFO 24 [lms.djangoapps.certificates.generation_handler] [user 13] [ip 110.137.195.77] generation_handler.py:44 - Attempt will be made to generate course certificate for user 13 : course-v1:CAx+CA102+2022_T1
lms_1 | Fatal Python error: Cannot recover from stack overflow.
lms_1 | Python runtime state: initialized
lms_1 |
lms_1 | Thread 0x00007fceb2ede700 (most recent call first):
lms_1 | File “/openedx/venv/lib/python3.8/site-packages/pymongo/periodic_executor.py”, line 131 in _run
lms_1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/threading.py”, line 870 in run
lms_1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/threading.py”, line 932 in _bootstrap_inner
lms_1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/threading.py”, line 890 in _bootstrap
lms_1 |
lms_1 | Thread 0x00007fceb36df700 (most recent call first):
lms_1 | File “/openedx/venv/lib/python3.8/site-packages/pymongo/periodic_executor.py”, line 131 in _run
lms_1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/threading.py”, line 870 in run
lms_1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/threading.py”, line 932 in _bootstrap_inner
lms_1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/threading.py”, line 890 in _bootstrap
lms_1 |
lms_1 | Thread 0x00007fcecda2a700 (most recent call first):
lms_1 | File “/openedx/venv/lib/python3.8/site-packages/pymongo/periodic_executor.py”, line 131 in _run
lms_1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/threading.py”, line 870 in run
lms_1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/threading.py”, line 932 in _bootstrap_inner
lms_1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/threading.py”, line 890 in _bootstrap

I should disabled the certificates.auto_certificate_generation waffle switch flag to fix this and page will display normally. But, no certificate download link on this page when a learner has passed the exam.

I know there are some various bugs fixed and updates of Certificate on Maple version but since I’m new and have no more deep knowledge in this area.

I really appreciate if someone could assist me on this issue.
Thank you in advance.

[bayu]

This issue seems duplicate of this one

Now this is an ominous error. Is there anything interesting in the logs of other containers?

Hi @Zia_Fazal it’s solved!
By enabling persistent grades via Django admin.

But the link for Certificate download is still not appear.

Thank you so much!

@regis , I will check…

Hi,

I will update and summarize what I’ve done so far (enable automatic certificate generation and allow learner to download early certificate)

Lilac:

  1. Enabled certificates.auto_certificate_generation waffle switch on Django Admin
  2. Set Certificates Display Behavior to "early_no_info"

Upgrade to Maple:

  1. Error log regarding generate course certificate which will affect page loading error is fixed by enabling persistent grades on Django admin.
  2. No “View Certificate” button on Progress’ learner page
  3. Problem #2 is fixed by adding the course ID to certificate generation course setting on Django Admin (/admin/certificates/certificategenerationcoursesetting). The result is a “Request Certificate” button appears on Progress page.
  4. “Request Certificate” button is still not up to my expectations where in lilac the “View Certificate” button appears. Hence no more step for learner to download his/her certificate.
  5. I found that there is no Certificates Display Behavior on Maple course’s Advanced Settings, but now that “option” appears on Course Details page (Settings > Schedule & Details) with the default value end.
  6. I know that to allow learner to download early certificates is by set the Certificate Display Behavior to early_no_info on Certificates Display Behavior setting.
  7. By doing the trick to change the end value to early_no_info on Course Details page fix #4 issue. The “Request Certificate” button is not show up replace with “View Certificate”.

Questions:

  1. Is there any steps I missed?
  2. Can these steps (“tricky”) be a workable solution at this time? Since the Maple documentation regarding this subject is still refer to Lilac.

Regards,

2 Likes

hi, i don’t see " Certificates Display Behavior as your comments and in Advance setting? Do you have any update?

Hi @oanhcuongdo, the Certificates Display Behavior on Maple is appear on Course Details Page (Schedule & Details).

Thank you,

thánks for your replay. But i come to that page, no Certificates behavior :frowning:

What version are you using? If the course created on Lilac and you upgrade to Maple, it will not display. Try to create a new one on Maple. Thanks,

Thanks you. I create new one and it’s working. if I updated old one, nothing works

I confirm that even importing an old course doesn’t work.

How do we handle courses that have been existing for a while, for example on Koa in Native, when we will switch to Tutor and Maple? We have long running courses that deliver certificates either auto-generated or at the end. Is there a migration command we need to run? We can’t assume a course will end before our move to Tutor. That would be a logistic nightmare…

Hi there, I’m reviewing this PR and after researching for a bit I came across this post. Maybe that PR solves this issue? If it’s completely unrelated, please, ignore this comment.

Hello Maria,

I hadn’t seen that PR and it definitely looks like the same problem I encountered recently. Nice catch. Thanks for forwarding this to me.

We had already decided to turn on Persistent Grades in the future (definitely before we move from Koa under Native to Maple or Nutmeg under Tutor), but it is great to understand what was going on. Thank you.

1 Like