Does Moodle Detect AI Code?

What Moodle core actually does with a programming submission, what plugins like VPL and Turnitin add, and why none of them is designed to tell whether code was written by AI.

0 / 8,000 characters

Moodle runs a lot of university programming courses, so it is a fair question whether submitting code through it exposes AI use. The short answer: Moodle core does not include an AI code detector. It is an open-source learning platform that can be extended with plugins, and what gets checked depends on which plugins your institution has installed. Even the common ones are built to find similarity, not AI authorship. The descriptions below come from Moodle's developer documentation, the Moodle plugins directory and Turnitin's help pages, which we read in October 2026. Your school's Moodle site may be configured differently, so treat this as a guide to how the pieces fit, not a description of your course.

Moodle core: a framework, not a checker

Moodle's developer documentation describes a Plagiarism API: a core set of functions that Moodle code can use to send user-submitted content to plagiarism prevention systems. The flow it describes is simple. When plagiarism tools are enabled, activities get extra settings; a student submits; an event is triggered; the plagiarism plugin handles it; and the plugin controls what results are shown to the student and teacher. In other words, Moodle provides the plumbing. The checking itself happens in a plugin that your site administrator chooses to install.

Newer Moodle versions also include an AI subsystem, which can be confusing. The developer documentation describes it as a way to bring AI tools into the learning platform through providers (connections to external AI services) and placements (where the features appear). The core actions it lists are generating text, generating images and summarising text, and its example is a course assistant that summarises course content. None of those actions is detection. The AI subsystem is about using AI inside Moodle, not about spotting it in your work.

VPL: running and grading code, plus similarity

The plugin you are most likely to meet in a programming course is Virtual Programming Lab. Its Moodle plugins directory page describes it as a way to create, submit, run and automatically assess programming assignments inside Moodle. The features it lists include automatic compilation and execution, test cases, support for languages such as Python, C, C++ and Java, integration with Moodle grading, and plagiarism detection support. Code runs on a separate VPL Jail Server rather than on the Moodle server.

RWTH Aachen University's VPL help page explains how that works in practice: a Similarity tab checks submissions to an assignment against each other, and can also include other sources such as submissions from previous semesters. It tokenizes and normalizes each file, compares them, and groups similar ones into clusters. That is the same idea as MOSS or JPlag. It can show your teacher that two students handed in nearly identical code. The plugin page we read does not claim to detect whether code was written by a model, and a similarity tool has no way to answer that question for a single, original-looking solution.

Turnitin and other plagiarism plugins

Many Moodle sites connect Turnitin. Turnitin offers several Moodle integrations, and its guide to identifying your Moodle integration type lists an LTI 1.3 integration, a Moodle Plagiarism Plugin and a Moodle Integrity Plugin. These produce Similarity Reports, which show overlap with other sources.

Turnitin's AI writing detection is a separate feature, and its FAQ is clear that it is not meant for programs. It says the model removes text that appears to be code before scoring, looks only for prose in long-form writing, and does not reliably detect AI-generated code. Our page on whether Turnitin detects AI code covers this in detail. Other vendors also publish Moodle plugins; if your site uses one, that vendor's own documentation is the place to check what it claims.

Why similarity is not the same as AI detection

A language model does not hand every student the same stored answer. It writes a new solution each time, and two students asking the same question can get code that looks quite different. A similarity checker will usually only notice AI use when several submissions happen to come out close to each other. Research on AI-written code also suggests that detection is hard even for tools designed for it; see how accurate are AI code detectors for what published studies have found.

What your teacher can still see

  • Test results and history. If your course uses VPL, your runs and submissions are recorded in the activity, and your earlier work is in the course.
  • Similarity matches. If several students submit closely matching code, a similarity check can surface it, whatever its source.
  • Your explanation. Being asked to walk through your code is common, and no plugin replaces it.

What this means for your assignment

  • Follow the course policy. Moodle will not tell you whether AI help is allowed. Your syllabus or teacher will.
  • A similarity match is not a verdict. Short tasks and standard algorithms often look alike. A person should review any match.
  • Keep your process. Drafts, commits and notes show how you worked if a question comes up.

Checking how your code reads

You cannot run your school's plugins on your own work, but you can see how your code comes across. Paste it into the detector at the top of this page and read the reasons it lists. If it highlights things like very uniform comments or extra features the task did not ask for, you will know what a teacher might ask about and can be ready to explain your choices. If you have already been flagged, read my code was flagged as AI for calm next steps.

Frequently asked questions

Does Moodle check my code for AI by default?

Not according to Moodle's developer documentation. Moodle core provides a Plagiarism API that sends submissions to separate plagiarism plugins, and those plugins do the checking. Moodle's AI subsystem is for features like generating or summarising text, not for detecting AI.

What is VPL and does it detect AI?

VPL (Virtual Programming Lab) is a Moodle plugin for programming assignments. Its plugin page lists running and automatically assessing code, and plagiarism detection support. That plagiarism support is a similarity check between submissions. The plugin page we read does not describe AI detection.

My Moodle course uses Turnitin. Will it score my code for AI?

Turnitin's AI writing detection FAQ says the model removes text that looks like code before scoring and does not reliably detect AI-generated code. A Turnitin Similarity Report on your code shows overlap with other sources, which is a different question.

Can my teacher see if I pasted code from ChatGPT?

Nothing in the Moodle documentation we read describes a feature that labels code as AI-written. Teachers can still compare your work with your earlier submissions, see similarity between classmates, and ask you to explain your solution.

How do I find out which tools my Moodle course uses?

Look at the assignment settings or the instructions your teacher gives, and check your school's Moodle help pages. Plagiarism plugins are enabled by your institution, so the list differs from one Moodle site to another.

Try the detector

Have a snippet you are unsure about? Paste it into the free AI Code Detector to get a verdict, an AI probability and the reasons behind it. No sign-up, and your code is not stored.