Hide unit video

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #365567
    silverchair
    Spectator
    Just 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
    .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;
    }
    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)
    #365673
    Veronica
    Moderator
    hi 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 understand
    #365714
    silverchair
    Spectator
    Thanks. But for this request, I don't mind about hiding it for instructor only. I just want to hide it from everyone, even admin.
    #365811
    Veronica
    Moderator
    yes but for that we need to check the code as this is not possible with CSS so have to check the code
    #365850
    silverchair
    Spectator
    Alright then, I'll be waiting
    #365927
    Veronica
    Moderator
    hi 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/1dwk3e0
    #365935
    silverchair
    Spectator
    This reply has been marked as private.
    #366041
    Veronica
    Moderator
    let me check this on your site
    #366042
    Veronica
    Moderator
    it's ' ' replaced when copied now working please check and confirm
    #366135
    silverchair
    Spectator
    it 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/1eeermo
    #366141
    silverchair
    Spectator
    (sorry double reply)
    #366225
    Veronica
    Moderator
    ok let us check this
    #366232
    Veronica
    Moderator
    hi 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 local
    #366363
    silverchair
    Spectator
    yes right, thanks for checking that, now it works. Thx @Veronica , you can close it
    #366371
    silverchair
    Spectator
    Aah, 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 ?
Viewing 15 posts - 1 through 15 (of 19 total)
  • The topic ‘Hide unit video’ is closed to new replies.