eduNEXT / eox-core

eox-core is a plugin to extend the core functionality in Open edX
GNU Affero General Public License v3.0
15 stars 9 forks source link

fix: get settings course_org_filter when validating org for async proc #208

Closed mariajgrimaldi closed 2 years ago

mariajgrimaldi commented 2 years ago

Description

get_current_site_orgs() obtains the current site orgs getting first the current site:

image image image image

which doesn't exist in async processes. So, this adds an alternative: if the current org is not found then try getting them directly from the site settings.

Testing instructions

I'm currently testing this with an async task that enrolls users into a course. It's in a private repository, reach out if you want to test it out.

Additional information

I found this issue while trying to enroll users in a course using an async task and configuring the site with course_org_filter. With this change, it's working correctly.

Checklist for Merge

mariajgrimaldi commented 2 years ago

Question: should we fix the current backend or add a new one for maple?

Alec4r commented 2 years ago

Question: should we fix the current backend or add a new one for maple?

I prefer to create a new backend file because we have a hawthorn backend.

mariajgrimaldi commented 2 years ago

Can you review again please? @Alec4r