Custom quiz component approach in AEM | Community
Skip to main content
July 16, 2021
Solved

Custom quiz component approach in AEM

  • July 16, 2021
  • 2 replies
  • 2311 views

Hi Team,

I need some guidelines/approach on creating a quiz component in AEM.

All the previous posts related to quiz component provides some example urls but they are not available anymore.

As the quizzes are one-off special cases - any guidelines , examples would be highly appreciated.

 

Kind regards,

Surajit

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Kiran_Vedantam

Hi @surajitb81,

 

This actually depends upon the customer's requirement. But here are some inputs:

  • If your quiz component has only true or false
    • You can create a service - which holds all the Q&A. Once the question is submitted, you can validate it against the answers and provide the result
      • Drawback: Multiple server calls
    • You can also try the Form component for this use case
  • If your quiz component has fill in the blanks as well
    • You need to save the submitted answers - somewhere in the JCR or a file or send it to any CRM's, validate it, and provide the result later - mostly via email
  • The UI part is all up to your imagination here

 

Hope this helps.

 

Thanks,

Kiran Vedantam.

2 replies

Kiran_Vedantam
Community Advisor
Kiran_VedantamCommunity AdvisorAccepted solution
Community Advisor
July 16, 2021

Hi @surajitb81,

 

This actually depends upon the customer's requirement. But here are some inputs:

  • If your quiz component has only true or false
    • You can create a service - which holds all the Q&A. Once the question is submitted, you can validate it against the answers and provide the result
      • Drawback: Multiple server calls
    • You can also try the Form component for this use case
  • If your quiz component has fill in the blanks as well
    • You need to save the submitted answers - somewhere in the JCR or a file or send it to any CRM's, validate it, and provide the result later - mostly via email
  • The UI part is all up to your imagination here

 

Hope this helps.

 

Thanks,

Kiran Vedantam.

Shubham_borole
Community Advisor
Community Advisor
July 18, 2021

Hi,

 

- Look to create a basic one level quiz component. The authoring options will be a question and say 3-5 Answers (fieldsets or tabs) The lower limit can be set as required. In answer field you can provide Display Answer option and the value (correct/incorrect) All the answer options can be displayed as list. And on click just display the equivalent answer option.

- If the answer selection needs to pop another question explore providing a parsys within the component to allow the same component.

- Create a container and item component. container can contain basic information on the quiz and each item can contain a Question a correct ans and other options (incorrect)