Forums » Using AMC (english) »
Creating a plugin
Added by Matthew Leingang over 7 years ago
I have written a perl script to return annotated graded sheets via WebDAV. At the moment it is an altered version of
AMC-mailing.pl that I run on the command line.
- Build a new filter plugin from the wiki. This page doesn't say much about the general process.
- calculate the frequency of choices from the forums.
I gather that I need to extend certain modules, but which? And if I need to add fields to the GUI panes, can I do that?
Thanks in advance for any guidance---however broad---you can provide.
RE: Creating a plugin - Added by Alexis Bienvenüe over 7 years ago
- Filter modules, to convert an exam from a given format to LaTeX format (such as the
plainone, that converts the AMC-TXT source file to a LaTeX file using the
- Export module, that exports marks to a given format (such as the
Listones, that exports marks to a ODS or CSV sheet file, or builds a PDF list with final grades)
If you want to go on this way however, you will have to define the following perl modules (assuming you will name your Export module 'webdav'):
AMC::Export::register::webdav, that will define methods to return general information about your module, including fields to be added to the GUI
AMC::Export::webdav, that will define methods to actually do the job sending annotated papers via Webdav.
You can have a look at the corresponding files for the
CSV Export module to see how it works — unfortunately I did not write documentation about this process.
You can place your two files at
~/.AMC.d/plugins/webdav/perl/AMC/Export/webdav.pm for testing. A 'plugin' that can be used by other users is a zip file containing these two files from the
~/.AMC.d/plugins/ directory point of view.
The right way would be to add a 'Send plugin' capability to AMC…
RE: Creating a plugin - Added by Matthew Leingang over 7 years ago
Thanks, this is actually very helpful. After my initial post I poked around the source code a little longer and determined that only Filter and Export modules were possible. I agree with you the Export is the better option of the two. I'll keep experimenting, and do keep us posted about Send plugins! :-)