Feedback: Compatible With Glossary?

Feedback: Compatible With Glossary?

by John Keilaus -
Number of replies: 2
Hi
really like the Feedback module. Ideal for for my needs - so thank you for all the hard work in providing this great plugin.

I have a question however - I am running moodle 1.5.x and have set up a test feedback., It does not appear to be linkiing to my Glossary however. This is an important requirement for my application as I need to provide optional help / guidance lookup for my students. Glossary AutoLinking would be my natural choice - however it does not seem to work within Feedback Surveys.

Am I doing something wrong or is this a known issue? In either case - does anyone know what I need to do to enable Glossary Autolinking within Feedback?

Thanks - QuaySupport

Average of ratings: -
In reply to John Keilaus

Re: Feedback: Compatible With Glossary?

by John Keilaus -
ps - If this is a case of having to modify code within the feedback module, I'm happy to do it or TO PAY FOR THIS TO BE DONE.
In reply to John Keilaus

Enable Autolinking In Feedback Module

by John Keilaus -
Eureka!!
I have just completed my first EVER Moodle Hack!

After pouring over the code in Feedback, I found a way to enable Glossary Autolinking within Feedback.
What I did was;
The feedback module seems to use a seperate lib.php for each different type of element used in a survey. This can be seen by exploring the Feedback->Mod->Feedback->Item Folder of the unzipped package.
You will see that each type of form element has its own subfolder, and within that each element type has its own lib.php

EG
For a Textfield
1. Open feedback->mod->feedback->textfield->lib.php
2. Goto function named [function feedback_print_textfield] around line 104
3. Look for line "<td valign="top" align="left"><?php echo text_to_html(stripslashes_safe($item->name) . $requiredmark, true, false, false);?></td>
4. Change it to <td valign="top" align="left"><?php echo format_text(text_to_html(stripslashes_safe($item->name) . $requiredmark, true, false, false));?></td> - This is basically wrapping the text_to_html() function within the Moodle Format_text() function with is where the glossary functionality kicks in.
5. Save the lib.php file and upload to your server in the CORRECT folder

coolNow you surveys will support Glossary Autolinking for text fields.

You will need to repeat the exercise for each different form element type by navigating to the correct folder feedback->mod->feedback->formelementtype->lib.php

Then look for the feedback_print_elementtype function for that element type and nest the text_to_html() function call within a format_text() function call - DON'T FORGET TO CLOSE THE PARENTHESIS


Hope this helps anyone else out their
QuaySupport Virtual Learning Solutions
Average of ratings: Useful (1)