Expand my Community achievements bar.

SOLVED

Custom quiz component approach in AEM

Avatar

Level 1

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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.

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

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.

Avatar

Community Advisor

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)