Forums page with sidebar in wplms

If you want side bar on the forums then please follow these steps : 1. Install and activate the blank child theme if you are not using any(available in wplms package) . If you are already using child theme then there is no need to do above . 2. Now […]

Adding custom field in course setting

To add field in back end course edit  : Please add this code in your wplms-customizer.php file in wplms customizer plugin : add_filter(‘wplms_course_metabox’,’custom_fileds’); function custom_fileds($field1){ $prefix = ‘vibe_’; $field1[]=array( // Text Input ‘label’ => __(‘Custom item menu’,’vibe-customtypes’), // <label> ‘desc’ => __(‘Put description’,’vibe-customtypes’), // description ‘id’ => $prefix.’field1′, // field […]

Show custom bp nav menu item for instructor only on his profile

Please add the given code in your wplms-cutomizer.php file in wplms-customizer plugin : add_action( ‘bp_setup_nav’, ‘create_lesson_setup_nav’); function create_lesson_setup_nav(){ global $bp; if( current_user_can(‘edit_posts’)){ bp_core_new_nav_item( array( ‘name’ => __(‘Lesson Planner’, ‘Vibe’ ), ‘slug’ => ‘lesson-planner’, ‘position’ => 100, ‘screen_function’ => ‘wplms_create_lesson_planner_redirect’, ‘show_for_displayed_user’ => false ) ); } } function wplms_create_lesson_planner_redirect(){ wp_redirect(‘http://scholars.thehistorytutor.com/lesson-planner’,’301′); exit; […]

Hide certificates and badges from instructor profile

Please add the given code in your wplms-customizer.php file in wplms-customizer plugin : add_action(‘init’,’wplms_remove_snapshot_for_instructors’,11); function wplms_remove_snapshot_for_instructors(){ global $bp; if(user_can( $bp->displayed_user->id, ‘edit_posts’)){ remove_action(‘bp_before_profile_content’,’show_profile_snapshot’); } }  

Certification and evaluation of course based on the final quiz

Please add the given code in your wplms-customizer.php file in wplms-customizer plugin : add_filter(‘wplms_course_student_marks’,’student_marks’,999,3); function student_marks($student_marks,$id,$user_id){ $curriculum=bp_course_get_curriculum_units($id); if(get_post_type($curriculum[(count($curriculum)-1)]) == ‘quiz’){ $student_marks=get_post_meta($curriculum[(count($curriculum)-1)],$user_id,true); } return $student_marks; } add_filter(‘wplms_course_maximum_marks’,’total_marks’,999,3); function total_marks($total_marks,$id,$user_id){ $curriculum=bp_course_get_curriculum_units($id);//vibe_sanitize(get_post_meta($id,’vibe_course_curriculum’,false)); if(is_numeric($curriculum[(count($curriculum)-1)])){ if(get_post_type($curriculum[(count($curriculum)-1)]) == ‘quiz’){ $questions = vibe_sanitize(get_post_meta($curriculum[(count($curriculum)-1)],’quiz_questions’.$user_id,false)); if(!isset($questions) || !is_array($questions)) $questions = vibe_sanitize(get_post_meta($c,’vibe_quiz_questions’,false)); $total_marks = array_sum($questions[‘marks’]); } } return $total_marks; } […]

Login error on take thsi course if not logged in

Please add this code in your wplms-customizer.php file in wplms-customizer plugin  : add_filter(‘wplms_course_product_id’,’error_if_not_loggedin’,10,2); function error_if_not_loggedin($link,$course_id){ if(!is_user_logged_in()){ $link=’?error=login’; return $link; }else{ return $link; } }    

Buddydrive integration with wplms

Please add the given code in your wplms customizer.php file in wplms customizer plugin : add_action( ‘bp_after_member_activity_post_form’, ‘bp_global_activity’ ); add_action( ‘bp_activity_post_form_options’, ‘bp_global_activity’ ); function bp_global_activity() { echo ‘<style> body.activity.bp-user #buddypress #buddydrive-btn, body.activity.directory #buddypress #buddydrive-btn, body.single-item.groups #buddypress #buddydrive-btn{ position: absolute; bottom: 22px; right: 120px; } #buddypress form#whats-new-form #whats-new-content { position: relative; […]

Attachments in unit

You need to add the given code in your wp-content/plugins/wplms-customizer/wplms-customizer.php file : add_post_type_support(‘unit’,’thumbnail’); Then goto to edit unit page from backend and click on add media button from the dropdown select uploaded to this page only. Then click on upload media tab and upload a file (not image).You will see […]

Apply drip feed based on duration of unit

This feature will be available in vibe custom types plugin version 1.9.8.2 1. Enable “Enable Unit Time as Drip Duration” from wp-admin ->Lms ->settings->general : 2. Provide duration in your units : Now the duration of the unit will be the amount of drip feed . Student will not be […]