Hey hi,

I'd like to make a module which allows you to add quiz questions to a paragraph (from the paragraphs module), which you can then insert to a quiz node.

I've been trying out some stuff and I was thinking the following:
Create a paragraph per question, add an inline entity form to the paragraph to include the question node form in the paragraph.
On the frontend render the question node in the parent node (the one that contains the paragraph) somehow.

I've noticed that part of the node creation form doesn't get rendered when I add it with IEF. The implementation of getCreationForm to be exact.

I'm using the Opigno distribution which unfortunately uses an old version of Quiz (7.x-4.0-rc7)

Is this a feasible option? How would I go about to creating this?

Any tips or pointers would be great!

Thanks in advance!

Comments

immoreel created an issue. See original summary.

immoreel’s picture

Issue summary: View changes
djdevin’s picture

I'm not sure how this would be possible. You could get it so that question would display and be editable within a paragraph, but I'm sure that taking the question, ensuring proper access control, and grading it would be very difficult to do, as it still expects the question to be part of a quiz.

Quiz 4.x is very outdated and does not support all the things that Quiz 5 set out to do, like support more of the Form API and use Entity API for a lot of the operations. So even if this was possible I don't think it would be possible with Quiz 4.

In Quiz 5 you can add any fields to the question itself, and they will render while taking the question so maybe that is worth a look.

Quiz 5 also supports multiple questions per page(s) which Quiz 4 does not, if that's what you are looking for.

What are you trying to accomplish here, in the end?

immoreel’s picture

What I'm trying to accomplish is indeed multiple questions per page, but also custom content (paragraphs) mixed in.
So a teacher can make an assignment which for instance contains some intro text, instructions for building something, an open question about the subject and the possibility to upload an image.

That's just an example of a configuration of a page.

djdevin’s picture

Yes, you can do this with Quiz 5 out of the box. You can put intro text on it's own Quiz directions questions, or in the question itself in some other field. And then configure them to display on the same page(s).

There is a special question type that will let you upload a file: https://www.drupal.org/project/quizfileupload

You should push Opigno devs to use 5.x :)

immoreel’s picture

You should push Opigno devs to use 5.x :)

I definitely will :)
Thanks for your time!

djdevin’s picture

Status: Active » Fixed

Absolutely :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.