Create new question

delapen
Forums
Hi, When I create a new question, it has 9 different options: long answer question, matching, multiple choice question, slide, etc. How do I add another option in there? For example, I want to create video as a separate "question". I've already created a content type for it but I'm not sure how to add it as an option in the Create new question section.
wadmiraal

Currently this is a bit

Currently this is a bit tricky to do. It would require code. The idea would be to create a new question type, but to make it extend one of the existing questions (Slide, for example - check the Drupal Quiz module API). I could give you some code samples if you wish, to get you started.
wadmiraal

Didn't it work out with the

Didn't it work out with the video embed field? Opigno 1.0 contains the fix I talked about.
wadmiraal

Or did you try embeding the

Or did you try embeding the video through the WYSIWYG? There's a very similar module to the embed_field one for the WYSIWYG.
delapen

Version 1.0 fixed the video

Version 1.0 fixed the video embed works. Thanks. I want to make it easier for people to create videos without having to use "Slide". It would be easier for people to understand by having a separate video section.
delapen

I'm not much of a programmer,

I'm not much of a programmer, but I can definitely take a stab at it if you have code samples for me to look at. Please send it over and if I figure out, I'll post it here to share with the community.
wadmiraal

I understand. Then the best

I understand. Then the best way would be to create a simple module that registers a new question type, which extends the "Slide" question (btw: the "Slide" question is called "Quiz Direction" in Quiz - we renamed it to "Slide" in Opigno, as most of our clients understand that terminology better).
davidah3

About Slide question with video embbedd and HTML editor

Hi wadmiraal! I'm trying to got video on Slide question with the HTML editor, but when I press the video button to get the video browser and select the video, i got the pop-up empty. In the google console i got this : GET http://10.90.28.198/demo/video/browser?render=video-popup 404 Not found I try to modified the path in this file: [myopignodemo]/sites/all/modules/video/wysiwyg_plugins/video.inc but same, i got empty pop-up, could you suggest me something? Regards
wadmiraal

Hi davidah3

Hi davidah3 Very strange. It works fine for me. Looking through the code, it does use `base_path() . 'video/browser?render=video-popup'`, so even though you're in a sub-folder, it should work fine. This is related to the [Video](https://drupal.org/project/video) module. Maybe ask the question over there, they might know of it.