• Resolved kushakk

    (@kushakk)


    Hello, I am trying to set up tutor lms pro on my site and I encountered a problem, when I am trying to view the course as an instructor video of lesson not loading but if I view them as a student they work completely fine. Important note, when I am trying to open link of the video directly I am getting permission error, any help will be appreciated (I am using latest WordPress version).

    My guess is instructors can’t view their courses because they not counted as ‘enrolled’ on it, is there any way to auto enroll instructor to course he created?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @kushakk

    I think you have a plugin conflict issue. Could you check if there any plugin conflict or not? You can use this documentation for better understand: https://wpforms.com/docs/how-to-test-for-theme-or-plugin-conflicts/

    Instructors don’t need to enroll in their own courses. They can view their course from their dashboard: https://prntscr.com/tzknn0

    Thread Starter kushakk

    (@kushakk)

    Tried to disable all plugins besides tutor lms and changed theme to standard one but still face same problem.

    To be more precise i am talking about viewing course from front-end part. https://imgur.com/U0XNKST

    If i try to open source video link https://imgur.com/WlvoJck

    it shows me this page https://imgur.com/zQC0ies
    But if i try to do same steps being not author of course it works fine, so the problem is with permission of viewing course as it’s author i.e. author can’t view mp4 videos he uploads inside a lesson.

    I’ll try to reinstall tutor lms on my site to see if it helps

    Thread Starter kushakk

    (@kushakk)

    Hello again @probillals, thanks for quick replay, but I still face the same problem even after reinstalling plugin, I found a function which causes the problem at /tutor/classes/template.php on line 229 ‘play_private_video’, especially this part of code code at line 244:

    if (tutor_utils()->is_course_enrolled_by_lesson()) {
    $video_info = tutor_utils()->get_video_info();
    if ( $video_info ) {
    $stream = new Video_Stream( $video_info->path );
    $stream->start();
    }
    }else{
    _e(‘Permission denied’, ‘tutor’);
    }
    exit();

    It seems problem occurring at “tutor_utils()->is_course_enrolled_by_lesson()” in which it fails to give permission for private video for author, if i start “stream” at else statement everything works fine, but even unlogged person can view private video in this case. What would be the best course of action to tackle this problem so the author can view his video but unauthorized person can’t?

    • This reply was modified 4 years, 7 months ago by kushakk.

    Hi @kushakk
    Are you trying to access the lesson video from the URL? If yes, it’s strictly prohibited for security reasons. Please contact us via email for the fastest support at supportatthemeumdotcom.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error when trying to view video as instructor’ is closed to new replies.