Popular Articles

no results

Sorry! nothing found for

How to create a Moodle plugin

Modified on Wed, 04 Oct 2023 at 05:36 AM

Anyone can create a Moodle plugin, but you do need to have some understanding of PHP and HTML coding. For your plugin to get onto the official Moodle Plugins Directory , our team of developers will firstly conduct an assessment of the plugin code.

If you are a developer looking to create a Moodle plugin, please firstly refer to these documentations:

  • Developer Documentation site: Development Main page and Coding standards and guidelines ;
  • How-to guide ;
  • How you can contribute to Moodle development ;
  • How to work with our Moodle Community ;

Our recommended checklist and guidelines for plugin code can also be accessed through the following link:

  • Plugin contribution checklist .

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Let us know how can we improve this article! *

Feedback sent

We appreciate your effort and will try to fix the article

Article views count

Assign feedback plugins

An assignment feedback plugin can do many things including providing feedback to students about a submission. The grading interface for the assignment module provides many hooks that allow plugins to add their own entries and participate in the grading workflow.

For a good reference implementation, see the file feedback plugin included with core because it uses most of the features of feedback plugins.

File structure ​

Assignment Feedback plugins are located in the /mod/assign/feedback directory. A plugin should not include any custom files outside of it's own plugin folder.

The plugin name should be no longer than 13 characters - this is because the database tables for a submission plugin must be prefixed with assignfeedback_[pluginname] (15 chars + X) and the table names can be no longer than 28 chars due to a limitation with Oracle.

If a plugin requires multiple database tables, the plugin name will need to be shorter to allow different table names to fit under the 28 character limit.

Each plugin is in a separate subdirectory and consists of a number of mandatory files and any other files the developer is going to use.

Some of the important files are described below. See the common plugin files documentation for details of other files which may be useful in your plugin.

settings.php ​

Plugin settings, file path: /settings.php.

You can define settings for your plugin that the administrator can configure by creating a settings.php file in the root of your plugins' directory.

Settings must named in the following format:

By following the correct naming, all settings will automatically be stored in the config_plugins database table.

Full details on how to create settings are available in the Admin settings documentation.

locallib.php ​

Global support functions, file path: /locallib.php.

This is where all the functionality for this plugin is defined. We will step through this file and describe each part as we go.

get_name() ​

All feedback plugins MUST define a class with the component name of the plugin that extends assign_feedback_plugin.

This function is abstract in the parent class (feedback_plugin) and must be defined in your new plugin. Use the language strings to make your plugin translatable.

get_settings() ​

This function is called when building the settings page for the assignment. It allows this plugin to add a list of settings to the form. Notice that the settings should be prefixed by the plugin name which is good practice to avoid conflicts with other plugins. (None of the core feedback plugins have any instance settings, so this example is fictional).

save_settings() ​

This function is called when the assignment settings page is submitted, either for a new assignment or when editing an existing one. For settings specific to a single instance of the assignment you can use the assign_plugin::set_config function shown here to save key/value pairs against this assignment instance for this plugin.

get_form_elements_for_user() ​

This function is called when building the feedback form. It functions identically to the get_settings function except that the grade object is available (if there is a grade) to associate the settings with a single grade attempt. This example also shows how to use a filemanager within a feedback plugin. The function must return true if it has modified the form otherwise the assignment will not include a header for this plugin. Notice there is an older version of this function "get_form_elements" which does not accept a userid as a parameter - this version is less useful - not recommended.

is_feedback_modified() ​

This function is called before feedback is saved. If feedback has not been modified then the save() method is not called. This function takes the grade object and submitted data from the grading form. In this example we are comparing the existing text comments made with the new ones. This function must return a boolean; True if the feedback has been modified; False if there has been no modification made. If this method is not overwritten then it will default to returning True.

This function is called to save a graders feedback. The parameters are the grade object and the data from the feedback form. This example calls file_postupdate_standard_filemanager to copy the files from the draft file area to the filearea for this feedback. It then records the number of files in the plugin specific assignfeedback_file table.

view_summary() ​

This function is called to display a summary of the feedback to both markers and students. It counts the number of files and if it is more that a set number, it only displays a count of how many files are in the feedback - otherwise it uses a helper function to write the entire list of files. This is because we want to keep the summaries really short so they can be displayed in a table. There will be a link to view the full feedback on the submission status page.

This function is called to display the entire feedback to both markers and students. In this case it uses the helper function in the assignment class to write the list of files.

can_upgrade() ​

