Quizzes Integration

Get the first active poll/quiz (sorted by start time)

<div class="acm_quiz_config"></div>

or

<script class="acm_quiz_config" type="application/json"></script>

2 ways to set up the configuration

1. via tag data-config:

<div class="acm_quiz_config" data-config='[JSON_CONFIG]'></div>

or

<script class="acm_quiz_config" data-config='[JSON_CONFIG]' type="application/json"></script>

2. inside tag script

<script class="acm_quiz_config" type="application/json">[JSON_CONFIG]</script>

Configuration format: JSON

Integration of a specific quiz/poll/vote

By ID

<div class="acm_quiz_config" data-config='{"id":"[ID]"}'></div>

or

<script class="acm_quiz_config" data-config='{"id":"[ID]"}' type="application/json"></script>

or

<script class="acm_quiz_config" type="application/json">{"id":"[ID]"}</script>

By TAG

<div class="acm_quiz_config" data-config='{"tag":"[TAG]"}'></div>

or

<script class="acm_quiz_config" data-config='{"tag":"[TAG]"}' type="application/json"></script>

or

<script class="acm_quiz_config" type="application/json">{"tag":"[TAG]"}</script>

"[TAG]" - allowed values: "a-z0-9_", i.e.: "test_1"

Polls/Quizzes wrappers

There is an opportunity to wrap polls/quizzes via custom HTML:

<script class="acm_quiz_config" data-config='[JSON_CONFIG]' type="text/template"> ...ANY_HTML_CODE... <div class="acm_widget"></div> ...ANY_HTML_CODE... </script>

The ANY_HTML_CODE will be shown only if a wrapped poll/quiz is active.

Differences

1. type="text/template" instead of type="application/json"

2. It's needed to mark a place for a poll/quiz insite ANY_HTML_CODE via <div class="acm_widget"></div>