Tutor LMS – Restrict Files to Course Students

In this post, we show you how to restrict files to course students in Tutor LMS. Students must be enrolled in a specific Tutor LMS course to have access to the files.

One of the best ways to gain students for your “Tutor LMS” courses may be to offer them e-books as textbooks. The problem may be that users can share the URL with other users who are not enrolled in the course and those users can download the e-book or any document or file. In that case, you need to restrict the documents, e-books, or any file so that only users enrolled in the course can access it.

That’s why we show you the WordPress Conditional Post Restrictions Plugin. This WordPress Plugin allows you to apply conditional restrictions to your posts, pages, courses, events, products, donations, recipes, downloads, etc. It works with any custom post type generated by Plugins.

You can download the plugin here:

Download WordPress Conditional Post Restrictions Plugin - or - Read more

Once you install and activate the plugin, follow these simple steps to restrict documents for students enrolled in a specific Tutor LMS course.

1- Open the file you’ll restrict to course students

You need to use a download manager on WordPress. In this post, we’re using the WordPress Download Manager plugin to manage our downloads, but you can use any other download manager that creates downloads as post types.

  1. Go to Downloads > All Downloads in wp-admin.
  2. Open the file you’ll edit. We’ll edit the Spanish Grammatical Structures e-book.

tutor lms restrict files to course students

2- Restrict documents or files to Tutor LMS course students

Once you’re in the download editor, scroll down to the Restriction Rules section.

Now you just need to select these values to restrict your documents or files for students enrolled in a specific course:

  • Enable conditional restrictions: Yes
  • What happens when the conditions are met: Allow access
  • Condition 1: User is enrolled to course = Spanish Course (for example)
  • Update the post to save the changes.

tutor lms restrict files to course students

This is how you can easily restrict e-books or files for students enrolled in a specific Tutor LMS course.

3- How to restrict download categories for students enrolled in a specific course

If you don’t want to restrict individual downloads and files, you can restrict an entire category of downloads. You just need to follow these simple steps:

  1. Open the download list. In this example, we’ll go to Downloads > Categories.
  2. Open the category you’ll edit. We’ll open the Spanish Course Files category.

tutor lms restrict files to course students

Now scroll down to the Restriction Rules section and select these values:

  • Enable the conditional restrictions: Yes
  • Apply restrictions to: Category and posts
  • What happens when the conditions are met: Allow access
  • Condition 1: User is enrolled to course = Spanish Course
  • Update the category.

tutor lms restrict files to course students

This is how you can easily restrict document categories for users enrolled in a specific Tutor LMS course.

4- What happens when users try to access restricted files?

Open the plugin’s global settings at Settings > Post Restrictions.

Once there, you’ll see these fields and options:

  • Enable restrictions: Mark or unmark this checkbox to enable or disable the global conditions.
  • Don’t apply restrictions for these user roles: You’ll see a list of user roles for which the conditions won’t be applied. By default, we will not apply restrictions for administrators, editors, and any user with the capability edit_others_posts.
  • What happens when the post is restricted? You have several options to select what happens when the post is restricted:
    • Redirect to URL
    • Remove the content and show a message
    • Show fragment of the content and show message after fragment
  • What happens when a category is restricted? You have several options to select what happens when the post is restricted:
    • Show error 404
    • Show the normal page without posts
    • Show an error message
    • Redirect to another URL
    • Show the content of another page

Once you select the global settings, just save the changes.

That was really simple!

As you can see, it is really easy to restrict documents, e-books, projects, images, and any kind of file for users enrolled in a specific Tutor LMS course. You don’t have to program anything or hire anyone else.

You can apply this and many other restrictions to your posts, pages, events, downloads, products, recipes, courses, etc. It’s really easy with the WordPress Conditional Post Restrictions plugin.

You can download the plugin here:

Download WordPress Conditional Post Restrictions Plugin - or - Read more