Modify Start and Continue course button

Home Forums Legacy Support Support queries Other issues Modify Start and Continue course button

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #349829
    somenergia
    Spectator
    Hello I have WPLMS version 4. I want to modify the course button. In wplms-customize.php i have some code like this: add_filter('wplms_take_course_button_html','custom_non_loggedin_user_redirect',9999,2); function custom_non_loggedin_user_redirect($html,$course_id){ /* some code */ } This work fine for request courses but not for free courses. Maybe there is another filter? Thanks
    #349950
    Diana
    Participant
    The above code will work for non logged in users when they click on paid course Do you want same for Free Courses as well?
    #350015
    somenergia
    Spectator
    I want to modify the course button for free courses for logged in users (starts and continue button)
    #350182
    Diana
    Participant
    Dear User, Please it's a request to explain it properly what should I modify? the color, the size? In my above response I asked that if you are asking for a popup which should open when we click on button?
    #350257
    somenergia
    Spectator
    I want to hide the button start an continue course for free courses when the user has empty some profile fields.
    #350407
    Diana
    Participant
    Need to check the hook for this if it is possible or not can you please tell me which Buddypress Profile Fields? On which I have to write the code to check if it is empty or not?
    #350511
    somenergia
    Spectator
    Thanks Diana. I want to execute this code: //si no tiene todos los campos obligatoriso del perfil llenos //se oculta el botón y se le muestra un enlace al perfil if ( is_user_logged_in() && $member_type == 'socia' && has_term("curso-para-personas-socias", "course-cat") ) { /**recorre todos los campos del perfil **/ $faltan_campos = FALSE; $campos_que_faltan = ""; $r = bp_parse_args($args['args'], array('profile_group_id' => 0, 'user_id' => $user->ID, 'hide_empty_fields' => 0), 'bp_xprofile_user_admin_profile_loop_args'); if ( bp_has_profile($r) ) { while ( bp_profile_groups() ) { bp_the_profile_group(); if ( bp_profile_group_has_fields() ) { //bp_the_profile_group_name(); while ( bp_profile_fields() ) { bp_the_profile_field(); $campo = bp_get_the_profile_field_name(); if ((bp_get_the_profile_field_is_required()) && ( !bp_field_has_data() )){ $campos_que_faltan .= $campo."<br />"; $faltan_campos = TRUE; } } } } } if ($faltan_campos) { echo "<div class='oculta-boton'>"; echo $user->display_name.", para inscribirte en este curso por favor rellena estos campos de tu perfil:<br />"; echo $campos_que_faltan; echo "user_nicename."#component=profile&action=edit'>Accede a tu perfil para rellenarlos"; echo "</div>"; return; } else { return $html; }
    #350729
    Veronica
    Moderator
    checking
    #350736
    Veronica
    Moderator
    hi in the new version(vibebp) we don't have user-id we don't have this provision in the newframe work
    #350747
    somenergia
    Spectator
    Hello Veronica I can modify the code. What I need is to know what is the hook to modify the start and stop button, for loggin users.
    #350935
    Veronica
    Moderator
    for the course button filter is wplms_take_course_button_html but as I have mentioned above we don't have user-id in the new provision
    #351322
    somenergia
    Spectator
    Hello Veronica I have this code in wplms-customizer.php: add_filter('wplms_take_course_button_html','prueba',10,2); function prueba($html,$course_id){ echo "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"; return $html; } When the product course is Request Course the string "ZZZZZ" is showing, but when the product course is Free the string is not showing. I think the filter is not executing. Here is a video: http://demos.dabne.net/Video.mp4
    #351504
    Veronica
    Moderator
    hi can you provide a URL of that course it can be possible that the filter is different on that type of course so please provide details need to check
    #351513
    somenergia
    Spectator
    This reply has been marked as private.
    #351732
    Veronica
    Moderator
    checking
Viewing 15 posts - 1 through 15 (of 22 total)
  • The topic ‘Modify Start and Continue course button’ is closed to new replies.