This function is used to identify old "Assignment 2.2" subtypes that can be upgraded by this plugin. This plugin supports upgrades from the old "upload" and "uploadsingle" assignment subtypes.

This function is called once per assignment instance to upgrade the settings from the old assignment to the new mod_assign. In this case it returns true as there are no settings to upgrade.

This function upgrades a single submission from the old assignment type to the new one. In this case it involves copying all the files from the old filearea to the new one. There is a helper function available in the assignment class for this (Note: the copy will be fast as it is just adding rows to the files table). If this function returns false, the upgrade will be aborted and rolled back.

is_empty() ​

If a plugin has no data to show then this function should return true from the is_empty() function. This prevents a table row from being added to the feedback summary for this plugin. It is also used to check if a grader has tried to save feedback with no data.

get_file_areas() ​

A plugin should implement get_file_areas if it supports saving of any files to moodle - this allows the file areas to be browsed by the moodle file manager.

delete_instance() ​

This function is called when a plugin is deleted. Note only database records need to be cleaned up - files belonging to fileareas for this assignment will be automatically cleaned up.

Gradebook features ​

Only one feedback plugin can push comments to the gradebook. Usually this is the feedback_comments plugin - but it can be configured to be any feedback plugin. If the current plugin is the plugin chosen to generate comments for the gradebook, the comment text and format will be taken from these two functions.

These 4 functions can be implemented to allow a plugin to support quick-grading. The feedback comments plugin is the only example of this in core.

A plugin can run code when cron runs by implementing this method.

Grading actions appear in the select menu above the grading table and apply to the whole assignment. An example is "Upload grading worksheet". When a grading action is selected, the grading_action will be called with the action that was chosen (so plugins can have multiple entries in the list).

These two callbacks allow adding entries to the batch grading operations list (where you select multiple users in the table and choose e.g. "Lock submissions" for every user). The action is passed to "grading_batch_operation" so that multiple entries can be supported by a plugin.

Other features ​

Add calendar events ​.

From Moodle 3.1 onwards, feedback plugins can add events to the Moodle calendar without side effects. These will be hidden and deleted in line with the assignment module. For example:

  • settings.php
  • get_settings()
  • save_settings()
  • get_form_elements_for_user()
  • is_feedback_modified()
  • view_summary()
  • can_upgrade()
  • get_file_areas()
  • delete_instance()
  • Gradebook features
  • Add calendar events

Documentation

Moodle mobile assignment.

  • Moodle app features
  • Moodle app offline features
  • New for mobile
  • Moodle app plans
  • Moodle app guide for admins
  • Moodle app notifications
  • Creating mobile-friendly courses
  • Moodle App Block support
  • Moodle app FAQ
  • Students can make assignment submissions using the app, review their submissions and check their feedback, comments and grades.
  • Teachers can view and download the students' submissions and review comments, feedback and grades.
  • When uploading a file submission, all files are uploaded again if any changes have been made.

moodle create assignment plugin

Requirements

Moodle Mobile assignment requires Moodle 3.1 onwards.

Alternatively, it may be used with sites running Moodle 2.8 to Moodle 3.0 with the Moodle Mobile additional features plugin installed. For earlier versions of Moodle, only basic information will be displayed.

Third party submission and feedback plugins are only supported if the Moodle website has the appropriate remote add-on installed.

For submission of files using iOS please refer to Sharing files with Moodle Mobile with iOS .

Powered by MediaWiki

Logo

Moodle Teachers – Create programming assignments in Moodle using Virtual Programming Lab plugin

Jaswinder Singh

In today’s digital age, online education has become increasingly popular. One of the key challenges in online learning, especially in technical fields, is providing students with hands-on programming experience. Moodle educators also use Moodle course to teach programming courses. In this post we will see how you can the Virtual Programming Lab Moodle plugin to create programming assignments.

The Moodle Virtual Programming Lab (VPL) plugin is an innovative tool designed to facilitate programming instruction within the Moodle environment. It provides a virtual workspace where students can write, compile, and run code, enabling them to practice programming concepts without the need for complex software installations or dedicated hardware.

Salient features of Virtual Programming Lab Moodle plugin are:

  • Enable to edit the programs source code in the browser
  • Students can run interactively programs in the browser
  • You can run tests to review the programs.
  • Allows searching for similarity between files.
  • Allows setting editing restrictions and avoiding external text pasting.

Over past many years, VPL is one of the most actively maintained Moodle plugins which has gained a lot of popularity. You can download the latest version of the Virtual Programming Lab Moodle plugin from this link .

