Course Visibility based on Student department

In this tip we’ll learn how we can force course visibility to students of a certain department. For example, Students in Chemistry section should only see courses from course category Chemistry.

Or Users form Corporation A should only see courses from Course category – Corporation A

 

Steps :

  1. Create a custom profile field (radio buttons) with name department (case sensitive)
  2. Create course category for every department.
  3. Add below code in Child theme – functions.php

 

 

Important Points :

  1. This tip only works for Students, not for administrators or Instructors
  2. This tip only works when student has set a course department, in case of no department all the courses are visible.
  3. This tip does not apply on My Courses section. So if student subscribes to the course, or instructor manually adds her to the course, the course will be visible in my courses section.

Was this article helpful?

Related Articles

Leave A Comment?