I have a site where I teach courses. I want to have my courses run each quarter. So I would have
Course 1 - Fall 2019 Course 1 - Winter 2019 Course 1 - Spring 2020 Course 1 - Summer 2020
The course content exists as one collection of posts (each content type a custom post type - so
topic). For instance
Course 1 Lesson 1 Topic 1 Topic 2 Lesson 2 etc
So I need a way to enroll students into a course during a quarter of their choosing. Also, each course and its quarter has separate forums (announcements, class discussions, assignment) and I need to control forum access based on the groups.
How to handle this? I thought maybe best way, conceptually is
- Upon course creation, create 4 groups corresponding to quarters, as well as forums. There would be table
groups group_id course_id start_date
I am using BBPress, and so I would have table (or post meta data) associating a forum with a group, like
group_forums group_id forum_id
Show available quarters on course registration page. Show 4 at a time. Periodically run cron job, to see if a new quarter has come about and add a new group if needed. This way visitors always see next 4 quarters.
When user enrolls in selected quarter, add them to group. So there would be table
user_groups id user_id group_id
As far as routing,
- When user goes to a course page
courses.com/course1check their group and determine access based on group.
Or would you recommend different approach? I am trying to avoid query vars in the url. I don't want to use
And here is major wild card - the first lesson in a course is always free. That means for guest visitors, when they are on
courses.com/lesson1 they see
Course1->Lesson1 content, with forum links for the course forums corresponding to current quarter.
Anyway, before I work all this out, curious what you recommend.