Few Use Cases for Moodle VPL Plugin

  • Computer Science Courses: The VPL plugin is an excellent choice for computer science courses, allowing students to practice coding in different programming languages while instructors can assess their progress effectively.
  • Coding Bootcamps: Institutions offering coding bootcamps and short-term coding courses can leverage the plugin to create a dynamic and interactive coding environment.
  • STEM Education: The plugin can be used in science, technology, engineering, and mathematics (STEM) courses to teach programming and computational thinking skills.
  • Coding Competitions: Moodle’s VPL plugin can be used to host coding competitions, encouraging healthy competition among students and fostering their coding skills.

What are the other tools you are using to manage programming assignments in Moodle? Please share with us in the comments section below.

For regular updates about  Moodle , eLearning and edtech industry, please visit us regularly at  https://lmsdaily.com . You can also like us on  Facebook  or  follow us on Twitter , or Subscribe our  YouTube Channel .

How to use Moodle Book

  • Moodle VPL Plugin
  • Online Learning
  • Virtual Programming Lab

Jaswinder Singh

RELATED ARTICLES

Moodle teachers – blocks students from using ai tools with moodle quiz, moodle lms – easily gamify your moodle course using the mooduell plugin, moodle lms – migrate whole moodle site to a new location easily by using the vault – site migration, leave a reply cancel reply.

Save my name, email, and website in this browser for the next time I comment.

spot_img

Popular Posts

A2zebra announces $542k funding to use ai for math learning success with tuktoro, hot right now:.

  • Educators 412
  • eLearning Tools 401
  • Administrators 358
  • Open Source 335

What is Kahoot! and How Does it Work for Teachers? Tips & Tricks

LMSDaily is an independently owned and operated resource about  Moodle , eLearning industry, edtech jobs and edtech industry.

We are not associated with Moodle HQ or any such organizations.

Creating an assignment

The Turnitin class end date will automatically be set to one month after the course end date in Moodle.

A Moodle Direct Version 2 offers the Turnitin Plagiarism Plugin, and can be integrated within the existing Moodle assignment module. When creating one of these activities, additional settings appear for the Turnitin plugin, which can be customized to provide an accurate similarity score.

  • Select the relevant course from your Moodle homepage.
  • Click the  Turn editing on  button to the right of your course homepage.

moodle create assignment plugin

  • Select the  Add  button.
  • Enter your assignment's general information. Your assignment name must be entered, as well as the submission type.

moodle create assignment plugin

  • Select the remaining section titles to customize your assignment further.

Enabling the Turnitin Plagiarism Plugin

  • Select Turnitin plagiarism plugin settings .

moodle create assignment plugin

Customizing the Turnitin Plagiarism Plugin

  • The option to Display Similarity Reports to Student provides instructors with the ability to control whether students are allowed to view Similarity Reports within each created assignment.
  • Opt to allow or disallow any file type. By selecting Yes , submissions will be checked for similarity where possible, submissions will be available for download and online grading tools will be available where possible.
  • Opt to either store student papers in the standard repository or no repository. By storing papers in the standard repository, this will allow these papers to be checked against in this future. By selecting No repository , submitted papers will not be saved in the Turnitin repository. However, this means that if two students submit the same paper to the same assignment, Turnitin will not find any match.

If you do not select Yes for at least one of the Check against... options, then an Similarity Report will not be generated.

If resubmissions are allowed within Moodle, each resubmission will be treated as a unique submission by the student in the Turnitin database. While self-matching is automatically excluded within the same assignment, if a match is found in another assignment, it will match against all of the resubmissions of the student.

  • Generate reports immediately (resubmissions are allowed until due date) : Similarity Reports for the initial submission by each student user to this assignment will be generated immediately. Students may resubmit as often as the student wishes until the assignment due date. Similarity Reports for the fourth or subsequent submission will require a 24-hour delay before the Similarity Report begins processing. Only the latest submission is available to the instructor or student. Previous versions are removed. Student submissions will compare against one another within the assignment on the due date and time, which may result in a change in the Similarity Report similarity index and results at the due date and time. This option is typically used when students are self-reviewing and revising their submissions and able to view the Similarity Report. No resubmissions after the due date and time of the assignment.
  • Generate reports on due date (resubmissions are allowed until due date)  : Similarity Reports will not be generated for any submission until the due date and time of the assignment. Students may resubmit as many times as needed until the due date and time without receiving reports. Resubmissions may not be made after the due date and time of the assignment.

After three resubmissions, Similarity Report generation is subject to a 24-hour delay.

  • Bibliography - Text appearing in the bibliography, works cited, and references sections can be excluded.
  • Quoted Material - Text appearing in the quotes of student papers can be excluded.

