function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
marella1800marella1800 

quiz

when creating a quiz,How can we store the result ?how can we differentiate which is right and wrong?and how can we display result finally with marks??

ibtesamibtesam

How about this approach.

 

Make two objects "Question" and "Answer". Make a look up relation to question  on answer .

Query and Display the questions from database using SOQL query and check for its corresponding answers in your apex code.


Count the correct answers in the controller of page and store it in a temporary variable.

Display the count at the end of quiz.

marella1800marella1800

Hi thanq...may i know How can we store the answer and how can we compare it with the correct answer???

 

also how can we get the dynamic checkboxes from backend...suppose sum questions have 2 choices,where as other have 6..but am getting all 6 check boxes..