AIQuiz is a Moodle plugin that generates quizzes dynamically using artificial intelligence. It leverages the OpenAI API to create questions and answers based on syllabus PDFs or other content, allowing educators to effortlessly build personalized, AI-powered assessments. The plugin also supports PDF parsing and merging, enabling easy extraction of text and integration of multiple documents.
Key features include:
- Automatic question generation from uploaded syllabus PDFs.
- Automatic feedback generation for each user attempt of the quiz.
- Easy setup and configuration with Moodle’s standard plugin interface.
- The same funcitonalities the Moodle Core Quiz module offer, like report viewing, and user and group overrides for quizzes.
- PHP 8.1 or higher
- Composer
- Download and install from getcomposer.org.
- Ghostscript
- Download the latest Windows build from the official site:
https://www.ghostscript.com/releases/gsdnld.html - Run the installer.
- Add the installation directory to your Windows PATH.
- In that directory, locate
gswin64c.exe(orgswin64.exe) and rename it togs.exe.
- Download the latest Windows build from the official site:
- PHP Libraries (install via Composer)
- FPDF (PDF generation)
composer require setasign/fpdf
- FPDI (PDF page import extension for FPDF)
composer require setasign/fpdi
- PDFParser (extract text from existing PDFs)
composer require smalot/pdfparser
- openai-php/client (OpenAI API client)
composer require openai-php/client
- FPDF (PDF generation)
- OpenAI API Key
- Set the OpenAI API key from the the plugins settings page.
- You can get your API key from the OpenAI website.
- Log in to your Moodle site as an admin and go to Site administration > Plugins > Install plugins.
- Upload the ZIP file with the plugin code. You should only be prompted to add extra details if your plugin type is not automatically detected.
- Check the plugin validation report and finish the installation.
The plugin can be also installed by putting the contents of this directory to
{your/moodle/dirroot}/mod/aiquiz
Afterwards, log in to your Moodle site as an admin and go to Site administration > Notifications to complete the installation.
Alternatively, you can run
$ php admin/cli/upgrade.php
to complete the installation from the command line.