Review this course button after finished course

Home Forums Legacy Support Support queries Setup issues Review this course button after finished course

Viewing 15 posts - 1 through 15 (of 37 total)
  • Author
    Posts
  • #382587
    gabrielcapi
    Spectator
    Hello, I have this website in WPLMS version 3, when a student finish a course, and enter again to the course, they don't see the "review this course" button anymore, is there a way to put it visible after finish a course? Thank you very much.
    #382592
    Veronica
    Moderator
    hi the review course will be available once the user complete the course and if the user click on the retake course then it will be only visible once the user again finished the course
    #382621
    gabrielcapi
    Spectator
    Hi @Veronica, Yes I know they can still review the course after finish, but review button inside the course is not shown if they enter to the finished course again, I would like to know if there is a way to show it if they finish the course: video thank you
    #382649
    Veronica
    Moderator
    hi there are three things you need to check for this : 1. Make sure that comments are enabled from back end course edit page . refer : http://prntscr.com/hzsywh 2. Make sure you have enabled “Post course reviews from home page” in course front end edit settings ./ refer :http://prntscr.com/hzsys5 3. User should be a course student in order to add a course review , /
    #382795
    gabrielcapi
    Spectator
    Alright, yes, all three things are considered and enabled, but when a student finishes a course and enters again to the course, the button to review course dissapear. Thank you.
    #382821
    Veronica
    Moderator
    This reply has been marked as private.
    #382854
    gabrielcapi
    Spectator
    This reply has been marked as private.
    #382893
    Veronica
    Moderator
    hi this will require the custom code: please add this in wplms-customizer.php in wplms-customizer plugin
    add_action('before_course_main_content',function(){
    	$actions = WPLMS_Actions::init();
    	remove_action('wplms_course_action_points',array($actions,'course_action_points'));
    	add_action('wplms_course_action_points',function () use($actions){
    
            $user_id = get_current_user_id();
            do_action('course_action_points',$actions->status_course_id,$actions->status_unit_id,$user_id);
            ?>
                <div class="course_action_points">
                    <h1><?php echo get_the_title($actions->status_course_id); ?></h1>
                    <?php
                   
                    ?>
                    <div class="course_time">
                        <?php
                            the_course_time("course_id=$actions->status_course_id&user_id=$user_id");
                        ?>
                    </div>
                    <?php 
    
                    do_action('wplms_course_start_after_time',$actions->status_course_id,$actions->status_unit_id);  
                ?>
                </div>
                <?php
                    echo the_course_timeline($actions->status_course_id,$actions->status_unit_id);
                    do_action('wplms_course_start_after_timeline',$actions->status_course_id,$actions->status_unit_id);
    
                    if(isset($actions->status_course_curriculum) && is_array($actions->status_course_curriculum)){
                        ?>
                        <div class="more_course">
                            <a href="<?php echo get_permalink($actions->status_course_id); ?>" class="unit_button full button"><?php _e('BACK TO COURSE','wplms'); ?></a>
                            <form action="<?php echo get_permalink($actions->status_course_id); ?>" method="post">
                            <?php
                            if($comment_status == 'open'){
                                echo '<input type="submit" name="review_course" class="review_course unit_button full button" value="'. __('REVIEW COURSE ','wplms').'" />';
                            }
                            $finishbit=bp_course_get_user_course_status($user_id,$actions->status_course_id);
                            if(is_numeric($finishbit)){
                                if($finishbit < 4){
                                    $comment_status = get_post_field('comment_status',$actions->status_course_id);
                                    
                                    echo '<input type="submit" name="submit_course" class="review_course unit_button full button" value="'. __('FINISH COURSE ','wplms').'" />';
                                }
                            }
                            ?>  
                            <?php wp_nonce_field($actions->status_course_id,'review'); ?>
                            </form>
                        </div>
                       <?php
                    }
                ?>  
            <?php
        });
    },11);
    #382973
    gabrielcapi
    Spectator
    Thank you @Veronica, I have added the code in wplms-customizer file and is not working, here is my test after cleaning caché: video proof
    #383028
    Veronica
    Moderator
    hi the hook was different: try this:
    add_action('wplms_before_course_main_content',function(){
    	$actions = WPLMS_Actions::init();
    	remove_action('wplms_course_action_points',array($actions,'course_action_points'));
    	add_action('wplms_course_action_points',function () use($actions){
    
            $user_id = get_current_user_id();
            do_action('course_action_points',$actions->status_course_id,$actions->status_unit_id,$user_id);
            ?>
                <div class="course_action_points">
                    <h1><?php echo get_the_title($actions->status_course_id); ?></h1>
                    <?php
                   
                    ?>
                    <div class="course_time">
                        <?php
                            the_course_time("course_id=$actions->status_course_id&user_id=$user_id");
                        ?>
                    </div>
                    <?php 
    
                    do_action('wplms_course_start_after_time',$actions->status_course_id,$actions->status_unit_id);  
                ?>
                </div>
                <?php
                    echo the_course_timeline($actions->status_course_id,$actions->status_unit_id);
                    do_action('wplms_course_start_after_timeline',$actions->status_course_id,$actions->status_unit_id);
    
                    if(isset($actions->status_course_curriculum) && is_array($actions->status_course_curriculum)){
                        ?>
                        <div class="more_course">
                            <a href="<?php echo get_permalink($actions->status_course_id); ?>" class="unit_button full button"><?php _e('BACK TO COURSE','wplms'); ?></a>
                            <form action="<?php echo get_permalink($actions->status_course_id); ?>" method="post">
                            <?php
                            if($comment_status == 'open'){
                                echo '<input type="submit" name="review_course" class="review_course unit_button full button" value="'. __('REVIEW COURSE ','wplms').'" />';
                            }
                            $finishbit=bp_course_get_user_course_status($user_id,$actions->status_course_id);
                            if(is_numeric($finishbit)){
                                if($finishbit < 4){
                                    $comment_status = get_post_field('comment_status',$actions->status_course_id);
                                    
                                    echo '<input type="submit" name="submit_course" class="review_course unit_button full button" value="'. __('FINISH COURSE ','wplms').'" />';
                                }
                            }
                            ?>  
                            <?php wp_nonce_field($actions->status_course_id,'review'); ?>
                            </form>
                        </div>
                       <?php
                    }
                ?>  
            <?php
        });
    },11);
    #383037
    gabrielcapi
    Spectator
    Hi @Veronica, thank you for the support, unfortunately is not working, when I enter to any course it keeps loading but is not allowing to see the course: video proof thanks!! (:
    #383082
    Veronica
    Moderator
    checking on your site...
    #383083
    Veronica
    Moderator
    This reply has been marked as private.
    #383120
    gabrielcapi
    Spectator
    This reply has been marked as private.
    #383136
    Veronica
    Moderator
    ok thanks for the details checking...
Viewing 15 posts - 1 through 15 (of 37 total)
  • The topic ‘Review this course button after finished course’ is closed to new replies.