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.
Comments
Comments are no longer open for new posts. Existing comments remain available to read.
Example: I have some text in a p tag, and I basically want THAT text to be the content for one of the variables. I've got JQuery to isolate and copy the text, but I can't seem to figure out a way to get this text to become the variable (so a subsequent SQL query uses this new variable in it's select statement).
Hope that all makes sense.
Cheers.
Richard
So if your query returns an array of data you need to access it from the JS field. And set it to HTML from there. The results will be in the @@DATASET@@ variable.
Perhaps you are referring to the situation where your query does not return a unique ID as the first field in each row in the query result set. In that case when it put into json and back out again everything gets written to row 0 in the array (ie you just get one row). In that case you should make sure your result set contains a unique id as the first field in the result set.
Do you know if there's an ETA on a fix for the bug that only passes the first set of variables specified in the Dataset variables to the plugin.
Love the plugin so far, it's really helpful!
Richard
Thank you very much for taking the time to answer me. My question sounded a bit silly, but I wasn't sure. Now I am in the right direction.
Your plugin is awesome.
The way you really want to do this, is to add that JS to set content to the div, inside the template. Or even just add the content to the template body. When the filter string is put on the page, and the page displayed your template will be run and any content/js or CSS will be sent to the browser. Encapsualting all your login in the template is how it is supposed to work. You can do quite a lot within Generico, but just get the basics working first.
It is possible to load a Generico template into a Moodle page from JavaScript?
I tried:
document.getElementById('tag-id').innerHTML = '{GENERICO:type=foo-template}';
but it doen't work.
Thanks for quick reply. I had verified every thing, like presence of Generico and all of its subdirectories in all (two) running instances and in source of AMI image being used, permissions of Generico directory. While setting investigation, when I opened page .../admin/plugins.php?updatesonly=1, it started working.
We are using Generico Version 1.4.10(Build 2019071300) with Moodle 3.3.2 (Build: 20170911). We have AWS Auto Scaling environment, Generico was working fine for a long time.
Suddenly, we started getting "generico - Missing from disk!", but Generico is present in project. After some time it started working. Do you have any idea why did it happened.
Is it possible to create a Line Chart with multiple lines? If so, how? I can't manage to do it :s i.e. to compare two different cities.
Thanks!
awesome plugin!
Passing by to note that custom profile fields only works if their shortnames are in lower case. Didn't find it elsewhere, have to read the code, so noting here