Embed questions filter

Filters ::: filter_embedquestion
Maintained by Tim at Lone Pine Koala SanctuaryTim Hunt, John Beedell, at the OU (Perry building)Mahmoud Kassaei
A Moodle text filter plugin that displays questions from the question bank embedded in the page.
Latest release:
881 sites
43 fans
Current versions available: 3

This filter allows questions from the question bank to be embedded anywhere that users can input HTML. This can be used in various ways. It can be a way to make learning materials more interactive. For example you may wish to embed question in a Book, or a Page, or even a Label. Or perhaps a student asks in a forum about some tricky grammar concept, and you have a question that illustrates your reply, well now you can include that qustion in your reply, so the student can immediately test their understanding.

It is designed to be used with the associated Atto editor plugin which makes it easier to set up the embedding.

Installing the Embedded questions progress report is also recommended. This lest staff and students track what progress has been made at all the embedded questions in a course.

Questions can only be embedded if they have an idnumber set, and where the category the question is in has an idnumber. This is for two reasons: first, to make it harder to accidentally embed questions from your end-of-course exam; and second, because this is how the filter uniquely identifies the question to show.

This plugin was created by the Open University, UK.


This plugin is part of set Embed questions.


Screenshot #0
Screenshot #1
Screenshot #2


Tim at Lone Pine Koala Sanctuary
Tim Hunt (Lead maintainer)
John Beedell: Developer
at the OU (Perry building)
Mahmoud Kassaei: Developer
Chris Nelson: Product owner
Please login to view contributors details and/or to contact them

Comments RSS


  • Wed, Aug 8, 2018, 9:18 PM
    Oh that's it. Apologies for missing that. This makes sense. Very powerful plugin!
  • Wed, Aug 8, 2018, 9:28 PM
    Hi -

    One more question - are the embedded questions tied to activity completion as well as capable of receiving grades? More specifically, if I student answers the embedded questions correctly, will the course be marked as complete (as per my course configurations)?
  • Tim at Lone Pine Koala Sanctuary
    Wed, Aug 8, 2018, 9:32 PM
    No. The questions are not tied to anything.

    At the moment, this is just about being able to use Moodle questions to embed a bit of interaction within any content.

    Obviously, once students start interacting with things, one might want to keep a long-term record of that in a useable form (that is, in addition to the log entries). However, that would be a lot more work. We might think about doing that some time in future, but it probably won't be any time soon. For now, we just wanted to build something simple, which is what we did.
  • Wed, Aug 8, 2018, 9:36 PM
    Ok I see what you mean. I was hoping to embed a simple multiple choice quiz into course HTML. The idea is to minimize the number of clicks one has to go through order to take a quiz / submit the answers. I guess Moodle just isn't there quite yet. Thank you for your quick and timely responses.
  • Tue, Nov 20, 2018, 12:57 AM
    What is the meaning of the Question variant field when embedding a question?
  • Tim at Lone Pine Koala Sanctuary
    Tue, Nov 20, 2018, 12:59 AM
    That is only used by some question types, like Calculated, Variable numeric, STACK, ... where the question has internal randomisation. For those question type, it lets you force the question to show a particular random variant, which mostly you don't want.

    So, almost always, it is safe to ignore that option (but we included it for completeness).
  • Wed, Mar 20, 2019, 8:52 PM
    Easier to use after adding all these IDs. Three questions: 1. popup option is gone? 2. does it now also work in Moodle Mobile? 3. just checking: students are always excluded from this option?
  • Tim at Lone Pine Koala Sanctuary
    Wed, Mar 20, 2019, 9:00 PM
    1. I have no idea what you mean by 'popup option' There was never anything about pop-ups with this plugin.

    2. It does not work in Moodle mobile yet, and as far as I can tell, it would be very hard to make it work. The mobile app has very limited support for filters so far.

    3. The exact answer to this question is that you can only embed questions if you have the moodle/question:useall/mine capability in the course context of the course you are in. With the normal rules setup, that means that you need to be Editing teacher or higher.
  • Wed, Mar 20, 2019, 9:27 PM

    we are using Moodle 3.5.4. Although the capability moodle/question:usemine is granted to editingteachers the list of categories from the question bank is empty. This is also true if we try it as admin (and I think admins at least really have the capability wink)

    Kind regards
  • Tim at Lone Pine Koala Sanctuary
    Wed, Mar 20, 2019, 9:29 PM
    That will be because you have not set ids on the categories correctly. Read the help carefully: https://github.com/moodleou/moodle-filter_embedquestion/blob/master/internaldoc/functionality.txt
  • Thu, Mar 21, 2019, 6:05 PM
    "...It does not work in Moodle mobile yet, and as far as I can tell, it would be very hard to make it work. The mobile app has very limited support for filters so far...." So first people remove the blocks, then the filters and they are still allowed to call it Moodle?
  • Thu, Mar 21, 2019, 6:12 PM
    Ah I see, we used the insert_question filter UNTIL NOW. (i prefer your version of embedding, because the ID aspect gives you control over the questions which are allowed to embed ...and finding the right question with the Atto plugin is much easier.
  • Thu, Mar 21, 2019, 7:12 PM
    The filter-simple question plugin is not using roles, so if I - for example - as a teacher use a forum and switch on the embed a simple question filter to embed a question in my text, then students can embed and see also a question in their forum answer box if they know the number: if they raise or lower that number see also can see all kind of other questiuons...
  • Fri, Mar 29, 2019, 7:17 PM
    Thanks for good plugin. I like this.
    But I want to use this in tinymce editor. Do have a plan to launch for tinymce?
Please login to post comments