Support » Fixing WordPress » Custom quiz plugin

Viewing 5 replies - 1 through 5 (of 5 total)
  • Can you please write more description about what yours objective I might be able to help with some guidance.

    Thread Starter Vlastimir Samolov

    (@vlastimirsamolov)

    hi hyperonstudios

    I want to make simple quiz plugin. People can answer 5 questions and have some results at the end of their quiz.

    so are you looking for help on how to create a WordPres plugin to create the quiz plugin? or you already know how to create a WordPress plugins but you looking on how would you create a quiz app logic? help me understand more about your request. Thanks

    Thread Starter Vlastimir Samolov

    (@vlastimirsamolov)

    i know how to create wordpress plugin but yes i am looking for quiz app logic. And sorry for not explaining my questions.

    this how I would do it
    The quiz is a Custom Post

    I will supply the archive and single template for it in the plugin too unless overridden by the theme so I will check if the template exists in the theme first otherwise I will return my own supplied by the plugin.

    I will create a model class that takes the Quiz instance in its constructor(since we cant inherit from Wp_Post as it is a final class), and in the constructor, I will construct the object with any extra custom fields you will add to the Quiz post itself.

    Also will supply any methods needed in the class like setters and getter.
    Then I will create a controller class that takes my quiz model and manipulates any logic I need there, for example, the comparison with the answer, aka there will be a method that takes the user answer and check it with the model answer itself to return correct or wrong.

    I will create another class that will create a group of quizzes, this can take random quizzes from the return posts query for example and this will send this group to the user to answer.

    I will create another class to monitor the User progress and store the history with their score and answers and maybe badges as well.

    That will act as your base logic classes and you take it from there to the front end.

    I hope that helps but if you have a specific question please do not hesitate to ask.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom quiz plugin’ is closed to new replies.