Convika

Още не е на български, затова е на английски.

Collect scores from an AI-made HTML quiz with Google Forms

Quick answer

Add a prefilled Google Forms link to your HTML quiz's results screen. The quiz fills in the score and missed questions; students review them and press Submit in Google Forms. Use this for practice records: students can edit the score before sending it.

Publish my quiz

Free plan: no credit card, 1 published page.

On this page

A quiz made with ChatGPT, Claude, or Gemini can show a score on a student's screen. To see that result yourself, add a link that opens your Google Form with the score already filled in. The student checks the answers and sends the form; you read the responses in Google Forms or a linked spreadsheet.

This guide covers that handoff, including a complete example you can save as an HTML file. For making the quiz and distributing it to a class, start with an AI quiz or game for class.

Choose how the results should reach you

MethodWho supplies the score?What students doUseful for
HTML quiz with a prefilled form linkThe quiz calculates it; the student can edit itFinish the quiz, open the form, and submitPractice and homework records
Google Forms quizGoogle Forms grades against your answer keyAnswer the questions inside Google FormsA marked quiz
A separate result formThe student types the scoreCopy the result into the formA small group or a quick trial

For a marked quiz, Google Forms supports answer keys and points. A prefilled result field is a suggested answer that the student can change. It is suitable when you want to keep the AI-made quiz's interactions and collect a practice record afterward.

Set up result collection in 5 steps

1. Prepare and publish the form

Create short-answer fields for a class nickname or student number, lesson, score, and missed questions. Keep View results summary off so responders cannot see the class's answers. Enabling Limit to 1 response requires a Google sign-in. Publish the form and choose who can respond; test access with the kind of account your students will use. These settings are described in Google's form-sharing help.

Use a class nickname rather than a full name in this example. The link will contain the values; see what the link records before choosing your fields.

2. Find each field's entry number

In the form's More menu, choose Pre-fill form. Enter recognizable samples such as NAME, LESSON, 99, and MISSED, then use Get link. The copied URL will look like this; the numbers below are examples:

https://docs.google.com/forms/d/e/FORM_ID/viewform?usp=pp_url&entry.1000000001=NAME&entry.1000000002=LESSON&entry.1000000003=99&entry.1000000004=MISSED

Each entry. number identifies a field. Match it to the sample value after = and keep that mapping. For instance, the field before =99 is the score field. Recreate this mapping if you replace questions in the form.

In the example below, change FORM_URL to your copied URL up to /viewform, replace the 4 values in FIELD, and set LESSON. The script calculates the score, builds the URL with correctly encoded values, and enables the link when a nickname is present.

To adapt an existing quiz, send its code to your AI with this request:

Add a results link to this HTML quiz.
Count correct answers and the numbers of missed questions.
Add a class nickname input, trimmed to 20 characters.
Build an <a> link using URL and URLSearchParams:
- Base URL: [my Google Form URL, ending in /viewform]
- usp=pp_url
- [nickname entry number]: the nickname
- [lesson entry number]: [lesson name]
- [score entry number]: the number correct
- [missed entry number]: comma-separated question numbers, or None
Keep the link disabled until a nickname is present.
Open the form in a new tab only when the student clicks the link.
The student reviews and submits the Google Form. Add no automatic POST or fetch.
Keep the questions and existing scoring rules unchanged.

4. Test a complete submission yourself

Save the finished code as an .html file and open it in a browser. Solve the quiz, enter a test nickname, open the result link, check all 4 fields, and submit the Google Form. Check that the response arrived before sharing the quiz.

To test the hosted version in Convika, create an account. On Put your HTML page online, choose Upload a file or Paste code, then Create my preview and Open preview. This account preview runs the quiz's scripts. The anonymous preview from the free upload tool keeps scripts off, so use the account preview for this test. Test the form link there too, then repeat once from the published page.

5. Publish and share the quiz

Click Publish page. Under Who can open this page?, choose Public, then Next. The first time, click Publish free. The page goes live with the Convika bar; Publish without the Convika bar opens Pro's order.

Send the published URL through Google Classroom or make a QR code. Keep student names and collected scores out of the quiz page itself: a Public page can be opened by anyone with the link and may appear in search results.

When you change a question, use Update from an HTML file on the existing page. Test the new version, then publish it at the same URL. Updating a page without changing its link covers that workflow. Claude or Codex connected through MCP can also help update the page; you choose when to publish it.

A complete quiz with a result link

This 3-question science example works as one HTML file. Replace FORM_URL, FIELD, and LESSON before sharing it. With the placeholder URL, you can try the questions, but the results link stays disabled.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Science practice quiz</title>
<style>
  body { font-family: system-ui, sans-serif; max-width: 32rem; margin: 0 auto; padding: 1rem 1rem 5rem; line-height: 1.6; }
  button, input, #send { display: block; box-sizing: border-box; width: 100%; margin: .5rem 0; padding: .8rem; font-size: 1.1rem; border-radius: .5rem; }
  #send { background: #1a73e8; color: #fff; text-align: center; text-decoration: none; }
  #send:not([href]) { background: #9aa0a6; }
</style>
</head>
<body>
<h1>Science practice quiz</h1>
<p id="question"></p>
<div id="choices"></div>
<section id="result" hidden>
  <p id="score"></p>
  <label for="nickname">Class nickname or student number</label>
  <input id="nickname" maxlength="20" autocomplete="off">
  <a id="send" target="_blank" rel="noopener">Review my results in Google Forms</a>
  <p id="note">Review the filled answers, then press Submit in Google Forms.</p>
