Jump to content

Courses Knowledge Check Quizzes

Recommended Posts

I'm building a Training Program website with multiple courses in Squarespace. We'd like to be able to have Knowledge Check Quizzes after each chapter before users can move on to the next one. Does Squarespace plan on adding this feature anytime soon? It's a typical Learning Management System feature that all of the competition uses. If not, how do I accomplish this with a third-party system or code? Any recommendations?

Link to comment
  • 3 months later...
  • 1 month later...
  • 4 weeks later...
  • 1 month later...
  • 3 weeks later...
  • 1 month later...

I added a "code" block and used this simple HTML code to add quizzes to my pages: 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Quizlet</title>
    <style>
        body {
            font-family: Arial, sans-serif;
        }
        .quiz-container {
            max-width: 600px;
            margin: 0 auto;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 5px;
        }
        .question {
            font-size: 1.2em;
            margin-bottom: 20px;
        }
        .answer {
            display: flex;
            align-items: center;
            margin-bottom: 10px;
            cursor: pointer;
        }
        .answer input[type="radio"] {
            margin-right: 10px;
        }
        .correct {
            display: none;
            margin-left: 10px;
            color: green;
            font-weight: bold;
        }
    </style>
</head>
<body>

<div class="quiz-container">
    <div class="question">What is a chord in music?</div>
    <div class="answer">
        <input type="radio" name="answer" value="wrong" id="answer1">
        <label for="answer1">A single musical note played repeatedly</label>
        <span class="correct" id="correct1">✔</span>
    </div>
    <div class="answer">
        <input type="radio" name="answer" value="wrong" id="answer2">
        <label for="answer2">Two musical notes played one after the other</label>
        <span class="correct" id="correct2">✔</span>
    </div>
    <div class="answer">
        <input type="radio" name="answer" value="correct" id="answer3">
        <label for="answer3">A combination of three or more different musical notes played simultaneously</label>
        <span class="correct" id="correct3">✔</span>
    </div>
</div>

<script>
    document.querySelectorAll('input[type="radio"]').forEach(radio => {
        radio.addEventListener('change', function() {
            if (this.value === 'correct') {
                document.getElementById('correct3').style.display = 'inline';
            } else {
                document.getElementById('correct3').style.display = 'none';
            }
        });
    });
</script>

</body>
</html>

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.