Showing courses based on email domain?

Good day! We’re working on an implementation that would be available for both customer training as well as in-house employee training.

I’d like to filter the courses based on their email domain… in other words, a course is only visible and available if their email is something@mydomain.com If their email is something@someotherdomain.com it wouldn’t show up at all.

I think this may have something to do with “External Login Domain” under advanced settings, however there is very little documentation for this field.

Can someone give me a push in the right direction?

Thanks in advance!

–Greg

Hi Greg,

I don’t think so. The External Login Domain setting seems to be related with Shibboleth authentication in the course about page.

If you are using the Open edX catalog to show the available courses, you might tweak the courses list in the html template with some javascript. Note that this page is also visible for non-logged users.

That seems… oddly specific.

There must be a way to do this though… only allow certain users to take certain courses. Preferably based on their email domain, but I suppose they could be put into groups or something? Makes it difficult when we want self-service for employees and using Single Sign-On (Auth0)

It’s possible to limit registration based on email, but I guess it’s not what you want to do.

Looks like you want something similar to the enterprise feature. I found it complicated, buggy, confusing, and yet the catalogs have to be implemented outside. If someone around has a good experience implementing this, any contribution would be appreciated.

I don’t see a straightforward way to implement this. Enrollments can be open to anyone, or by invitation, but there is no option in the middle. You may implement a logic using an enrollment filter, but that would require some coding and would not hide the courses in the catalog.

Another option can be implementing a course catalog in a marketing site (e.g., in Wordpress), and managing enrollments via API. We do something like this to sell courses with Woocommerce.

So the final solution may depend on the context of the project, but certainly will demand some extra effort.

So, in digging into this deeper, it looks like if I can figure out where the python script that is populating the courses array is happening, I should be able to filter it there, and not have to modify any HTML or have anything client-side.

There’s a bit of code that (paraphrasing) says “for course in courses” “include …/course.html” that builds out the course offering.

So if I can figure out where courses is being populated, I can filter it at the source, and not expose anything to the end user of courses filtered.

Does that sound like the correct path to go down?