Generative AI Question Bank

Question bank plugins ::: qbank_genai
Maintained by Christian GREVISSE
Automatic LLM-based generation of multiple choice questions based on files stored in a Moodle course.
Latest release:
255 sites
314 downloads
27 fans
Current versions available: 1

This Moodle plugin allows to generate multiple choice questions based on the content of a course (essentially Files) through an underlying Large Language Model (LLM) such as GPT. The generated questions are added to the question bank of the course and can of course be edited by a human afterwards and added to a quiz.

Existing questions can also be auto-tagged, again through LLM support.

An OpenAI API key is required and can be set in the plugin settings in the Site Administration or in a course. The usage of OpenAI's API will generate costs. Users of this plugin are solely responsible for any generated cost and should closely monitor their usage!

Minimum PHP version: 8.1

Potential privacy issues

Content selected by the user is sent to a third-party LLM. In particular, selected resource files will be sent from Moodle to OpenAI for processing in the Assistants API.

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5
Screenshot #6
Screenshot #7
Screenshot #8
Screenshot #9

Contributors

Christian GREVISSE (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments

Показати коментарі
  • Christian GREVISSE
    вт 21 січ. 2025 02:12 AM
    Hi Siming,

    For the moment, it is limited to OpenAI's API, using GPT-4o.

    Best,

    Christian
  • Julian Ridden
    чт 17 квіт. 2025 11:08 AM
    Trying this in a clean Moodle 5 install and fear I may be jumping the gun.

    Getting the error: Adhoc task failed: qbank_genai\task\generation_task,Error writing to database

    Any ideas?
  • Christian GREVISSE
    нд 20 квіт. 2025 04:55 AM
    Dear Julian,

    Thank you for raising this point! Indeed, an adaptation was needed regarding the feature of shared question banks introduced in Moodle 5.0. Let me know if this works for you.

    Best,

    Christian
  • Elavarasan MS
    ср 23 квіт. 2025 17:02 PM
    Hi Christian,
    The "qbank_genai“ Plugin is not functioning as expected in Moodle 4.5.2.

    Steps to Reproduce:
    01. Log in to Moodle v4.5.2.
    02. Select any existing course.
    03. Enable "Edit Mode."
    04. Click "Add an activity or resource."
    05. Choose the "File" option, update the necessary details, and upload a file (e.g., text.pdf).
    06. Click "Save and display."
    07. Disable "Edit Mode."
    08. Within the course, select the "More” Dropdown and choose "Generate Questions."
    09. Select the uploaded file and click "Generate Questions." button


    Issue:
    1. The status shows "The following generation tasks are ongoing" indefinitely and never completes.
    2. Upon checking, the status indicates "error" with 9 tasks failing.
    3. Only option is delete the record via database system.
    DELETE FROM mdl_task_adhoc WHERE id=80;

    Note: Verified the OpenAI API key and have sufficient fund so no issues on the API keys.

    Logs:
    Please find the detailed logs attached for your review and guidance.

    Details
    Fail delay: 1 day - Remove temporary write access from controlled links (repository_onedrive\remove_temp_access_task)
    Fail delay: 1 day - mod_forum\task\send_user_notifications ID = 11
    Fail delay: 1 day - mod_forum\task\send_user_notifications ID = 12
    Fail delay: 1 day - mod_forum\task\send_user_notifications ID = 13
    Fail delay: 1 day - mod_forum\task\send_user_notifications ID = 17
    Fail delay: 1 day - mod_forum\task\send_user_notifications ID = 18
    Fail delay: 1 day - mod_forum\task\send_user_notifications ID = 19

    Thanks
  • thanisha nitturu
    чт 21 серп. 2025 21:31 PM
    does this only fetches the content from pdf but i had created the using text and media plugin from where it is unable to find the conntent
  • Christian GREVISSE
    пт 22 серп. 2025 00:17 AM
    Yes, the plugin currently only considers Files, no other activity or resource types.
  • Bhanuka Weerasekara
    пн 25 серп. 2025 15:17 PM
    Hello, I am using Moodle 4.5. I had installed this plugin and then tried to add the OpenAI API key. The given keys are generally very long. After I click save changes button, I get "Error writing to database". The debug info revealed "Data too long for column 'openaiapikey' at row 1". How to fix this?
  • Christian GREVISSE
    вт 26 серп. 2025 22:22 PM
    Dear Bhanuka,

    Thanks for letting me know. I wasn't aware OpenAI now issues API keys of around 165 characters.

    I just released an update, please try it out.

    Best,

    Christian
  • Bhanuka Weerasekara
    ср 27 серп. 2025 14:57 PM
    Dear Christian,

    Appreciate your quick response to fix the issue.

    The plugin is working well. Big thanks for your effort.

    Looking forward for the new features on this plugin.

    Best Regards,
    Bhanuka
  • Mosaab Alsiddig
    ср 27 серп. 2025 18:06 PM
    Hi
    I uploaded an English PDF file for the plugin to generate questions from, but after the process was completed, I discovered that the generated questions were in French instead of English.
  • Christian GREVISSE
    ср 27 серп. 2025 18:21 PM
    Dear Mosaab,

    Sorry to hear! The pleasures of generative AI, the prompt explicitly tells the model "Questions should be in the same language as the file content." Maybe you could retry a few times to see whether it follows this instruction at one point. If the document contains a mix of languages, this might also affect the LLM's interpretation.

    Best,

    Christian
  • Claudio Visa
    ср 10 вер. 2025 06:27 AM
    Estimados
    cuando instale el plugin le puse la clave API y en el aula le subi un archivo de word, cuando hago clic en Generate questions y selecciono el archivo de word me sale esto: "It seems there was a problem accessing the content of the file. Could you please provide more details or re-upload the document? If you have specific parts you'd like to focus on, let me know!" como se puede soluccionaro
  • Christian GREVISSE
    ср 10 вер. 2025 14:08 PM
    Hola Claudio,

    Intente tal vez con un PDF. En las semanas a venir, voy a usar la Responses API con GPT-5, pero esa al momento también solo trabaja con PDFs. Luego el plugin lastimosamente no puede hacer nada si el servicio de OpenAI tiene problemas para acceder al contenido de los archivos.

    Saludos,

    Christian
  • Antonella Cirigliano
    чт 20 лист. 2025 21:11 PM
    Dear Christian,
    since the assistants api will be deprecated from August 2026 https://platform.openai.com/docs/assistants/migration , do you already plan to migrate to Responses API?
    Thank you for your work.
    Best,
    Antonella
  • Christian GREVISSE
    чт 20 лист. 2025 21:48 PM
    Dear Antonella,

    This is indeed on my TODO list: https://github.com/cgrevisse/moodle-qbank_genai/issues/10

    Best,

    Christian
1 2 3
Please login to post comments