I entered this code to quiz, no matter what the answer wrong or right, it will always display the pass message. Even if the user failed the test.
[pass_fail id="813" pass=1]
Thanks for attending the live lecture! You may now move ahead to access its resources and proceed to class 2
[/pass_fail]
[pass_fail id="813" fail=1]
Please wait for your live lecture to proceed forward. If you've already attended but the code isn't working, contact us on 'ask for help'
[/pass_fail]
This reply has been marked as private.
also please note that this code was added to change score to fail/pass message
add_filter('wplms_course_marks',array($this,'wplms_course_passfail'),10,2);
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($course_marks==0){
$marks_html = 'N.A';
}else{
$marks_html = 'FAIL';
}
}
return $marks_html;
}
Thanks for sharing the credentials but I am not sure what credentials you gave me, because I am unable to see the whole LMS panel in your website and therefore I cannot edit your quiz, course or question.
I also noticed that your theme and plugins are at 2.5.1 version, please update it to the latest versions i.e. 2.6.1
--------------
Please check the credentials and provide the credential using which I can edit the quiz and course, to check the issue on your website.
This reply has been marked as private.
checked your site ,there was two little mistake that you were doing which were :
1. wrong quiz id in shortcode : it should be 797 but you wrote 813 .
check screenshot in private reply .
2. and you have to " before and after the parameter of shortcode .In your pass and fail parameters there were no " . it was like : [pass_fail id="797" pass=1] pass message [/pass_fail]
it should be like : [pass_fail id="797" pass="1"] pass message [/pass_fail]
This reply has been marked as private.