VeraCodeChecker
Grading Modes

Grading Modes Guide

Understand how VeraCodeChecker calculates scores and determines Pass/Fail labels using different grading modes and thresholds.

Overview

You choose one grading mode per activity:

  • Per-Test (points per test) — Numeric grade is based on how many test cases pass, with points allocated per test.
  • Percentage-Based — Numeric grade is simply (passed / total) × 100.
Key Concept
Passing Threshold (optional) is independent of the numeric grade: it controls the Pass/Fail label shown to students and in reports. You can set it as a count (e.g., "at least 3 tests") or a percentage (e.g., "≥ 75% of tests").
A student can "Pass" but still have a non-perfect numeric score, or "Fail" with a non-zero score, depending on your threshold.

Mode A — Per-Test (points per test)

How the score is computed

Let T = total number of tests.
Each test is worth (100 / T) points (decimals allowed).
Let P = number of passed tests.
Score = P × (100 / T)

This keeps the maximum at 100 no matter how many tests you create (useful when T is large, like 13).

Passing threshold (optional, independent of the score)

Choose one of two ways to define the threshold:

By count:

Pass if P ≥ required_pass_count.

Example: T = 6, threshold = 3 tests.
Student passes 3/6 tests → Pass label; Score = 3 × (100/6) ≈ 50.

By percentage:

Pass if P ≥ ceil(threshold% × T).

Example: T = 6, threshold = 75% → ceil(0.75 × 6) = 5.
Student passes 3/6 tests → Fail label; Score ≈ 50 (unchanged).
Student passes 5/6 tests → Pass label; Score ≈ 83.33.
Key idea
The Pass/Fail label is controlled by your threshold; the numeric grade still follows the per-test formula.

Example scenarios

Tests (T)Passed (P)ThresholdPass/Fail LabelNumeric Score
63Count: 3 testsPass3 × 16.67 = 50.01
63Percent: 75% (needs 5)Fail≈ 50.01
54Percent: 60% (needs 3)Pass4 × 20 = 80
107Count: 8 testsFail7 × 10 = 70

Note: Scores may show decimals when 100 ÷ T isn't an integer.

Ordering of operations (what the system does)

  1. 1Run all tests → compute P (passed) out of T.
  2. 2Compute Score using per-test formula.
  3. 3Apply policy deductions (e.g., missing name/ID comment) if enabled.
  4. 4Evaluate Pass/Fail label against your threshold (count or percentage).
  5. 5Show final score and Pass/Fail label in the UI and Gradebook.
Re-grade behavior
In Per-Test mode, when you toggle a test to "passed," both the Score and Pass/Fail label update immediately (because P changes).

Mode B — Percentage-Based

How the score is computed

Score = (P / T) × 100

Passing threshold (optional)

Same options as Per-Test:

  • By count (e.g., at least 3 tests) or
  • By percentage (e.g., ≥ 75%).

Threshold sets the Pass/Fail label only; numeric score still comes from (P / T) × 100.

Example

T = 10, P = 7 → Score = 70.
Threshold = 80% → needs ceil(0.8 × 10) = 8 tests → Fail label, Score 70.

Deductions & Adjustments

Academic Integrity Deduction (optional)

If the activity requires a name/ID in code comments and it's missing, a predefined deduction is applied after the base score is computed (in either mode).

Re-grade

  • Per-Test: toggle passed tests; score recalculates.
  • Percentage-Based: same effect (P changes → score changes).
  • Manual Review activities: teacher enters scores directly (threshold can still set the Pass/Fail label if you wish).

UI Configuration

Grading Mode

Per-Test (points per test)
Percentage-Based

Passing Threshold (optional)

By Count
By Percentage
Required Passed Tests: [ ] (if By Count)
Required Percentage: [ ] % (if By Percentage)
Threshold controls the Pass/Fail label only. Numeric score still follows the selected grading mode.

Quick FAQ

Does setting a high threshold lower a student's numeric score?

No. Threshold affects only the Pass/Fail label. The numeric score still uses your chosen formula.

Why does a student show Pass with only 50 points?

Because you may have set a count-based threshold (e.g., 3 of 6 tests to pass). They met the threshold (Pass) but still earned 3 × (100/6) ≈ 50.

Can I switch modes after publishing?

Avoid switching modes once students start submitting—scores and labels could change. If you must, re-validate and communicate the change to students.