CodeGrade Help
Go to websiteAPI docsContact us
  • 🏠CodeGrade Help Center
  • ❓FAQ
    • Using CodeGrade in Safari
    • Using sections
    • Configuring roles of members
    • Archiving your course
    • Adding new members
    • Releasing grades and feedback
    • Exporting Submissions
    • Choosing a grading scale
    • Creating course-wide snippets
    • Course Gradebook
    • Allowing students to hand in after the deadline
  • Use built-in content
    • 👥Community Library
    • 🐍Introduction to Python Curriculum
  • Create your own assignments
    • 1️⃣Build your assignment
      • ➕Create assignment
        • ➕Standalone
        • ➕In Blackboard
        • ➕In Brightspace
        • ➕In Canvas
        • ➕In Moodle
        • ➕In Sakai
        • ➕In Open edX
        • 💾Importing a previous assignment
      • ⚙️General settings
      • 📋Add Rubric
      • 🤖Add Automatic Grading
      • 🧑‍🎓Student View
    • 2️⃣Grade your assignment
      • ✏️Give Feedback
      • 💯Give a Grade
    • 3️⃣Analyze your assignment
      • 🕵️‍♂️Detect Plagiarism
      • 📊Analytics
      • 🎓View and export grades
    • *️⃣Other features
      • AI Assistant
      • 👥Peer Feedback
      • 🫂Group Assignments
      • 🙋Collaborative Grading
      • 🕶️Anonymous Grading
      • 🛡️Manage Course Permissions
      • 📬Hand In Requirements
  • Automatic Grading Guides
    • 🏗️AutoTest V2 Blocks
    • ✏️Quizzes
      • ❓Multiple Choice Question
      • ❓Select All Question
      • 💻Coding Question
    • 🐍Python
      • 🐍Create your first Python assignment
      • 🐍Advanced Python autograding
    • ☕Java
      • ☕Create your first Java assignment
      • ☕Advanced Java autograding
    • 📘Jupyter Notebook
    • 🐬MySQL
    • 🌐Web Development
      • 🌐Web Development with Selenium
      • 🎨Automatically grading CSS
    • 🟨JavaScript
      • 🟨Create your first JavaScript assignment
      • 🟨Advanced JavaScript autograding
    • 📊R
    • ©️C
      • ©️Create your first C assignment
      • ©️Advanced C Autograding
    • 🖥️C#
      • 🖥️Create your first C# assignment
      • 🖥️Advanced C# autograding
    • ➕C++
      • ➕Create your first C++ assignment
      • ➕Advanced C++ autograding
    • 🐘PHP
      • 🐘Create your first PHP assignment
      • 🐘Advanced PHP autograding
    • 🏗️Code Structure Tests with Semgrep
  • For students
    • 🚀Getting started
      • 🚀Getting started in CodeGrade
      • 🚀Getting started in Blackboard
      • 🚀Getting started in Brightspace
      • 🚀Getting started in Canvas
      • 🚀Getting started in Moodle
      • 🤷‍♂️I forgot my CodeGrade username / password
    • 🧬Advanced Features
      • 👥Handing in with a group
      • 📥Handing in using Git
      • 📝Giving Peer Feedback
      • 🏆Doing a Final Exam
      • ❓Asking Questions
      • 💳Enrolling in a paid course
      • 🎟️Using a coupon to enroll in a course
      • ⏪Refunding a paid course
  • 📘APIv2: Typescript
  • 🐍APIv1: Python
  • 🤖APIv1: Docs
  • 🌐Our Website
  • ✉️Contact us
Powered by GitBook
On this page
  • Create a Multiple Choice Question Test
  • Workflow suggestions:
  • AutoTest Snapshot and Test Student Submission
  1. Automatic Grading Guides
  2. Quizzes

Multiple Choice Question

PreviousQuizzesNextSelect All Question

Last updated 11 months ago

Sometimes, programming assignments aren't the most efficient way of testing students' knowledge of programming theory. In those situations, Multiple Choice Questions (MCQs) may be more practical. The Multiple Choice Question block allows you to set up a fully automatically graded MCQ in your assignments.

