How to use a plugin

How to use a plugin

de către Dan Nessett-
Număr de răspunsuri: 4
Hello,

I am new to Moodle, but not to PHP. I am trying to develop a plugin that presents a student with a blank truth table for a specific propositional logic expression. The idea is the student will fill in the truth table with the values (T or F) for each interpretation of the expression (i.e., where each atomic proposition making up the expression has a value of T or F). Then, the student will submit the truth table and the plugin will return it with normal lines where the truth table is correct and red highlighted lines where it is in error.

I am developing this plugin and have successfully installed it on my Moodle installation (Moodle 4.1 using Apache 2.4.57 on Linux Mint 21.2). However, I have googled extensively how to use the plugin with no luck. I want to add a homework exercise to the course that incorporates a call to the plug-in for a specific propositional logic expression, but could find no help to achieve this. There is a lot of help on how to install a plugin, but I could find nothing on how to use this kind of plugin. Any pointers to a discussion of how to structure such a plugin and use it would be greatly appreciated.
Media notelor: -
Ca răspuns la Dan Nessett

Re: How to use a plugin

de către Gregor McNish-
Imaginea Particularly helpful Moodlers
There's a Moodle Academy developers course, and lots of devt documentation on moodledev.io

Moodle plugins are of different types; and the structure of the plugin depends on the types. The types give you standard functionality you can derive from.
Activity plugins (mod_*) are things students do, which record participation and write back to the gradebook.
But there are other options -- if you want the truth tables to be quiz questions, you can create it as a quiz question type. There's an existing 3rd party question type called a matrix which may be related.
You could also look into doing it as an H5P based activity.
Ca răspuns la Gregor McNish

Re: How to use a plugin

de către Dan Nessett-
Thank you. I have installed the plugin as an activity (in /mod). However, how do I create an instance of the plugin as a homework assignment? I could not find anything that indicates how to accomplish this.