Okay
  Public Ticket #3116232
Hide correct answers in quiz
Closed

Comments

  • Arunpal started the conversation

    Hello,

    I have pointed to this issue earlier also that " How to Hide correct/incorrect answers in the quizzes of WPLSM" and in the solution, the team answered backed to add this code in your wplms-customizer.php file in wplms customizer plugin :

    add_filter('wplms_show_quiz_correct_answer',function($x){return false;},999999);

    I did the same... But nothing changed, still, the quiz showed correct/incorrect answers after submitting the quiz.

    So could anyone help me out...

    hlu1o2.jpg

    5359620514.png


  • [deleted] replied

    add this code in your wplms-customizer.php file in wplms customizer plugin : 


    add_filter('bp_course_api_get_user_single_quiz_data',function($data){
      if(!empty($data['meta']['questions'])){
        foreach ($data['meta']['questions'] as $key => $q) {
          $data['meta']['questions'][$key]['show_correct_answer'] = false;
          
        }
      }
      return $data;
    });