Knowledge Base
PressPrimer Assignment

AI-Assisted Grading

AI-assisted grading produces draft feedback and suggested scores that teachers can review, edit, and apply. Every suggestion is optional; nothing is written to the grading form until the teacher clicks Apply.

This article covers how grading works, exactly what the AI sees when you click the button, how different file types are handled, and how retries and background processing work.

Requirements

  • An AI provider configured under Assignments > Settings > Integrations
  • A submission with extractable content — text editor submissions, DOCX, ODT, RTF, TXT, and PDF are all supported

Grading With a Rubric

When a rubric is attached to the assignment, the grading interface shows a Generate Draft Feedback button above the rubric panel.

  1. Open a submission from the grading queue.
  2. Click Generate Draft Feedback.
  3. Wait for the AI to process the submission (usually 10 to 90 seconds depending on submission length and AI model).
  4. Review the suggestion panel, which shows a proposed performance level and draft feedback for each criterion, plus an overall feedback paragraph and score.
  1. Edit any part of the suggestion inline if needed.
  2. Click Apply Suggestions to populate the rubric selections and feedback fields. Or click Discard to clear the suggestion without applying it.
  3. Make any final adjustments and save the grade as usual.

The AI receives your rubric structure (including criterion names, descriptions, level labels, and point values) so suggestions align with whatever you have defined.

Grading Without a Rubric

When no rubric is attached, the button label changes to Generate Draft Feedback and the output is a single overall feedback paragraph (no score suggestion). Use this when you want faster feedback drafting but handle scoring yourself.

What the AI Receives

When you click the grading button, PressPrimer Assignment assembles a structured prompt containing four sections and sends it to your configured AI provider. Everything the AI sees is listed below. Student names, email addresses, grades from past attempts, and other personally identifying information are not included in the prompt. Student notes can also not override other instructions (so students cannot cheat by trying to control AI feedback and scoring themselves).

1. Assignment Context

  • Assignment title
  • Assignment description (with HTML stripped to plain text)
  • The instructions given to the student (with HTML stripped)
  • The assignment’s maximum points value
  • The assignment’s passing score, if one is set above 0
  • The submission type (file upload or text editor)

2. Grading Guidance

Exactly one of the following is included, in this order of priority:

  • Rubric structure — when a rubric is attached, the full rubric is sent: every criterion’s name and description, every performance level’s label and description, and the point values for each level. The prompt instructs the AI to select the level that best matches the submission for each criterion.
  • Free-text grading guidelines — when no rubric is attached but the assignment’s Grading Guidelines field is filled in, that text is sent verbatim (HTML stripped).
  • Generic fallback — when neither is provided, the AI is told to evaluate based on the assignment instructions, clarity of expression, depth of analysis, and overall quality.

3. Student Context

  • Whether this is a first submission or a resubmission (and the attempt number, e.g. “This is resubmission attempt #3.”)
  • The word count of the submission
  • The file type(s) uploaded (as extensions, e.g. “DOCX, PDF”)
  • The student notes that were entered alongside the submission, if any (the free-form field students fill in when they submit)

4. Submission Content

The submission itself, in one of three forms depending on file type (see the next section for details). A preamble tells the AI whether the content is formatted Markdown (preserving the document’s original headings, lists, and tables), plain text, or a PDF attachment.

System Instructions

The AI is also given a system-level instruction telling it to act as an experienced instructor drafting suggestions for the instructor to review, to reference specific content in the submission, to set a confidence score below 0.7 when uncertain, and to never invent quotes from content that isn’t actually in the submission.

How Your Submission Content Is Handled

School chooses a content source based on the submission type. This decision is automatic — you don’t configure it per submission.

Text editor submissions

The text content is read directly from the submission record and sent to the AI as plain text. No file processing is involved.

DOCX, ODT, and RTF uploads

Files up to 20 MB are extracted server-side into clean Markdown using PHPWord. This preserves the document’s structure, so headings become Markdown headings, lists become Markdown lists, and tables become Markdown tables. The AI is explicitly told the format is Markdown so it can interpret the structure correctly. Files larger than 20 MB fall back to the stored plain-text version the free plugin extracted at upload time.

PDF uploads with PDF passthrough enabled

PDFs up to 20 MB and 100 pages are sent as a native file attachment (base64-encoded) to the provider. Both OpenAI and Anthropic can then analyze the visual content directly — text, layout, math notation, and images — using their vision capabilities. This is the default behavior and works best for complex documents.

PDF uploads with PDF passthrough disabled

When PDF passthrough isn’t available (or when a PDF exceeds the 20 MB / 100-page limits), the plugin sends the plain-text version the free plugin extracted at upload time. If that text is too sparse or low quality, you’ll see a quality warning or a refusal message.

Image uploads (JPG, PNG, GIF)

Not supported for AI grading. Submissions in an image format must be graded manually.

Quality gates

Before sending, the PressPrimer Assignment School plugin checks the quality of the extracted content:

  • Extraction failed — a clear error is returned and no request is sent to the AI
  • Poor quality extraction — the request is refused with a message recommending manual grading
  • Borderline quality — the request proceeds but you’ll see a warning in the suggestion panel that the AI output may be incomplete
  • Good quality — the request proceeds normally

PDF passthrough bypasses these text-quality gates because the AI analyzes the PDF file directly.

Retries and Reliability

Sending assignment submissions to an AI provider is usually very reliable, but for large file sizes and occasional AI provider hiccups, plus low timeout times on some WordPress hosts, we built an automated retry system.

Retries happen automatically for:

  • Request timeouts — the provider didn’t respond within the timeout window
  • Server errors (5xx) — the provider returned a temporary server-side error
  • Connection errors — the request couldn’t reach the provider at all (DNS, SSL, etc.)

If all retries fail, the suggestion panel shows the error message. You can then try again manually, perhaps after switching to a faster model first.

Background Processing (Auto-Grade)

Auto-grade (an assignment-level setting that can be turned on from the edit assignment page) generates suggestions automatically when students submit assignments, so AI drafts are waiting when you open the submission. It uses a WP-Cron queue that processes up to 5 submissions per minute and gives each submission up to 3 attempts before marking it permanently failed.

Tips

  • Write clear, specific grading guidelines on the assignment — they are sent to the AI verbatim and directly shape the feedback quality.
  • Keep rubric criterion and level descriptions specific. Vague levels like “good” or “great” produce vague suggestions.
  • For DOCX submissions, teach students to use proper headings and lists rather than manually-formatted text. Structured documents produce better AI feedback because the structure is preserved in the Markdown the AI receives.
  • Always review AI output before applying it. The AI is drafting feedback for your review, not making the final decision.

Get Tips, news & Discounts to your inbox

Get your own demo site

Get Tips, news & Discounts to your inbox