How to structure Discourse for an online course?

Hi Hunter,

We’re currently in beta but the Discourse integration is going well. We’re using the SSO integration to force sign in on our site. That’s worked fine, although I’ve noticed

  1. Discourse won’t take usernames with “@” sign in them…it truncates the username to just first part before “@” … this can cause problems if you later call the Discourse APIs with that username as an argument. Discourse won’t recognise a username like someone@example.com b/c in Discourse that user’s username is stored as “someone” … easy way around this is to disallow “@” signs in your own usernames!
  2. When someone registers on your own site you have to explicitly call the Discourse API to sync the SSO user, as you might want to do things with that user (e.g. add them to a Discourse group) before they visit the Discourse site for the first time (which would automatically sync the SSO). I have a Django-based site, so I’m using the pydiscourse library and there’s a sync_sso method that make this pretty easy (pydiscourse · PyPI)

Yes, we will expire some of our courses, in which case the server will call the Discourse API and remove the user from the general group for that course, as well as the group dedicated to their cohort in that group.

I’ve created tables in my Django site that keep track of these “course” groups and the various “cohort” groups within each course. So I use that information when adding/removing students, etc:

2 Likes