ALL unit popup

Home Forums Legacy Support Support queries Setup issues ALL unit popup

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13728
    rockylin
    Spectator
    Can i let all unit popup?Not just free unit popup,thanks.
    #13756
    Anshuman Sahu
    Keymaster
    Add this code in your wplms-customizer.php file in wplms customizer plugin : add_filter('wplms_curriculum_course_link','enable_course_students_view_units_curriculum');  function enable_course_students_view_units_curriculum($enable){   $user_id = get_current_user_id(); $course_id = get_the_ID(); if(wplms_user_course_active_check($user_id,$course_id)) return 1; return $enable; } add_filter('wplms_direct_access_tounit','enable_access_tostudents',10,2); function enable_access_tostudents($flag,$post){     $user_id = get_current_user_id();     $check = get_user_meta($user_id,$post->ID,true);     if(!empty($check)){         return 0;     }    return $flag; } add_filter('wplms_course_curriculum_free_access','wplms_custom_course_curriculum_free_access',10,3); function wplms_custom_course_curriculum_free_access($html,$lesson,$free){             if(vibe_validate($free))                 $html ='<a href="'.get_permalink($lesson).'" class="ajax_unit">'.get_the_title($lesson).(vibe_validate($free)?'<span>'.__('FREE','vibe').'</span>':'').'</a>';             return $html;         }     4. Add the following code in WPLMS Customizer -> custom.js file : (requires FTP)   Code:     jQuery(document).ready(function(){    jQuery('.ajax_unit').magnificPopup({           type: 'ajax',         alignTop: true,         fixedContentPos: true,         fixedBgPos: true,         overflowY: 'auto',         closeBtnInside: true,         preloader: false,         midClick: true,         removalDelay: 300,         mainClass: 'my-mfp-zoom-in',         callbacks: {           parseAjax: function(mfpResponse) {              mfpResponse.data = jQuery(mfpResponse.data).find('.unit_wrap');           },           ajaxContentAdded: function() {              // jQuery('video,audio').mediaelementplayer();               jQuery('.fitvids').fitVids();               jQuery('.tip').tooltip();               jQuery('.nav-tabs li:first a').tab('show');               jQuery('.nav-tabs li a').click(function(event){                   event.preventDefault();                 jQuery(this).tab('show');               });           }         }     });   });
    #14363
    rockylin
    Spectator
    Hi Alex: i'm already add those code in plugin but it ddin't work. can you check? here is my web info url:http://supershortcut.com/wp-admin/ account:wplms password:L3Y1@vXg@9)@j@Pi^7Pg(R1j thanks.
    #14494
    Anshuman Sahu
    Keymaster
    I have modified the code and it seems it have done what you were asking . Please check . Note that only students which are added to the course will be able to see the units from the curriculum in popup . 
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘ALL unit popup’ is closed to new replies.