New filter for displaying questions in any content

Re: New filter for displaying questions in any content

by Jon Bolton -
Number of replies: 1
Picture of Particularly helpful Moodlers Picture of Testers

Hi Peter - would you be willing to share the code for the question filter?

In reply to Jon Bolton

Re: New filter for displaying questions in any content

by Richard Jones -
Picture of Plugin developers Picture of Testers

Hi Jon

I'm a little bit hesitant because I've not done any serious Moodle dev outside theming before now.  However, there is a simple piece of filter code on my github (richardjonesnz) that allows a teacher to insert code that displays a question in a popup using the preview.php page.

I have also got an Atto button that only the teacher can use to insert a hashed question id would be a workable approach.  That's also there, based on Justin Hunt's Atto template which I barely understand.

I'm not sure how to create the hash though as it looks complex to hash within YUI and recover it in the PHP filter.  At my level anyway.

I'm now working on passing that to a copy of preview.php which has a couple of lines to de-obfuscate the id.

Anyway, if developers have advice I will try to follow it.


Average of ratings: Useful (1)