How to bring up the latest Multichoice Content Type
Submitted by msathesh on Sun, 03/12/2017 - 05:47
Forums:
I'm planning to create new Multichoice questions everyday and bring it up on the sidebar using Block and Shortcodes. How can I bring the latest Multichoice content type without changing the shortcode within block every time I create new content? I see that views integration is very minimal and cannot filter the latest Multichoice content type. Or is there any other way? Thanks in advance.
papi Jo
Sun, 03/12/2017 - 14:51
Permalink
Please specify which Platform
Please specify which Platform you're using: Drupal, Wordpress, Moodle?
msathesh
Sun, 03/12/2017 - 15:47
Permalink
Sorry, I'm using Drupal 7.4X.
Sorry, I'm using Drupal 7.4X.
papi Jo
Sun, 03/12/2017 - 17:57
Permalink
You cannot filter by H5P
You cannot filter by H5P activity type (MCQ, ...). But you can filter by date (and display only the latest quiz) and by Title (or start of title). So, for instance, you could give all your MCQ quizzes a title/name starting with MCQ- (MCQ-Geography quiz, MCQ-History of the 20th century, etc.) and apply the ad hoc filter when you create the Views block. I can provide more details if needed.
msathesh
Sun, 03/12/2017 - 18:28
Permalink
Thanks for that. That's a
Thanks for that. That's a good way around. But when I substitute the shortcode within a view with 'Global:Custom Text' field like this: <code>[h5p=[nid]]</code> I simply get the output as <code>[h5p=3384XX]</code>. I've added the 'Content:Nid' field previous to this field. So I'm sure that I'm getting the Node ID. So the question now becomes how to use the Shortcodes within the Views?
papi Jo
Sun, 03/12/2017 - 19:14
Permalink
I don't understand what you
I don't understand what you mean by "shortcode" etc. This is what I do:
Then go to Home » Administration » Structure > Blocks and add your "MCQ of the day" block to somewhere on your drupal site. For instance I have added it to First Sidebar, see screenshot. The latest MCQ H5P activity created is a clickable link.
tomaj
Mon, 03/13/2017 - 07:07
Permalink
+1
Good job with the screenies!
msathesh
Sun, 03/12/2017 - 19:55
Permalink
You are displaying the link
You are displaying the link to the page, right? I do not want the user to be taken to a separate page. Instead, show the quiz in the right sidebar itself, for example.
papi Jo
Sun, 03/12/2017 - 22:55
Permalink
Sorry, I had not understood
Sorry, I had not understood from your original post that you actually wanted your mcq quiz to be displayed inside the sidebar. How do you do that " using Block and Shortcodes"?
Why do you want to do that? Won't the content of your MCQ quiz be squeezed in the sidebar? Why don't you want just a link in the sidebar leading to the MCQ quiz on the page?
msathesh
Mon, 03/13/2017 - 06:45
Permalink
Yeah, I guess that's the only
Yeah, I guess that's the only way for now.