Closed Silidrone closed 8 months ago
Hi @Silidrone , As far as I understand, your course default mode is not set to 'Honor'.
Can u try below settings in a patch named openedx-common-settings
through a plugin and let me know if it works. I'll look further into the issue to find a proper solution until then.
COURSE_MODE_DEFAULTS['name'] = "Honor"
COURSE_MODE_DEFAULTS['slug'] = "honor"
I created a plugin like this:
from tutor import hooks
hooks.Filters.ENV_PATCHES.add_items([
(
"openedx-common-settings",
"COURSE_MODE_DEFAULTS['name'] = 'Honor'"
),
(
"openedx-common-settings",
"COURSE_MODE_DEFAULTS['slug'] = 'honor'"
),
])
I enabled it, ran tutor local launch
and verified it is enabled, and it didnt solve the issue. I found out what was the issue though. Apparently, the type_id (this type_id btw, when copied using refresh_metadata always sets the type to EMPTY) of the course_metadata_courserun is not even important, as the type_legacy @property is taken from the CourseRun model, which only uses the associated seat. Now, I didnt have any seat. When I added a seat of type honor for the corresponding course run, everything works. But what if I don't want to have seats? Do I have to add a seat for each course run that I will use to complete in my programs?
Hi @Silidrone, Yes you are right, seats are required to complete the courses/programs and seats are created in ecommerce for the courses in programs. You have to use ecommerce service for this.
It looks like this is not an issue with tutor-ecommerce, right? If so, please close this issue.
I've set up a single program to demonstrate this issue. I have a single course inside that program. My program type is honor. I have earned an Honor certificate for the single course inside my program, and I was expecting to complete the program. However, I only see
So as you can see, the certificate for the course is showing, but completion of this course does not count toward the completion of the program. I've went inside the code and figured out that after I cache the programs, the cached program's course's course run's type is always
None
. I do not understand why. So inside openedx/core/djangoapps/catalog/utils.py on line 121:program = cache.get(PROGRAM_CACHE_KEY_TPL.format(uuid=uuid))
program
is:I've looked at the discovery database and found something that didn't look right: all of the type_id's inside course_metadata_course_run table are set to 5, which is a course_type EMPTY, even though I selected honor. But even after manually changing this and re-caching, my problem wasn't solved. I also tried running refresh metadata but the issue persists.
Also, I managed to hard-code a solution only for understanding the underlying issue, maybe this will be helpful as well:
When I put the following code inside openedx/core/djangoapps/programs/utils.py on line 467
I get:
What could be the issue? Why is the course_run's type always
None
? How can I finish a program by finishing the courses inside it?|I am using tutor to run openedx. My discovery plugin version is: 16.0.0 My tutor version is: 16.1.7