Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › Hide unit video
- This topic has 17 replies, 4 voices, and was last updated 2 years, 8 months ago by Anshuman Sahu.
-
AuthorPosts
-
July 18, 2021 at 5:28 am #365567silverchairSpectatorJust because of this: https://wplms.io/support/forums/topic/how-admin-find-the-embedded-video-url/ So I prefer to hide unit video (refer: https://prnt.sc/1ciel78) and using unit multimedia to let instructor put their embedded video. I have tried using css
but it will also hide quiz & assignment creation. I don't want that, I just want to hide Unit Video since admin can't find the embedded URL (inspecting isn't a better option).wplms_create_course_wrapper .wplms_edit_course_content .course_curriculum_builder_wrapper .vibe_vibe_course_curriculum .curriculum_elements_wrapper .add_cpt_wrapper .add_cpt_type:nth-child(5){ display: none; }
July 19, 2021 at 2:34 pm #365673VeronicaModeratorhi yes right the actual CSS will work here is: .curriculum_elements_wrapper .add_cpt_wrapper.vibebp_form .add_cpt_type:first-child {display:none !important} but it as there is no specific class for unit available here that's why it is hiding the other elements in quiz and assignment we need to check this with the code like some check like: if post == 'quiz' then this CSS as the previous provided custom for instructor only is not working on your site first we will work on that then move with other request because then it will create mess as soon as that will fix i will pick up your all topic links one by one and provide code accordingly i hope you understandJuly 19, 2021 at 4:16 pm #365714silverchairSpectatorThanks. But for this request, I don't mind about hiding it for instructor only. I just want to hide it from everyone, even admin.July 20, 2021 at 1:40 pm #365811VeronicaModeratoryes but for that we need to check the code as this is not possible with CSS so have to check the codeJuly 20, 2021 at 2:56 pm #365850silverchairSpectatorAlright then, I'll be waitingJuly 21, 2021 at 11:10 am #365927VeronicaModeratorhi add this: `add_filter('wplms_course_creation_tabs',function($tabs){ $curriculum_elements = $tabs['course_curriculum']['fields'][0]['curriculum_elements']; foreach ($curriculum_elements as $key => $curriculum_element) { if($curriculum_element['type'] == 'unit'){ foreach ($curriculum_element['types'] as $key1 => $unit_type) { if($unit_type['id']!='video'){ $new_arr[] = $unit_type; } } $curriculum_elements[$key]['types']=$new_arr; } } $tabs['course_curriculum']['fields'][0]['curriculum_elements']=$curriculum_elements; return $tabs; });` https://prnt.sc/1dwk3e0July 21, 2021 at 11:48 am #365935silverchairSpectatorThis reply has been marked as private.July 22, 2021 at 8:04 am #366041VeronicaModeratorlet me check this on your siteJuly 22, 2021 at 8:23 am #366042VeronicaModeratorit's ' ' replaced when copied now working please check and confirmJuly 22, 2021 at 3:57 pm #366135silverchairSpectatorit works, but it hides unit multimedia also. I have comment out my css code to hide other unit that I want to hide, I just want to checked that it works or not, and what I found is unit multimedia also hidden. I don't want that. Refer: https://prnt.sc/1eeermoJuly 22, 2021 at 4:20 pm #366141silverchairSpectator(sorry double reply)July 23, 2021 at 11:47 am #366225VeronicaModeratorok let us check thisJuly 23, 2021 at 12:07 pm #366232VeronicaModeratorhi see you have applied the CSS to hide this https://prnt.sc/1er3j14 on 2nd child when it is hide above posted code runs and fetch the so after fetching multimedia comes at 2nd place and the CSS applies on it https://prnt.sc/1er3trb that's why this is happening on your site as the above provided code working fine on localJuly 25, 2021 at 5:59 am #366363silverchairSpectatoryes right, thanks for checking that, now it works. Thx @Veronica , you can close itJuly 25, 2021 at 5:11 pm #366371silverchairSpectatorAah, I realized why I use that css, because I want to hide Dynamic Quiz, refer: https://prnt.sc/1fs149y . Now after I comment out those css, this Dynamic Quiz shown again. Any suggestion to hide just Dynamic Quiz ? -
AuthorPosts
- The topic ‘Hide unit video’ is closed to new replies.