Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › How to hide free sections and units for course students
- This topic has 16 replies, 3 voices, and was last updated 2 years, 10 months ago by
Diana.
-
AuthorPosts
-
September 19, 2020 at 10:47 pm #312452
ateya3d
SpectatorHello how can i hide free sections and units for course students that already subscribed to this course if user subscribe to course all free will be invisible to him ... how can i do this ? i use version 3.9.9September 20, 2020 at 1:58 am #312462MrVibe
KeymasterPlease clarify the request. You want to hide the free 1. We have free units and First section free. So when you say free section do you mean the first section free feature ? 2. When you say hide, you want to remove them from the curriculum, so the user will not see it, which means it is a different curriculum for the course. or you just want to hide the term "free" ? We will need to do a feasibility check, if this is possible in the 3.9 framework or now.September 20, 2020 at 10:33 am #312515ateya3d
SpectatorThanks for your reply i know my request may be not requested before .. in sample words .. i want free units and free sections appear only for guests and non subscribed users to course .. if any one subscribe to course all free not visible to him and only found the non free sections and lecturesSeptember 21, 2020 at 11:45 am #312765Diana
ParticipantFor part 1, we have this setting in v3: https://wplms.io/support/knowledge-base/guest-user/ But for this: "if anyone subscribe to course all free not visible to him and only found the non-free sections and lectures" Need to check in the codeJanuary 9, 2021 at 10:59 am #333022ateya3d
SpectatorDiana 4 month to check the code ??? this is very terrible follow up for your support Reply with the problem solvingJanuary 9, 2021 at 2:09 pm #333049Diana
ParticipantI am really sorry sir, it just slipped from my mind. But please from the next time do ping on your topics as a reminder Will post here in 3 hhoursJanuary 9, 2021 at 2:16 pm #333052ateya3d
Spectator@Dina When we post to ping the support says please don't pump your post OK i will wait for the next 3 hours as you sayJanuary 9, 2021 at 4:43 pm #333073Diana
ParticipantThis reply has been marked as private.January 9, 2021 at 5:40 pm #333081ateya3d
SpectatorHello Diana can you give me the final code to hide To hide “free Units” from Subscribed users and i will use it and tell you the results give me the code and i add it in my functions.phpJanuary 11, 2021 at 11:14 am #333243ateya3d
Spectatorcan i get a reply Diana ???? why all this delay ??January 11, 2021 at 2:00 pm #333274MrVibe
Keymasterok, I am sharing based on following assumptions as details are missing in the topic above : 1. We are talking about the Course page here. The curriculum which shows on the course page. 2. We are not talking about guest user feature. -- Any user who subscribes to the course should not see "Free" unit direct links int the curriculum. --- code in next reply.January 11, 2021 at 2:03 pm #333278MrVibe
Keymaster
This code will work in version 3 sites and will remove all links from the curriculum for any user who is subscribed to the course.add_filter('bp_course_get_full_course_curriculum',function($curriculum,$course_id){ if(is_user_logged_in() && bp_course_is_member($course_id,get_current_user_id())){ foreach($curriculum as $i=>$link){ if(!empty($link['link'])){ $curriculum[$i]['link']=''; } } } return $curriculum; },10,2);
January 11, 2021 at 3:44 pm #333320ateya3d
SpectatorThis reply has been marked as private.January 12, 2021 at 6:44 pm #333565Diana
ParticipantPosting in 2 hoursJanuary 12, 2021 at 7:39 pm #333572Diana
ParticipantThis reply has been marked as private. -
AuthorPosts
- The topic ‘How to hide free sections and units for course students’ is closed to new replies.