Prevent Copy

Local plugins ::: local_preventcopy
Maintained by Vinit Prajapati
The Prevent Copy plugin is a local Moodle plugin designed to restrict users from performing actions like right-clicking, copying, and pasting on specific pages. It allows administrators to configure the behavior for different roles (e.g., students, teachers) and specific pages.
Latest release:
172 sites
254 downloads
10 fans
Current versions available: 1

The **Prevent Copy** plugin is a local Moodle plugin designed to restrict users from performing actions like right-clicking, copying, and pasting on specific pages. It allows administrators to configure the behavior for different roles (e.g., students, teachers) and specific pages.

Configuration

  • Provide option to add our own JS fragement to disbale rightclick/copy/paste/developer tools
  • Add List of page to apply this, i.e. /mod/page or /mod/lesosn
  • Apply to Student Role (Mainly applicable in Course)
  • Apply to Non Student Role i.e. teacher/manager

Screenshots

Screenshot #0

Contributors

Vinit Prajapati (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments

Show comments
  • Plugins bot
    Sat, 29 Mar 2025, 11:50 PM
    Approval issue created: CONTRIB-9862
  • Laurie Huber
    Thu, 25 Sept 2025, 4:52 AM
    Hello Vinit. Great to see that this type of tool is once again availablesmile A quick question about setup. Can we choose the general type of module, for example Quiz and it will stop students from copying and pasting in all quizzes on our site? Or, do we have to list each specific Quiz or assignment? Let me know. Much Thanks - Laurie
  • Vinit Prajapati
    Thu, 25 Sept 2025, 2:30 PM
    Hi Laurie - Thanks for message.
    Plugin matches page URL, i.e. if we have configured with /mod/quiz - it means, this will stop copy/paste/rightclick on all quiz pages

    For this ref -

    It will prevent all Moodle resource pages, Modules quiz and lesson. I hope this is helpful. Kindly message if any more details are required.
  • Laurie Huber
    Thu, 23 Oct 2025, 4:48 AM
    Hi Vinit. Thanks for the information. Further to this, I am able to stop students from copying information from my site, however, I am not able to stop them from pasting answers from other sites such as AI into our response boxes and assignments. Is there a way to stop students from copying text into our quizzes and assignments? Thanks. Laurie
  • Vinit Prajapati
    Mon, 6 Apr 2026, 12:46 PM
    Hello Laurie - This is fixed in new release. Please deploy latest code. With this release, it will not allow to copy/paste In Moodle Response Box (TinyMCE Editor). Please update latest Moodle and it should work. If there are any issues, don't hesitate raise bug or add comment here.
  • Csaba Vágvölgyi
    Wed, 13 May 2026, 7:08 PM
    We have just started using the plugin on our central Moodle portal. We have enabled it exclusively for the quiz module so that students cannot copy questions into the AI or copy answers back into the quiz.
    Unfortunately, this is causing problems for some instructors because their tests are structured in a way that requires the copy/paste function. (e.g., they need to copy the data provided in the test questions into Excel)
    The solution would be to be able to disable the protection for specific courses. Is there a solution for this?
    I know that when enabling protection, you can specify a course, but out of nearly 20,000 courses, we would like to suspend protection in only a few dozen cases.
  • Vinit Prajapati
    Thu, 14 May 2026, 12:30 PM
    Thanks for reporting this issue.

    Currently, it is based on URL. I have already planned this in next release. Give me 1-2 weeks. I will release new code.

    Implementation will be based on

    Course Id
    Module specific
    Quiz: Course Module Id
    Assignment: Course Module Id
    Forum: Course Module id.

    Will release new code shortly.

    Thank you.
  • Csaba Vágvölgyi
    Thu, 14 May 2026, 2:12 PM
    Thank you, this is a very good news. smile
    Thank you for this very useful plugin!
  • Vinit Prajapati
    Sun, 17 May 2026, 10:06 PM
  • Csaba Vágvölgyi
    Mon, 18 May 2026, 2:08 AM
    Thanks for the new release! I see there are several new configuration options.
    I have a question regarding the original issue. Can I create exceptions? For example: I want to protect all courses on the portal (~20,000 courses), except for 10 specific courses. (Of course, I don’t want to list 19,990 course IDs.)
    TIA
  • Luca Bellani
    Mon, 18 May 2026, 2:44 AM
    Hi, I just installed the latest version, but the screen for inserting the page list shown above isn't anywhere to be found.
    The settings menu is very different.
    Luca B.
  • Csaba Vágvölgyi
    Mon, 18 May 2026, 2:23 PM
    Hi Luca!
    The settings interface has indeed changed, but the plugin is working fine. For example: If you previously had /mod/quiz listed among your conditions, now just put an asterisk in the Quiz field.
  • Francesc Anglada
    Wed, 27 May 2026, 1:26 AM
    Hi,
    i try it and it is not working on Tiny MCE editor. Can you help me to work it?
  • Vinit Prajapati
    Thu, 28 May 2026, 12:43 PM
    @Francesc - This is updated in doc

    https://github.com/vinit-prajapati/moodle_local_preventcopy/blob/main/readme.md
    Please refer example - 5 (Copy only this block)
Please login to post comments