Students can fill in Quizzes only by using CodeGrade's Online Editor. For an assignment that includes quizzes, it is therefore necessary to have the Online Editor as the only allowed way of creating submissions. In this case, it is also convenient to enable the , so that students are navigated to the Editor automatically when launching an assignment.

Create a Multiple Choice Question Test

To create a MCQ, first add a Quiz Block, and then include a Multiple Choice Question Block within it.

In a Multiple Choice Question Block, you can set:

  • The name of the Block so that the student knows what the question is about;

  • A description of the question, by filling in the Question field. This field supports markdown so that you can format the text or include links to external resources, such as in the following example:

Which of the following functions prints the first `n` [perfect squares](https://en.wikipedia.org/wiki/Perfect_square)

Let's see more in detail how to set answers:

  • New answers can be added by clicking the icon on the right of an answer block;

  • The order in which the answers will be displayed can either be random (different for each student) or just the same as you add them;

  • You will have to select which answer is the correct one by clicking the circle on the left of the corresponding block;

  • Each answer has its own markdown description field. Here, you can add formatted text or code snippets, as in the following example:

```python
def print_first_n_squares(n):
    for i in range(1, n + 1):
        print(i * i)
```

Workflow suggestions:

Hiding information from the student

It is generally good practice to use Hide Blocks with Multiple Choice Questions, as students, by default, can see:

  • Whether their answer is right or wrong. You can use a Hide Result Block to prevent this (hints will be masked too);

  • The correct answer, by inspecting their own submission after handing in. You can use a Hide Configuration Block to prevent this.

Remember that any hidden information can be released to the students after the deadline or lock date!

Limited amount of submissions

Example

To prevent the students from answering a MCQ with a brute force approach, we may then, for example:

  • Wrap a Run Only in Submission Block around our Quiz Block;

  • Wrap a Hide Configuration Block around our MCQ Block;

  • Set the number of submission attempts to a small number like 2.

In this way, the student will be informed whether their answer is correct only after submitting, and, if needed, will have just one more attempt to guess the correct answer.

To make Quizzes graded, remember to wrap a Connect Rubric Block around them.

Quizzes can be used in combination with Run-If blocks. You may, for example, run other tests conditionally on the result of a Quiz.

AutoTest Snapshot and Test Student Submission

With your Multiple Choice Question Block now set up, follow these instructions to build the AutoTest configuration and publish it to the students:

  1. Click the bottom right Build Snapshot button to build your AutoTest Snapshot. You will need to create a dummy Test Submission the first time you do so. The file you upload doesn't matter, it's just there to allow you to build and publish your snapshot. Your Multiple Choice Question Tests will fail as the answer file has not been filled in yet. Nonetheless, you should go on and publish your snapshot.

  2. Navigate to the Submission Overview page and click on the Test Submission.

  3. Open the Test Student submission in the editor by clicking the top right Edit button.

  4. Fill in the Multiple Choice Question with the correct answer, delete the dummy file you submitted in point 1, and finalize the submission by clicking the Hand in button in the bottom right corner.

  5. Go Back to the AutoTest configuration and click the Build Snapshot button again. This time you should see your MCQ Tests passing. If not, go back to point 2 to correct the Test Submission.

After publishing your snapshot, the student can fill in the Multiple Choice Question and receive feedback in the Online Editor as shown below:

for each answer, you can provide a hint, again in Markdown, by clicking the icon. This will be displayed if the student chooses that answer. This could be a simple confirmation message like Correct, well done! , or you could provide feedback to help the student understand why the selected answer is wrong.

Also, with Quizzes, you can that the student can make. This can be especially useful for MCQs when nesting them within a Run Only In Block. The Run Only In Block, when set to Submission, will force the student to spend a submission attempt in order to receive feedback about their MCQs.

✏️
❓
💡
➕
The configuration of a Multiple Choice Question in AutoTest.
The Select All Question configuration discussed in the example.
An example of the feedback the student receives when filling in a Multiple Choice Question in the Editor.
Simple Submission Mode
limit the number of submissions