</section>
<script>
// Teacher: replace FORM_URL, FIELD, and LESSON
const FORM_URL = "https://docs.google.com/forms/d/e/EXAMPLE_FORM_ID/viewform";
const FIELD = {
  name: "entry.1000000001",
  lesson: "entry.1000000002",
  score: "entry.1000000003",
  missed: "entry.1000000004",
};
const LESSON = "Science lesson 3";

const QUESTIONS = [
  { text: "Which planet is closest to the Sun?", choices: ["Mercury", "Venus", "Earth", "Mars"], answer: 0 },
  { text: "What do plants absorb for photosynthesis?", choices: ["Helium", "Carbon dioxide", "Neon", "Hydrogen"], answer: 1 },
  { text: "Which material is attracted to a magnet?", choices: ["Wood", "Glass", "Iron", "Paper"], answer: 2 },
];

const ready = !FORM_URL.includes("EXAMPLE_FORM_ID");
let index = 0;
let score = 0;
const missed = [];

function showQuestion() {
  const q = QUESTIONS[index];
  document.getElementById("question").textContent = `${index + 1}. ${q.text}`;
  const box = document.getElementById("choices");
  box.replaceChildren();
  q.choices.forEach((label, i) => {
    const button = document.createElement("button");
    button.type = "button";
    button.textContent = label;
    button.addEventListener("click", () => answer(i));
    box.append(button);
  });
}

function answer(i) {
  if (i === QUESTIONS[index].answer) score += 1;
  else missed.push(index + 1);
  index += 1;
  if (index < QUESTIONS.length) showQuestion();
  else showResult();
}

function formLink(name) {
  const url = new URL(FORM_URL);
  url.searchParams.set("usp", "pp_url");
  url.searchParams.set(FIELD.name, name);
  url.searchParams.set(FIELD.lesson, LESSON);
  url.searchParams.set(FIELD.score, String(score));
  url.searchParams.set(FIELD.missed, missed.length ? missed.join(", ") : "None");
  return url.href;
}

function updateLink() {
  const send = document.getElementById("send");
  const name = document.getElementById("nickname").value.trim().slice(0, 20);
  if (ready && name) send.setAttribute("href", formLink(name));
  else send.removeAttribute("href");
}

function showResult() {
  document.getElementById("question").textContent = "";
  document.getElementById("choices").replaceChildren();
  document.getElementById("score").textContent = `${score} of ${QUESTIONS.length} correct`;
  if (!ready) {
    document.getElementById("note").textContent =
      "Teacher: replace FORM_URL and FIELD with the values from your own prefilled form link.";
  }
  document.getElementById("result").hidden = false;
  updateLink();
}

document.getElementById("nickname").addEventListener("input", updateLink);
showQuestion();
</script>
</body>
</html>

The URL API keeps characters such as &, #, and accented letters inside their own field. The example builds a link and waits for a click. Opening that link sends its values to Google; they become a form response only after the student submits.

Check that results arrived

Open the form's Responses tab to review submissions. Use Individual to check your test response and Link to Sheets for a spreadsheet. To close collection, open Published and turn off Accepting responses. Google's response-management help covers these controls.

For a classroom check, ask students to show the form's confirmation screen. Decide in advance how to handle duplicate submissions, and exclude your test entry from the class results.

What you seeWhat to check
The results link stays disabledReplace EXAMPLE_FORM_ID and enter a nickname
A value lands in the wrong fieldCompare FIELD with a fresh prefilled link
The form requests a sign-inCheck one-response, email collection, and responder-access settings
The student finished the quiz but no response arrivedHave them open the form and finish its submission step
The form refuses responsesCheck that it is published and accepting responses

What the link records

Use a class nickname or student number that you can match privately. Avoid putting full names, email addresses, or sensitive information into this example's URL. The prefilled values reach Google when the link opens and can remain in browser history.

Convika records clicked link destinations on published pages for page analytics. This example's destination includes the nickname and score, so those values can also appear in Convika's analytics records. The form's responses are the record to use for your class. See the privacy policy for Convika's data handling.

Students can edit the prefilled score or the URL itself. Use these submissions as practice records; for formal grading, have students answer a Google Forms quiz with an answer key.

Frequently asked questions

How do I collect scores from an HTML quiz?

Create a Google Form for the result fields, get a prefilled link to find each field's entry number, and make the quiz fill those parameters on its results screen. Students open the link, review the fields, and submit the form.

Does the quiz automatically send results to Google Sheets?

The example opens a prefilled Google Form when the student clicks. The student must submit that form. You can connect the form to a spreadsheet through Responses → Link to Sheets.

Can students change a prefilled score?

Yes. They can edit a prefilled field before submitting and can change the URL parameters. For grading, use questions and an answer key inside Google Forms.

Can students respond without a Google account?

Access depends on the form's settings and your school's account policy. One-response limits, verified email collection, or restricted responder access can require sign-in. Test your published form on a signed-out device before describing it as available without an account.

Yes. Upload the changed file as a new version of the existing Convika page, preview it, and publish that version. The page keeps its URL. Recheck the Google Form mapping if you also changed its questions.

Sources

Give your class a link to the finished quiz

Upload your HTML, test the quiz in your account preview, and publish it. Students open the quiz in their browser and send their results through your form.

Publish my quiz

Free plan: no credit card, 1 published page.