Generico Filter icon

Generico Filter

Maintained by Justin Hunt
Generico is a simple filter for creating templates of code snippets and text that can be inserted into Moodle text areas.
Price option: Free

Supports Moodle 2.1-5.2 See all versions
Latest release: 9 months ago
Installations: 2564
Downloads (last 90 days): 558

Frankenstyle name: filter_generico
Filters

Comments

Comments are no longer open for new posts. Existing comments remain available to read.

Hello, I would like to define a variable like variable=a|b|c but as a fourth option, it shgould be possible to enter manually a custom value. How is this possible? Or is there a workaround to achieve a similar functionality?
Thanks again for the quick reply Justin. I was hoping for a "Well it worked for me" response. lol. I will think of another way. I will still have uses for Generico though. Thanks for the great plugin!
What happens if you put {GENERICO:type="dearusersfirstname"} into a forum post? My guess is that it will work, though Quickmail will not.
Probably Quickmail doesn't pass the text through the filter system.
Not sure if this is what you are trying to do, but trying to use Generico tags in email text really is problematic. If the text is filtered before it is sent. the user specific information won't be correct. Generico will use information of the logged in user. You might be able to get around that because Generico can perform custom database queries. But the next hurdle is to get Quickmail to send the post processed text. My guess is that you would need to customize Quickmail to pass the email text through the Moodle filter system, and then use that post processed text (not the original) when sending.
Thanks for the quick response, Justin! I have activated the Generico filter in the manage filters section before all this. I have just installed the Generico Atto editor icon and it now shows up in the Atto editor. Thank you! However, this Generico filter doesn't seem to work in Quickmail. It only displays: {GENERICO:type="dearusersfirstname"}. Should there be quotes in the Generico tag??
Hi Marvin, Is the Generico filter enabled at site admin -> plugins -> filters -> manage filters ? And have you installed the Generico plugin for the Atto editor and added "generico" in the Atto toolbar settings? You need to do both of these things.
Hi Justin! I'm trying to use Gernerico in Quickmail block. There is no "G" in the text editor and I have used the 'welcomesuser' template and modified it to 'dearusersfirstname'. My code snippit was placed in the body of the letter as '{GENERICO:type=dearusersfirstname},' (no quotes of course), and it didn't customize the output. should i have used HTML mode?? Hmm...
Hi, congrats for this wonderful plugin! I tried to insert a lightbox (configured from your presets) on Moodle 3.3.1 but it didn't work, nothing happens, page only scrolls to top! Any idea what I'm might doing wrong?!
Kind regards,
George
Dear all,
How can we add database connection and sql by using Generico Filter plugin as shown as the link
Thanks a lot.
The p tags are being removed.
Carlos
Hi,
We need some help here. We upgraded the version of the plugin from 1.3.0 to 1.3.8. The plugin is now stripping out the html tags when it renders the code.
Ex:
in html view:
{GENERICO:type="narration",audiofile="",narrationtext="

Vivaldi! Il prete rosso, or “the red priest” in Italian. This was
Antonio Vivaldi’s nickname because of his red hair and because he had
trained to become . . . a priest! At the age of 26, he was forced to
abandon priestly duties because of ill health.

Perhaps leaving the priesthood allowed him to focus all of his energy on
music. He continued to expand his reputation as an accomplished violinist,
conductor, and a highly prolific composer.

So virtuosic was his violin playing that a German architect who heard him
play in 1713 stated that “it is hardly possible that anyone has ever played
or ever will play in such a fashion.”


"} {GENERICO:type="narration_end"}
When the page is in view mode, the

tags are removed. We are using Moodle 3.0.7.
It worked before when we were using Generico 1.3.0 and Moodle version 3.0.5. Any ideas of what might be happening?
Carlos

Oh, thats too bad! A lot has changed in Moodle 2.9. Because Moodle started to use AMD in Javascript. It would be possible to add the Dataset variables features to the old version of Generico. But I do not have time to make those changes. From Moodle 2.9 you can use the latest version of Generico. I hope that upgrading is an option for you.
Hello Justin, in forum you wroute that we should set Dataset Variables, but our moodle version is not compatible with fresh version where that field have
Moodle version 2.7
Can you ask me what version may help us?
If there are not, can you update plugin for 2.7 moodle?
You should really post these questions on the forum. Because other people will notice and answer or get the benefit of the answer. And I can attach templates and resources to the post, which I can't do here. https://moodle.org/mod/forum/discuss.php?d=261896
You can not put Generico variables in the Dataset field. The syntax is just the same as for the $DB get_records_sql function.
https://docs.moodle.org/dev/Data_manipulation_API#moodle_database::get_records_sql.28.29
You put any variables in the SQL as '?' marks, and any data or variables that should take their place in the Dataset vars field.
Justin Hunt, hello, i have a question about DATASET templates
Is it possible to improve sql query like this ?
SELECT u.firstname, u.lastname, u.email, c.fullname FROM mdl_user u, mdl_role_assignments r, mdl_context cx, mdl_course c WHERE (u.id = r.userid) AND (r.contextid = cx.id) AND (cx.instanceid = @@COURSE:id@@) AND (r.roleid =3) AND (cx.contextlevel =50);
i dont understand how it make
help me plese
Justin Hunt, thank you!