• Hi,

    I want to override the template of the quiz result page because I want to add some message into the result.

    For example if the student fails on the allowable number of attempts, I want to print out “You did not pass but you can retake the quiz”

    What’s the best way to do this? It doesn’t look like there is a setting for this. There is also no hook or filter.

    I am trying to create a template for the plugins/learnpress/templates/content-quiz/js.php but it doesn’t work.

    I also found a file in learnpress/inc/templates/class-lp-template-course.php but I’m not sure what the depricated function item_quiz_content is for

    Can you guide me on how to do this?

Viewing 1 replies (of 1 total)
  • Plugin Author ThimPress

    (@thimpress)

    Hi j3remf3nandez

    Since the quiz is written in React JS, to override it, you must override the js.php file in the child theme. This can be quite challenging and prone to errors. Alternatively, if you’re familiar with customization through hooks, LearnPress offers the hook wp.hooks.doAction(‘lp-js-quiz-answer’), which you can utilize for rewriting.

    Thanks.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.