Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › Restrict access to courses by IP and type
- This topic has 8 replies, 2 voices, and was last updated 7 years ago by H.K. Latiyan.
Viewing 9 posts - 1 through 9 (of 9 total)
-
AuthorPosts
-
April 25, 2017 at 8:32 pm #108818vilmondes.queirozSpectatorHello, The courses we have are for internal users and external users. Internal users are users who access the platform through our proxy server and external users are everyone else. We want to be able to specify what courses the external and internal users can view. What would you suggest, please?April 26, 2017 at 1:56 pm #108978H.K. LatiyanParticipantSorry this is not possible in wplms.April 27, 2017 at 12:11 pm #109153vilmondes.queirozSpectatorI'm trying to implement that myself, but I'm unable to override courses file. I've copied course/course-loop.php to my child theme, but it's not overriding the parent theme file. I want to override the file that lists the courses in "all-courses" and in the homepage. What am I missing?April 27, 2017 at 2:30 pm #109227H.K. LatiyanParticipantIt comes from the theme/wplms/course/course-loop.php file Please make sure you add the file in your child theme with the same name and inside the same folder, like theme/child theme/course/course-loop.phpApril 27, 2017 at 3:46 pm #109283vilmondes.queirozSpectatorYes, I know that it comes from that directory and I ensured I added the same directory to the child theme. What I noticed though is that if I make changes to the file that's in the child theme, the code shows up in the source code (ctrl+u), but it doesn't show up in the browser. It's as if the code is added and then it's replaced with the original file. I tested removing all the code from the course-loop.php file, then when I check the page source code, there's nothing there (only the header and the footer), but in the browser I see everything as if I hadn't removed anything. Please advise.April 28, 2017 at 1:42 pm #109477H.K. LatiyanParticipantThis happens due to the ajax call "course_filter" present in the vibe course module plugin. After the page is loaded this ajax call is made and it fetches all the courses to be shown. You'll have to make changes in the ajax call to reflect the changes.April 28, 2017 at 5:36 pm #109525vilmondes.queirozSpectatorRight, why is that ajax call needed and how can I abort that without losing the change when the plugin is updated? I wanted to fetch the courses with the course-loop.php file. I see that the ajax call is being made in the file "plugins/vibe-course-module/includes/course.js" at line 101: bp_filter_request( 'course', '', '', 'div.course','', 1,'{}'); The function "bp_filter_request" is in the file "_inc/global.js" Appreciate your help!April 28, 2017 at 7:22 pm #109534vilmondes.queirozSpectatorNow I understand that the ajax call is used in the pagination too, so that's why it's needed. How can I override the code that loads the courses in bp-course-filters.php? I've created a custom field in courses and I want to check the value of that field before listing the courses.April 29, 2017 at 12:56 pm #109630H.K. LatiyanParticipantIts a php code, you cannot override php codes. To change the ajax, first you need to use remove_action and then add your own action on for changing the ajax call. For more details on remove_action, refer: https://codex.wordpress.org/Function_Reference/remove_action
-
AuthorPosts
Viewing 9 posts - 1 through 9 (of 9 total)
- The topic ‘Restrict access to courses by IP and type’ is closed to new replies.