I created a survey, and made it function as a quiz by creating a workflow that "grades" the survey after it is taken. This workflow is basically a conditional for each question compairing their answer to the correct answer, and then increments a local workflow variable with points if they got the answer correct. To save the "grade" in the quiz itself I added two questions (one named FinalScore (numeric) and one named FinalGrade ("passed" or "failed"), these are the fields that the workflow updates.
Then I customized the "All Responses" view to include those two columns. I made this view the "default" view so that after taking the survey users are redirected here. Also changed permissions, so that users can only view their own surveys, and editing surveys is not allowed, but they are allowed to submit multiple surveys.
So far, this has seemed like a manageable solution that did not require me to write any custom code. However there are some things I would like to improve, but am not sure how.
1) After users finish the survey, they get redirected to my custom "all response" view. However it takes the work flow a few seconds to run and "grade" the quiz, so they need to refresh the page after a few seconds to see their score. Is there a more elegant way to handle the entire "finishing the survey" experience for the user?
2) In order to find a place to store the graded results, I ended up creating columns (which dispalyed as questions) in the survey. Is there a better place to store their result data? And if their isn't, is there a way to not show these dummy questions?
3) Creating the work flow to grade the quiz is easy for me to do, however if a user wants to create their own quiz, creating (and testing) the grading work flow might be difficult for them. In an "Ideal" world they would either create another list with the answer key, or even someone how extend the "create survey" to include a spot for them to mark which answer is correct. I have no idea how to dynamically use that data to create a new workflow, or even if that approach is correct.
Thanks for any input, I am new to Sharepoint so if my approach has been total off base that feedback would be great too!