Home › Forums › Legacy Support › Support queries › Setup issues › Review this course button after finished course
- This topic has 36 replies, 3 voices, and was last updated 2 years, 9 months ago by
Veronica.
-
AuthorPosts
-
March 28, 2022 at 9:51 pm #382587
gabrielcapi
SpectatorHello, 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.March 29, 2022 at 8:09 am #382592Veronica
Moderatorhi 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 courseMarch 29, 2022 at 4:54 pm #382621gabrielcapi
SpectatorHi @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 youMarch 30, 2022 at 8:23 am #382649Veronica
Moderatorhi 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 , /March 31, 2022 at 5:17 pm #382795gabrielcapi
SpectatorAlright, 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.April 1, 2022 at 10:22 am #382821Veronica
ModeratorThis reply has been marked as private.April 1, 2022 at 9:18 pm #382854gabrielcapi
SpectatorThis reply has been marked as private.April 2, 2022 at 3:37 pm #382893Veronica
Moderatorhi this will require the custom code: please add this in wplms-customizer.php in wplms-customizer pluginadd_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);
April 4, 2022 at 4:31 pm #382973gabrielcapi
SpectatorThank you @Veronica, I have added the code in wplms-customizer file and is not working, here is my test after cleaning caché: video proofApril 5, 2022 at 3:09 pm #383028Veronica
Moderatorhi 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);
April 5, 2022 at 3:57 pm #383037gabrielcapi
SpectatorHi @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!! (:April 6, 2022 at 11:26 am #383082Veronica
Moderatorchecking on your site...April 6, 2022 at 11:47 am #383083Veronica
ModeratorThis reply has been marked as private.April 6, 2022 at 10:01 pm #383120gabrielcapi
SpectatorThis reply has been marked as private.April 7, 2022 at 8:27 am #383136Veronica
Moderatorok thanks for the details checking... -
AuthorPosts
- The topic ‘Review this course button after finished course’ is closed to new replies.