quiz set to small text
correct answer is
<New Folder
the bracket < get saved as < in custom fields
when the user enters correctly the answear <New Folder it gets flagged as incorrect
MkModerator
Please share relevant course and quiz details. So that I can check it as soon as possible. waiting for your response.
MkModerator
On my local its working.
I tried by various options like <new and <new data.
and its giving correct result.
This reply has been marked as private.
please try adding this given code in your wplms-customizer.php file in wplms customizer plugin :
add_filter('wplms_get_answer_object_meta_query',function($query){
unset($query['meta_query']);
return $query;
});
also for small text question you have to put exact correct answer in correct answer field not the option number .
the option number was added later since small text wasnt working
added the code but still ot working
add_filter('wplms_get_answer_object_meta_query',function($query){
unset($query['meta_query']);
return $query;
});
MkModerator
Please share FTP credentials in private reply.
I need to check in your codes.
This reply has been marked as private.
MkModerator
Thanks for the credentials. I will check and reply to you tomorrow.
MkModerator
Finally I found a solution.
I added this code in your customizer.
add_filter('wplms_text_correct_answer','custom_wplms_text_correct_answer',10,2);
function custom_wplms_text_correct_answer($str_lowered_c_answer,$c_answer){
$str_lowered_c_answer = str_replace('<','',$str_lowered_c_answer);
$str_lowered_c_answer = str_replace('<','',$str_lowered_c_answer);
$str_lowered_c_answer = str_replace('<','',$str_lowered_c_answer);
return $str_lowered_c_answer;
}
add_filter('bp_course_save_question_quiz_answer',function($args){
$args['comment_content'] = str_replace('<','<',$args['comment_content']);
return $args;
});
Now its working. Please check and reply.
hi, the code fixed problem with <
however other symbols still not working e.g >
https://eforensicsmag.com/wp-admin/post.php?post=67652&action=edit
it seems the problem occurs with all special characters
MkModerator
I have changed your customization code. It should work now.
For some special characters it will not work we will have to add it in custom.
Or fix will be released in the next update.