This setting can be overridden in individual Similarity Reports.

moodle create assignment plugin

  • Alternatively, select Launch Rubric Manager to edit or create a rubric.
  • Select Save and return to course  or Save and display  to complete your assignment.

Was this page helpful?

We're sorry to hear that., need to contact a human.

Creative Commons License

  • Turnitin.com
  • Release Notes
  • Known Issues
  • Privacy and Security
  • System Status

IMAGES

  1. How to create Assignment in Moodle (how to upload assignments on moodle

    moodle create assignment plugin

  2. How to create a Moodle Assignment dropbox

    moodle create assignment plugin

  3. How to Create Assignment on Moodle

    moodle create assignment plugin

  4. Moodle for Teacher: VeriGuide Plugin Setting in Assignment Page

    moodle create assignment plugin

  5. Moodle Help: Adding a Turnitin Assignment To Moodle (Turnitin Plugin

    moodle create assignment plugin

  6. Moodle: Assignment Setup

    moodle create assignment plugin

VIDEO

  1. Showcase Short

  2. Adding a Moodle Assignment

  3. Moodle 4.1(Programming)

  4. Showcase Short

  5. How to submit an assignment on Moodle

  6. (Moodle) كيفية إنشاء واجبات علي منصه التعليم الإلكتروني

COMMENTS

  1. Assign submission plugins

    An assignment submission plugin is used to display custom form fields to a student when they are editing their assignment submission. ... (28 before Moodle 4.3). Note: If your plugin is intended to work with versions of Moodle older than 4.3, then the plugin name must be 11 characters or shorter, and table names must be 28 characters or shorter ...

  2. Using Assignment

    To submit a file submission, students complete the following steps: Click the 'Add submission' button to bring up the file upload page. Upload the relevant file into the submission. They are able to 'drag and drop' the file into the submission box. Click 'Save Changes'.

  3. Moodle plugins directory

    Plugin type stats. Assignment. Assignment submissions . Plugin type stats. Assignment feedbacks. Plugin type stats. Assignment types. Plugin type stats. Plugin type stats. Availability restriction. Plugin type stats. Blocks. Plugin type stats. Book. Book tools. Plugin type stats. Plugin type stats. Course formats. Plugin type stats. Custom ...

  4. Assignment sub-plugins

    Assignment sub-plugins. The mod_assign activity can be extended using two sub-plugin types, namely: submission plugins, used to provide different ways for students to submit their content. feedback plugins, used to extend the ways in which feedback may be provided to students on their submissions. Tags: Assign. Assignment.

  5. Assignment activity

    What is the Assignment activity? Assignments allow students to submit work to their teacher for grading. The work may be text typed online or uploaded files of any type the teacher's device can read. Grading may be by simple percentages or custom scales, or more complex rubrics may be used. Students may submit as individuals or in groups.

  6. Top 5 useful assignment submission plugins for Moodle

    In this article, you will find the top 5 useful assignment submission plugins that you can use in the Moodle Assignment module to provide better learning experiences. 1. ONLYOFFICE assignment submission. This plugin, created by the developers of the ONLYOFFICE online office suite, allows teachers to create an assignment activity from any Word ...

  7. Making the most of Moodle's Assignments for formative and summative

    Moodle's Assignment activities are easy to set up and offer many possibilities to create unique learning experiences for your students. The Assignment activity in Moodle allows students to submit work for their teachers to grade or assess. The learners' submissions may be text typed online or uploaded files of any format that the teachers ...

  8. Plugin types

    Activity modules are essential types of plugins in Moodle as they provide activities in courses. For example: Forum, Quiz and Assignment. 1.0+ Antivirus plugins: antivirus /lib/antivirus Antivirus scanner plugins provide functionality for virus scanning user uploaded files using third-party virus scanning tools in Moodle. For example: ClamAV. 3.1+

  9. How to create a Moodle plugin

    How to create a Moodle plugin. Anyone can create a Moodle plugin, but you do need to have some understanding of PHP and HTML coding. For your plugin to get onto the official Moodle Plugins Directory, our team of developers will firstly conduct an assessment of the plugin code. If you are a developer looking to create a Moodle plugin, please ...

  10. Assign feedback plugins

    An assignment feedback plugin can do many things including providing feedback to students about a submission. ... feedback plugins should include one setting named 'default' to indicate if the plugin should be enabled by default when creating a new assignment. View example ... From Moodle 3.1 onwards, feedback plugins can add events to the ...

  11. How can i add custom fields in moodle assignment plugin?

    How can i add custom fields in moodle assignment plugin? Ask Question Asked 7 years, 4 months ago. Modified 7 years, 4 months ago. Viewed 689 times 0 How can i replace the "online text" editor by several custom form fields (free text, drop-down, check boxes) that the learners have to complete? ... How to create custom enrolment plugin in moodle ...

  12. Assignment module

    The assignment module allows teachers to collect work from students, review it and provide feedback including grades. The work a student submits is visible only to the teacher and not to other students. Students can submit any digital content (files), including, for example, word-processed documents, spreadsheets, images, audio and video clips.

  13. Moodle Mobile assignment

    Alternatively, it may be used with sites running Moodle 2.8 to Moodle 3.0 with the Moodle Mobile additional features plugin installed. For earlier versions of Moodle, only basic information will be displayed. Third party submission and feedback plugins are only supported if the Moodle website has the appropriate remote add-on installed. See also

  14. In a Moodle Assignment Submission Plugin, what is best-practice for

    I have the plugin working with one field using the moodle forms, and after being informed that the repeat fields method isn't available in submission plugin contexts, I've had limited success in using a Jquery AMD module's form fields, in that they display and function in the ui but cannot access the data from the locallib php file.

  15. Moodle plugins directory: Team Assignment

    The Moodle Team Assignment allows students to organise themselves into teams of 1 or more students for the purpose of completing an assignment. A team submission (which may consist of one or more files) is then submitted to Moodle for marking by the teacher. When the teacher marks the submission they can grade the students with a single team mark. If necessary, 1 or more team members can be ...

  16. Moodle plugins directory: Assignment notes

    Assignment notes. Assignment submissions ::: assignsubmission_assignmentnotes. Maintained by Gareth J Barnard, Ken Farrimond. Adds the ability to add user specific assign submission notes for markers via the custom user profile fields. For example, this can be used if a student has a Specific Learning Difference (SpLD) that markers need to be ...

  17. Moodle Teachers

    Moodle educators also use Moodle course to teach programming courses. In this post we will see how you can the Virtual Programming Lab Moodle plugin to create programming assignments. The Moodle Virtual Programming Lab (VPL) plugin is an innovative tool designed to facilitate programming instruction within the Moodle environment.

  18. Moodle plugins directory: Custom fields for activity modules

    Translations. This plugin adds Custom Fields to all activity modules. Custom fields API was introduced in Moodle 3.7 and adds a standard way to support this feature in many contexts. With this plugin, the site admin can create fields at site level that will be displayed on the forms of all activity modules. Currently, there is only support to ...

  19. Adding Turnitin to a Moodle Assignment

    Create a Moodle Assignment as you usually would. If you've never created a Moodle assignment before, navigate to a course and select the Turn editing on button. Select the + Add an activity or resource link that appears. From the Activities list, choose Assignment. Set dates for the Allow Submissions From and Due Date settings. These dates act ...

  20. Moodle assignment with Turnitin plugin

    then try creating a new assignment in Moodle, enable turnitin within that assignment and then login as a student, submit a file, make sure cron is running every 15min or so - and then in an hour or more re-check the asssignment to see if the file has been sent and a report has been generated. Average of ratings: -.

  21. Creating an assignment

    Creating an assignment part. Enter the information for part one of your assignment: your assignment's name, start date, due date, post date, and the maximum marks available for this assignment part. The default maximum point is 100. Similarity Report options. The Similarity Report Options have a significant impact on the score generated in each ...

  22. Creating an Assignment

    A Moodle Direct Version 2 offers the Turnitin Plagiarism Plugin, and can be integrated within the existing Moodle assignment module. When creating one of these activities, additional settings appear for the Turnitin plugin, which can be customized to provide an accurate similarity score. Select the relevant course from your Moodle homepage.

  23. Moodle plugins directory: Assignment files

    Maintained by Russell England. List all assignment files for all courses and / or user. Latest release: 11 years. 38 sites. 4 fans. Current versions available: 1. Download. Description. Versions.

  24. Transform STEM education with Moodle LMS

    It provides a platform to create and deliver online courses, manage assessments and assignments, track student progress, and facilitate communication and collaboration among teachers and learners. Moodle LMS is customisable, open-source, and has a large community of 350 million people consisting of developers and users who continuously ...

  25. Moodle plugins directory: Vault

    Vault plugin does not need to have access to mysqldump or pgdump, database will be exported using Moodle DML. Vault will export and import all files, regardless of the file system (local disk, S3, etc), the file system on the restored site can be different from the backup site; Vault will export and import additional folders in the dataroot.