Course duration show – certificate

Home Forums Legacy Support Support queries Styling issues Course duration show – certificate

Viewing 3 posts - 16 through 18 (of 18 total)
  • Author
    Posts
  • #268818
    Diana
    Participant
    This reply has been marked as private.
    #268964
    tuaptitud
    Spectator
    If I offer a course that will last X hours (the sum of all units + exams), then I have to give a certificate for those hours. If the student completes the course in X + 10, X + 20 ... etc hours, it does not matter. The certificate is for X hours, since that amount of time lasts the content of the course. That is what I really need, I hope it is clear. I have repeated it many times.
    #269208
    Diana
    Participant
    @tuaptitud, Okay, I am really sorry that the conversation leads to in wrong direction Please comment out that code from your wplms customizer plugin and then add this one add_shortcode('vibe_show_total_unit_duration','vibe_show_total_unit_duration'); function vibe_show_total_unit_duration( $atts, $content = null ){   $user_id=$_GET['u'];   $course_id=$_GET['c'];   $course_curriculum = bp_course_get_curriculum($course_id);     if(!empty($course_curriculum)){       $duration = 0;       foreach($course_curriculum as $key => $item){            if(is_numeric($item)){            $post_type = get_post_type($item);           if( $post_type == 'unit' && function_exists('bp_course_get_unit_duration')){             $duration += bp_course_get_unit_duration($item);           }else if($post_type == 'quiz' && function_exists('bp_course_get_quiz_duration')){             $duration += bp_course_get_quiz_duration($item);           }         }       }         if(function_exists('tofriendlytime')){         $duration = tofriendlytime($duration),$duration;         return $duration;       }     }else{       return '[vibe_show_total_unit_duration]';     } }   Then use this shortcode : [vibe_show_total_unit_duration] Let me know if this is working correctly or not
Viewing 3 posts - 16 through 18 (of 18 total)
  • The topic ‘Course duration show – certificate’ is closed to new replies.