Pass Fail labels

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #49391
    squallhajime
    Spectator
    Hi Support, I have used your guide from below to change to pass and fail labels. https://wplms.io/support/forums/topic/use-grading-or-pass-fail-labels-instead-of-marks-percentages/ However, it is always show "fail" at the start of the course. How can I change to show N/A for 0 marks in the start. Please advise Thanks and regards.
    #49493
    H.K. Latiyan
    Participant
    Try using the below code instead of the 2nd code in the tip: function wplms_course_passfail($marks_html,$course_id){ $extract = explode('/',$marks_html); $course_marks = intval($extract[0]); $certificate_val = get_post_meta($course_id,'vibe_course_passing_percentage',true); if(isset($certificate_val) && is_numeric($certificate_val)){   if($course_marks >= $certificate_val){    $marks_html = 'PASS'; }elseif($certificate_val==0){   $marks_html = 'N.A'; }else{   $marks_html = 'FAIL'; } } return $marks_html; }
    #49542
    squallhajime
    Spectator
    Thanks for the solution, but it do not seems to work as from the attached of the student profile John Tan ([email protected]). URL: http://learning.sunnytay.com Admin Username: test Password: test@112233
    #49744
    H.K. Latiyan
    Participant
    Please refer the this tip again I have updated this tip today: https://wplms.io/support/knowledge-base/use-grading-or-pass-fail-labels-instead-of-marks-percentages/ Use the first code and it will work fine, I tested it on my test setup and it worked fine.
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Pass Fail labels’ is closed to new replies.