## General plugins

### Generico Showcase

Generico Showcase

Hi all,

I thought it might give other users some ideas if there was a place to share Generico filters.  for that reason I've started this thread.  The idea is that anyone who has developed a filter that that other people could use can post it here.  The best would be if the post included an image of the filter in action and the code (or a link to the code).

To get the ball rolling, I've put together a filter which creates a slim slider at the top of a course.  The idea is that it replaces the traditional course introduction with a more visual item. You can see it below, placed in the summary section of a course using the Grid format.  there are four slides each with their own text.  It would also be possible to add this to a label.

The code and the notes for adapting it are available here:

CourseBanner code and notes

I hope you find it useful.  Please feel free to comment on it or improve it.

All the best

Andy

Average of ratings: Useful (11)
Re: Generico Showcase

Andy, Cool!!!!

A kind of pseudo Lightbox type thing.

I'll check it out.

-Derek

Average of ratings: -
Re: Generico Showcase

Thanks Andy. I wish there was a better way to share snippets but this works for now.

This is a blog post I shared earlier on how to make Moodle Cloud style post-it notes in Generico:

====================================

And this is a very simple bootstrap button maker. You will need a bootstrap based theme to make it work, but it requires no javascript or anything tricky.

In a new template give your template a name, eg. bbutton.

In the template body paste this

<a class="btn @@style@@" href="@@url@@" role="button">@@caption@@</a>

In the template defaults, paste this:

url="#",caption="click me",style="btn-primary|btn-secondary|btn-success|btn-info|btn-warning|btn-danger|btn-link"

Then you can select bbutton from the atto generico popup, choose the button style, add the caption and url, and les voila!

Average of ratings: Useful (2)
Re: Generico Showcase

Hi all,

I added another field to the button maker to allow the user to designate the target for the link - open in same window, open in new window etc.  It might be useful for some people.

Andy

Average of ratings: -
Re: Generico Showcase

I just added a new version of Generico filter to the plugins database. It has a new feature that allows you to import/export templates so that they can be more easily shared. It is only for the latest Generico and on Moodle 2.9.x and 3.x. (NB If your template requires uploaded CSS or JS files, then they won't be exported or imported in the bundle.)

On each templates settings page on the top right there is a green box labelled "Bundle." If you click on that the current template will be downloaded as a small text file. If you drag and drop such a text file from your file system onto the green box, the template bundle will be imported into the current template. You will still need to save it though.

Its new, so there might be some weirdness but I have attached two template bundles that should work.

One is the good ol postit note template.
(Enter text between the two generico tags that get inserted on the page to make a post it note.)

The other is a modified version of Andy Chaplin's newsflash template.
(Insert a medium sized image between the generico tags and it gets overlayed with a CNN/ABC style news effect)

Hope you like it

Average of ratings: Useful (3)
Re: Generico Showcase

Thanks Justin.

Average of ratings: -
Re: Generico Showcase

Hi Justin

Whats the Generico code to insert this?

is it this?

{GENERICO:type=newsflash, Message="a message", Date="September 1st", Headline="Whats up?", ShowName="Vladimir Putin", Location="St Petersburg", FileName="something.jpg", Width=640,Height=480}

Gary

Average of ratings: -
Re: Generico Showcase

Its almost that, but there is no Filename. If the template specifies an end tag, then it will have a start and a close tag. That makes it very easy to use because you can just insert an image the moodle way in between the two generico tags. The template looks for that and performs the overlay. So in your html editor it will look like this. (note: i) Generico Open Tag, ii) Picture iii) Generico Close Tag

{GENERICO:type=newsflash, Message="a message", Date="September 1st", Headline="Whats up?", ShowName="Vladimir Putin", Location="St Petersburg", Width=640,Height=480}

{GENERICO:type=newsflash_end}

Average of ratings: Useful (1)
Re: Generico Showcase

I've put together a countdown timer which can be added to a block to count down to a given deadline.

It allows a title and a message to be added.

The code is attached to this post and can be imported using the "Bundle" feature provided by Justin in his latest update.

There is also a document with notes and the code available here which will help with changing various aspects of the filter.

Hope you find it useful, or it gives you an idea for something better!

All the best

Andy

Average of ratings: Useful (4)
Re: Generico Showcase

Hi Justin and Andy,

@Justin - Being able to import and export Generico templates is the cherry on top for this filter. Thanks Justin!

@Andy - Thanks for the countdown timer. Makes a great addition in a label at the top of course as a countdown to the end of the course.

Working fine in Moodle 3.0.1+. I just happened to be trying out some other themes and the timer works just fine with Formal White, evolve-3D, Klass, More, and Pioneer. Works in Eguru but the days, hour minutes, and seconds are stacked vertically, instead of side-by-side.

Average of ratings: -
Re: Generico Showcase

Hi Al,

Thanks for letting me know about the other themes.

The vertical stacking happened to me at some point.  I can't offhand remember how I fixed it.  I'll have a look at it again tomorrow and see if I can pinpoint what I did.

All the best

Andy

Average of ratings: -
Re: Generico Showcase

False alarm! Took a couple days off so I'm late getting back to this...a couple hours after I posted the info about the themes and just as I was shutting down for the day, I figured out that it was not a 'problem' after all. The vertical stacking is caused by responsive themes. Browser width too narrow, the vertical stacking occurs...browser width wider, no stacking.

It just so happened that when I was testing the Eguru theme, I had a bunch of windows open to other stuff, and had that particular window squeezed down to a much narrower width than I normally use. I just checked the Eguru theme again and you can control the stacking based on how wide you set the browser width.

Average of ratings: -
Re: Generico Showcase

Hey thats another cool template (the countdown timer). It worked straight away.

Average of ratings: -
Re: Generico Showcase

I wonder, if it would be possible to create a version of the Countdown Timer for assignments, that automatically counts down to the Due Date and or the Cut-off Date based on the assign settings in the database. The nice thing about having one like this is that if you change the assignment dates, the countdown would automatically change too. Should automatically update when a course is reset for a new school term, also.

Average of ratings: -
Re: Generico Showcase

I just added two more fields to each Generico template's settings (and I think and hope and believe that we won't need to add anymore).

They are dataset and datasetvars. These make it possible for the filter to fetch a custom dataset from the database and pass it on to the template to use.

So using that, the following filter does what you suggest Al, though you manually need to set the module id of the assignment in the module_id variable.

The filter string looks like this:

{GENERICO:type="assign_countdown",Title="Finish by this date",Message="..or else",module_id="161"}

The module id is what you see in the address bar, like the screenshot attached.

I have attached the bundle also.

Average of ratings: Useful (4)
Re: Generico Showcase

Hi Justin,

Thanks so much! This is a really nice addition to the countdown timer capability and definitely is more noticeable than the normal assignment Time Remaining listed under Grading summary.

Average of ratings: -
Re: Generico Showcase

Hey Everyone,

I just modified the assign_countdown.txt to make a version for Lessons and ran into the same problem we had a few months ago with Desmos filter in which trying to run multiple copies of the same filter on the same page does not work. I would presume the fix would be the same, which was to use @@AUTOID@@ in the filter. My first couple of attempts have not worked, though.

Average of ratings: -
Re: Generico Showcase

It is because the original countdown filter uses a fixed id for the clock (ie not autoid).

Here is a version that uses autoid

Average of ratings: -
Re: Generico Showcase

Hi Justin,

Thanks for the new version, but something is still wrong with the clock part.  I put two assignments on a page, one right after the other in the same topic and have their due dates set 5 days apart. When you first load or reload the page, They work correctly for one second, and then both show the due date of the assignment listed second on the page. I even added the original countdown timer, which is a totally different filter, and it's countdown time gets changed to the time of the last filter on the page.

Average of ratings: -
Re: Generico Showcase

Figured it out. The TimeRemaining in functions getTimeRemaining and updateClock has to know which dataset to use. I've attached a fixed version for Assignments as well as one for Lessons. Since I am not much of a programmer, you guys please look and see if the way I fixed them is okay.

Average of ratings: -
Re: Generico Showcase

Hi Al

The way you fixed that was fine.

Although the actual problem really stems from the original template having put the javascript and css in the body text. It means that when the timer appears twice on the same page, so too will the javascript and css. So we ended up with two functions defined of the same name, but their content was different. Only one of those would ever be used, so one timer was effectively broken.

Ideally you would put the javascript in the custom js field and set AMD to yes. That way all the js is self contained and you don't get naming clashes ( and you can do a few more things too ...like use jquery and load 3rd party libraries).  So in the attached bundle I have put the js in the custom js area  and set "use AMD" to yes.

Similarly the CSS can also be put in the custom CSS field of the template.

It does increase the complexity a little to do it this way. And I want to stress that there is no right or wrong. Al's solution works fine. And the original countdown template works fine if you intend to use only one on a page.

And actually there are some advantages of doing it all inline. In both the JS and CSS cases ,if the code is in the body field it will be immediately available. If you use the custom fields, there is a noticeable lag before the JS and CSS are applied. In the case of CSS that looked ugly, so I left the inline CSS in place,in the attached template. Also if you use the custom field for CSS you can't use Generico variables in the CSS.

Average of ratings: -
Re: Generico Showcase

Hi Justin,

Thanks for the latest version. I like the CSS left inline too, so that I can add in a font_size setting so that when I put multiple countdowns on the same page of Moodle, I can make them a little less overpowering. I also like to add in variable defaults for the title and message.

Average of ratings: -
Re: Generico Showcase

How would you show the time to a quiz? I tried:

SELECT timeopen FROM {quiz} a
INNER JOIN {course_modules} cm
ON cm.instance = a.id
WHERE cm.id= ?;

but all I got was

NaN
Days
aN
Hours
aN
Minutes
aN

??

Average of ratings: -
Re: Generico Showcase

I'm not sure what your post has to do with the topic you have added it to - please start a new discussion, rather than replying to an unrelated topic (unless I've missed something in the ongoing discussion here).

Anyway, to answer your question - mdl_course_modules contains lots of different activity types, not just quizzes, so you need to only include those entries where 'module' matches the id of the quiz module from mdl_modules.

Average of ratings: -
Re: Generico Showcase

Its probably a good idea to give some context to your question, as it was probably not many people saw the relation to Generico in that.

I attached a template that uses the code you posted to fetch the quiz timeopen value and display it. Use this in the quizzes description area.

Note that its a bit tricky getting the dataset value in javascript, so I added an arbitrary "id" value (0) to be retrieved via sql. And also note that I passed in the @@moodlepageid@@ variable to the sql,  so the Generico template will only work when posted in the quizzes description area. But you could hardcode/replace that with the quizzes cmid or create a regular variable for the teacher to specify the cmid, and pass that it in to SQL.

Average of ratings: Useful (1)
Re: Generico Showcase

Would this countdown also work with the remaining time until the user must complete a SCORM package, rather than an assignment?

I have users who have enrolled on a course containing a SCORM.  They enroll at different dates and times, but get 270 or 365 days before they must complete the package.  the number of days are set course by course.

Average of ratings: -
Re: Generico Showcase

Perhaps I should re-phrase.

It is not the SCORM, More the course enrolment end date for each user that is important for me.  I assume I need a modified statement of this:

SELECT duedate FROM {assign} a

INNER JOIN {course_modules} cm

ON cm.instance = a.id

WHERE cm.id= ?;

Average of ratings: -
Re: Generico Showcase

In theory yes it would be as simple as that.

Though the sql might(just might) be more tricky than that because the course enrolment date is part of the enrolment method. And you would need to place the timer on the course page or scorm activity description, or in a block, but not in the scorm itself.

Average of ratings: -
Re: Generico Showcase

Hi guys,

I'm crazy about social locker but I'm incapable of how to get it on moodle. My question is that is it possible to get social locker via Generico template? At first, I think social locker is somewhat like toggle but then I can't configure it.

* The scripts here:

- Is someone kind enough to instruct me how to get it?

Kind regards,

Average of ratings: -
Re: Generico Showcase

Hi Justin and moodlers,

I think Generico templates can show "social locker". I spend a lot time playing around and configuring but fail. Do me a favor! Give me a right direction.

Average of ratings: -
Vimeo template

Here is a very simple template to make embedding Vimeo videos easy. In action it looks much you would expect.

Average of ratings: Useful (1)
Re: Generico Showcase

I am working on a standalone showcase site, but in the meantime here is another template. This one is for building flowcharts. It uses mermaid.js ( http://knsv.github.io/mermaid/ ). You build flowcharts using a markdown like syntax. I made an example describing how foreigners from my own country generally talk to foreigners:

{GENERICO:type="mermaid"}graph LRA(Say something) ==> B{Does foreigner<br>understand?}C(Say something else) -.-> BB ==YES==> CB ==NO==> D((Repeat <br>LOUDER))D -.-> B{GENERICO:type="mermaid_end"}

Its a bit clunky trying to build the flowcharts in the html editor, partly because little html bits get in there, and mainly because the save and reload thing takes ages. So in practice you should build your flowcharts using the mermaid online realtime editor (  http://knsv.github.io/mermaid/live_editor/ ) and then paste the code into Moodle. After that you can tweak it when you need to.

The Bundle is attached. Download that and drag and drop it onto the green "bundle" box on an empty generico template's settings page.

Average of ratings: -
Re: Generico Showcase

Hi Justin,

I think there might be a slight problem with the Generico mermaid filter. Normally, whenever I add something new on my dev site, I always make a news entry on the front page. When I added your example flowchart, I didn't notice until a day or two later, that the topic area on the top of the front page would fade out just as the page finished loading. Seems that the mermaid filter is adding an opacity setting of .2 that is causing that to happen.

I tried adding the same flowchart in a label of topic 1 of a course. That faded out ALL the topics.

I guess the opacity setting must be coming from the mermaid CSS as when I remove the Requires CSS entry of: //cdnjs.cloudflare.com/ajax/libs/mermaid/0.5.8/mermaid.forest.min.css, the page opacity returns to normal. Of course the flow chart now renders a little 'ugly'. I think with a little playing around of your Custom CSS settings will fix it right up. Just changing from color: blue to color: green, for the label at least makes it usable again.

Does anyone else see this behavior, or is it just my Moodle?

Average of ratings: -
Re: Generico Showcase

Actually I can reproduce that error. It doesn't occur when I display it in a page, but in a label, yes it does.

I think this is a mermaid bug . I looked at it, and both Moodle and Mermaid are operating on the css class "section." Moodle is using it for making sections (topics I think), and Mermaid is using it as a marker for its own purposes and sets its opacity. I attached a screenshot of the css clash.

I think there is not much for it but to post an issue on the mermaid github site, and in the meantime don't use it on the front page or coursepages (ie don't use it in labels or blocks).

Edit: I posted this issue: https://github.com/knsv/mermaid/issues/292
(I know it would be better to post a patch, but its just a bit much right now.)

Average of ratings: -
Re: Generico Showcase

Thanks for the confirmation Justin! I am using this just for my own use in trying to figure out the logic flow of a couple of other peoples projects I'm trying to resurrect. Since I'm retired now, I really don't have to worry about how it looks for anyone but me.

I think I'll see if I can do a local install of the code on my server so I can tweak the code, like I've done with MathJax.

Average of ratings: -
Re: Generico Showcase

A Random Glossary Block modal for YouTude

This filter is a refinement for the random glossary block which highlights a video of the day.  The glossary entries consist of a concept (the title of the video) and the Generico filter with the YouTube ID.  The image probably explains it better!

The filter pulls the default thumbnail of the video and uses it as a button which launches the modal.  The block is in the bottom left of the picture.

At the moment, you have to enter the modal header (the title of the video) by hand into the filter.  I don't know for sure, but I suspect that the new improvements from Justin mean that it's possible to get the modal header directly from the glossary concept.  If it is possible and someone is interested in doing that or pointing me in the right direction, I'd be very interested in any suggestions.

All the best,

Andy

Average of ratings: -
Re: Generico Showcase

Great stuff Andy. I wasn't sure what you meant by getting the video title from the concept. Did you mean using the glossary definition as the title? The attached bundle will do that.

You could either hard code the name of the glossary that the concept is part of, or provide a field to enter that glossary name into. In the bundle I made a dropdown list of dummy glossary names that you could replace with your own glossary names.

Just for reference in one of the VideoEasy templates I do something similar, though the modal is not quite as nice. In that case I use CSS to display a red play button on the thumbnail so that students know its a video.
http://demo.poodll.com/mod/page/view.php?id=184

Average of ratings: -
Re: Generico Showcase

Hi Justin,

I stole your idea from the videoeasy template and added a fontawesome play button, but the header on the modal doesn't seem to work.

The idea was that the header here would get its content directly from the title of the glossary entry.  That would mean that the concept field could be removed from the filter.  The process would be, create the glossary entry by entering a name in the concept field and then using the Generico filter to create the content.  The modal would display the name of the video (=the title of the glossary entry) and the video.

Can you tell me where you got the SQL from?  Was that your own creation, or is it generated somewhere?  I think I'm not far away from solving this, but I've got stuck where to look.  At the moment the header looks like this:

I've attached the filter and an xml file with two files as a glossary.

Average of ratings: -
Re: Generico Showcase

I was not really sure what you were doing, and I think got it wrong. If you just want to show a glossary entry a day with a youtube lightbox, perhaps you do not really need all the dataset stuff?

To answer your question, I wrote the SQL. The Generico dataset system could be made more usable. Right now its a little clumsy. If you want to use it in the template body area it will only work if the dataset contains a single record. If you have two concepts of the same name in the glossary it will go bad. But in testing this it seems to only work when there is one var in the datavars area. So  I think that is the problem you are having. Perhaps for now just hardcode the glossary name In the SQL.

e.g

SELECT * FROM {glossary_entries} ge INNER JOIN {glossary} g ON g.id=ge.glossaryid WHERE g.name='Video of the Day' AND ge.concept=?;

I will have to do some bug fixing .

Average of ratings: -
Re: Generico Showcase

#### A personalised tag

This takes the idea from Al Rachels here in the discussion on the Learning Moodle MOOC and applies it to the Best Seller label (à la Amazon), to give you this effect.

It grabs the user's first name and lets you add on a message - maybe a deadline, or a key element.

The colour can be changed to match the theme, or you might want to use the Bootstrap colours to match the buttons on your site.

This is a neat way to personalise elements.  You can talk to everyone directly, which could make quite a difference to the way users interact with the courses.

It would be interesting to hear other ideas for uses along these lines.

Andy

Average of ratings: -
Re: Generico Showcase

Hi Andy,

Here is another one I posted in another forum yesterday. It modifies the 'toggle' filter that Justin includes with the Generico filter and lets you format the font color, background color, and font size. I especially like it as it gives you a way of adding a bunch of large resources, such as photos and videos, without them taking up a bunch of space until someone actually wants to look at/use the resource. It could easily be modified to add the username, too.

Average of ratings: -
Re: Generico Showcase

Hi Al,

That's neat.  I've been putting a lot of stuff into collapse elements or modals as it really helps to make the layout more compact.

Thanks for sharing!

Andy

Average of ratings: -
Re: Generico Showcase

Just added two versions of a weather widget from accuweather.com that automatically gives weather for your location.

No real need to use the MoreWx one as if you click on the display from the first one, it will take you to the accuweather site and give the view provided by the MoreWx bundle.

Average of ratings: -
Re: Generico Showcase

Thanks Al.

I just tried it. It works great.

Justin

Average of ratings: -
Re: Generico Showcase

Hi All

I have had  play and slowly getting to grips with this here is my contribution.

Its based on the re-invention by Al Rachels modification of the toggle by Justin.

It allows the user to also:

• apply 2 colors to give a gradient background for different browsers
• apply a solid border
• the width of the border
• the color of the border
• the font weight (bold or normal)

Be kind guys is my first attempt at this kind of thing

Gary

Average of ratings: Useful (2)
Re: Generico Showcase

Hi Gary, it works great.

I played with it a bit. I also added an animation to the toggle very simply by specifying the animation duration in the jquery toggle call. Like this:

$("#" + @@AUTOID@@).click(function(e){$("#" + @@AUTOID@@ + "_target").toggle({duration: 500});
return false;
});
See my stunning lack of button design skills and the animation in action here:

Average of ratings: -
Re: Generico Showcase

Here is a new template that I made. This uses the Ace editor component and displays a preview window beside it.

So whatever code is typed in the editor is shown in the preview window. You can set code to show in the editor on page load, by putting it between the Generico start and end filter strings. By default the mode variable setting is one of html or javascript or css, but actually any of the modes Ace supports can be used.

It looks like this when displayed ...

Average of ratings: Useful (2)
Re: Generico Showcase

After reading Mary Evans post on thumbnails (https://moodle.org/mod/forum/discuss.php?d=329373) I thought that would be a good case for a Generico template. So I turned it into one. You need to sandwich all the thumbnail items inside a thumbs container. As in the image below:

Average of ratings: Useful (1)
Re: Generico Showcase

Hey...thanks that's way cool man!

I must try out that Generico, is it a plugin?

Cheers

Mary

Edit! Oops...I[ve just seen that this is in the Mod forum! I thought it was Themes forum! dozy me!!! LOL

Average of ratings: -
Re: Generico Showcase

Its two plugins .... and a little bit of reading.

Generico Filter : https://moodle.org/plugins/filter_generico

Generico Atto HTML Editor Plugin : https://moodle.org/plugins/atto_generico

Once its all installed you drag those "bundles" attached in the previous forum thread over the green bundle box on a blank template settings page, and save it. Then it should work as in the screenshot attached also in that email.

I need to document this a whole lot better .....

 I just added information on bundles to the Generico filter plugins page.

Average of ratings: Useful (1)
Re: Generico Showcase

Hi Justin,

I have installed both plugins successfully, and changed my editor preferences to ATTO.

I really prefer TinyMCE but can live with ATTO for testing.

However I am not able to see the 'G' icon in ATTO.  I can see it is in the pix folder but is is not displaying.  Have I missed a settings?

I have tried to upload a new icon which is a 16 x 16 transparent png called "icon.png", but still no luck!

Could this be because I am testing it on Moodle 3.1 dev do you think? That said I did not get any errors so I am guessing its OK?

I must have done something wrong!

Thanks for the Thumbs template, bye the way, this will be really useful. Once I know how to write them I can add some tutorials to go with my Morecandy theme.

Any help to get the Generico working would be welcome.

Many thanks

Mary

Average of ratings: -
Re: Generico Showcase

Hello Mary,

After you installed the Generico Atto plugin you have to "set it up" in Atto at the Atto toolbar settings at Toolbar config (Site administration > Plugins > Text editors > Atto HTML editor > Atto toolbar settings).

The only thing you need to do is adding the line generico = generico in the toolbar config at the spot you want it (like between style 1 and list as example).

Gemma

Average of ratings: Useful (1)
Re: Generico Showcase

Yes, just as Gemma said. Did that fix it?

Actually I am right now installing Moodle 3.1 to test it, because this is a good opportunity to do that.

Average of ratings: -
Re: Generico Showcase

Hi Justin,

Yes what Gemma said fixed it....well at least I got my own icon displayed. But cannot get it to display as per your Demo, both in my Moodle 3.1 and your Poodll site, just befor and just after midnight.

Thanks for the thumbs templates...love the Bundles idea...wish we could use something like that in Themes

I'm just testing it all again in M3.0

Will let you know how I get on.

Cheers

Mary

Average of ratings: -
Re: Generico Showcase

I honestly think we should use something like this in themes. Why do WordPress users get all the fun stuff? It wouldn't be too hard to implement on the back of Generico as it is. It could be as simple as Generico looking in the currently selected theme for bundles/templates folder. But introducing a dependency on Generico to a theme would not be cool.

I am sorry it is not working, and that the docs are written for telepaths. I wonder whats up with it not showing.

Do you mean that the thumbs/thumbitems do not display in the Generico Atto popup dialog? Does a simple "helloworld" style template show up?

Average of ratings: -
Re: Generico Showcase

Justin, I have the bundle working on a Moodle 2.9 site, but in Moodle 3.0 the bundle does show in my Atto bar- I can fill in the items - though the filter doesn't seem to pick it up and transfer it too a thumbnail.

Average of ratings: -
Re: Generico Showcase

That is what I am finding...!

Average of ratings: -
Re: Generico Showcase

Hi,

The prob I am having is with Moodle versions 3.0.3 & 3.1Dev

What worried me was it did not work on your Poodll site either, I followed your video and used the thumbs template. I saved the work which looked ok I could see the Generico code. But when viewed the code is still displayed as code and has not been decoded into HTML.

I'm going to see if 2.9 works later today.

Adding an extension to Generico to check if a theme had a set of 'bundles' would be great. I don't think adding a dependency to a theme is bad, Some themes do have dependencies. Not having the dependency would not compromise a theme, it just means the function would not work if Generico was not present in your Editor & Filter options.

if only I could get it to work...!

Average of ratings: -
Re: Generico Showcase

The PoodLL demo site is actually running an older version of Moodle until I can update it. So the version of Generico there does not support bundles. Sorry. When I ever get a night free I will do that (and fix up the documentation).

Mary if you still see the Generico code on the page, perhaps you have not enabled the Generico filter in

site admin -> plugins -> filters ->manage filters

(I am pretty sure this is not to do with Moodle versions.)

Average of ratings: -
Re: Generico Showcase

uhm... that's really bad I didn't check it before posting.

Indeed forgot too put the filter on enabled on the test server. And it works in Moodle 3.0

Average of ratings: -
Re: Generico Showcase

Hi Justin

I was using the templates already in your demo site. I was using the line graph like in your Demo Video.

But it just hung there...

Average of ratings: -
Re: Generico Showcase

I am sorry it has given you trouble Mary. Generico is pretty rock solid really, though some of the early templates might not be. I think the problem you are facing is different however. But I don't want to waste any more of your time, trying to run it down.

When you do have time, just let me in a little detail know what you are doing on your site and what is happening.

Average of ratings: -
Re: Generico Showcase

Hi,

Was the the instruction to "Enable" the Generico filter written somewhere as I don't remember seeing it.

Well that did the trick.

Average of ratings: Useful (1)
Re: Generico Showcase

Many thanks Gemma,

I obviously missed that in the instructions?

Cheers

Mary

Average of ratings: -
Re: Generico Showcase

I am not sure what I did to fix the red squares but now that I have it running, I seem to have found a quirk in the Generico assign-countdown bundle.

It runs within the assignment but if I use "Display description on course page" then when I close the assignment, it shows the proper timer values but then immediately shows NaN aN aN aN when I return to the course page.

Is there a fix?  It would be much better to have it showing without making the student open the assignment.

Average of ratings: -
Re: Generico Showcase

The plot thickens,...

If one has more than one countdown showing on the course page then they start talking to each other,....  Well, arguing is more like it. I just discovered that if I have the End-of-Course count down timer displayed before an assignment countdown, they both seem to work but two assignment countdowns will not..

I am figuring that I can set up all my weekly assignments with a timer and show only one at a time to the course page.  Once that time passes, undisplay that one and display the next. Meanwhile, within each assignment, I can have a count down running all the time.

I understand that a countdown will go negative once the time has passed.  Interesting.

There is a madness to the method.....

Average of ratings: -
Re: Generico Showcase

I have no doubt that the assignment countdown can be made to work on the course page, and multiple instances simultaneously. When I get a chance I will walk through that process, because it will be quite informative I think. Sorry, it won't be just now however.

The assignment countdown was part of a conversation here, based on a user's requirement, where they had made their own template. In that case it had originally been a lesson timer, and there was a need to specify the id of the assignment to make it work.

A lot of people's templates will be like this, i.e not designed for general use, shared with the understanding that they might need adjusting to work elsewhere.

Average of ratings: -
Re: Generico Showcase

One confusing point is that there are several versions of  assign_countdown and no identification to determine which is which.  A system of revisions would be helpful.  I am sure that my questions were out of sync with the various files available.

Also, I have been exploring assign_countdown and the countdown presets.  I have noticed that when I make a change in the HTML code for one that it reflects into the other.  This happens when the same variable/tag name is used in each preset. Variable/tag names have to be unique to the preset.

I realized this in an interesting way when I designed code for Additional HTML.  I inadvertently used a tag name common to Moodle and ended up changing the font-size for some text throughout Moodle.  I no longer use common variable/tag names anymore just to keep it safe.  Another reason too mind the terminology in a preset.

As I write this, I wonder if that is the reason all my read-outs for the countdown displays are the same if I have more than one on the course page.  This would not show up within the resource.

Average of ratings: -
Re: Generico Showcase

Countdown VS Assign_countdown  presets surgery update:

It appears as if the functions, variables, and tags are being treated as global. Therefore when more than one template is present on the course page, they argue with each other and the last one wins (or when twin variables go out walking, the last one does the talking.)

I am in the process of changing the names to separate them.

Average of ratings: -
Re: Generico Showcase

If my previous start to answer this got sent before I deleted it, sorry, just disregard it. Been so long since I looked at this filter I forgot some necessary details on how to use it.

The assign_countdown actually needs some "Instructions" added in the box right above the body text box. As you've noted, there were multiple versions of this bundle, so to make sure we are talking about the same one, scroll all the way to the bottom of the template and look at the entry for Dataset Variables. You should see @@module_id@@, and when you insert this filter somewhere, it will ask you for the Title, Message, and module_id.

The "instructions" need to tell you how to find out the correct module_id AND that it will be DIFFERENT for each assignment on the page, so you have to get the right one for each use of the filter.

"IMPORTANT! Add this filter AFTER you create the assignment, then Edit it. When entering this filter, look at the assignments URL for the number after the word, update. Use the number for your module_id."

Average of ratings: -
Re: Generico Showcase

Yes, I am familiar with everything you mentioned. Dataset variables does contain @@module_id@@ and yes, the moduleID is different for each assignment and the curtains match the drapes in each one....

Still, it needs revision numbers, no?

Average of ratings: -
Re: Generico Showcase

I thought about doing revisions, over a year ago, with git on my own computer, but since I no longer actively teach, I haven't done anything about it since then.

Instead I track filter revisions by just adding a number to the bundle name. So, on those rare occasions I modify a filter, I click the Bundle button, go to the folder where I keep them, see what number I had used last time, and add one digit higher and save it. I do NOT put numbers in the name in Moodle as that would break the filter wherever I used it before in my site. Haven't started it with these filters, but for some other stuff, instead of just simple numbers I have been using date numbers the same way as version numbers in Moodle plugins. That way, not only do I know which is the latest version, but which day I last worked on it.

Average of ratings: -
Re: Generico Showcase

Separating two assign_countdown presets on one course page.

If you use multiple templates with the assign_countdown preset, the last preset in use on the course page sets the colors and values for all of the rest because tags and functions are global.  I now believe that the variables within the functions are local.

To see this, set up the same template in two assignments and set the due dates significantly apart so the difference is easy to determine.  Open each assignment and the countdown will be correct but when viewed from the course page, you will see that the last assignment determines the values and colors for all.

To fix this I created two templates and modified the preset in each so that the functions are slightly different.  For example, change function getTimeRemaining() to AC1getTimeRemaining() and no other template will see it.  (AC1 refers to Assign_Countdown first preset.)  AC2, AC3 would have to be used for the rest of the templates.

I tried to use Private Function but something did not like that.  Maybe there is another term that can be used.

After spending all this time figuring this out, I now realize a different approach that allows for the use of one template and one preset. However, realizing the globalicity of the functions and tags will help me in other presets.

Average of ratings: -
Re: Generico Showcase

Hi Steve and others,

I finally have my version of the assignment countdown working so that each one placed in a course is autonomous and does not impact the others at all. The problem turned out to be that each place there was a class of clockdiv, it also needed to have an autoid to make it unique to the page. So that was three places in the CSS section and one place in the div id where the class was set to clockdiv, that needed changing.

The bundle I've included also lets you set the Title, a message, and the font size so you can make each one "fit" the assignment you've added it too. Based on what I did to fix this, I will see about modifying the countdown, lesson_countdown, and quiz_countdown bundles later today.

Average of ratings: -
Re: Generico Showcase

Just after the previous post, I realized that since we are manually putting in the module_id, the assign_countdown can be placed anywhere in your Moodle site, even on the front page, or in an HTML block. Plus, if you add the filter, then select all of the text it generates, click on the Atto Link toolbutton, insert the URL to the lesson, (got to get it first), you can make it so your students can click on the countdown timer and go directly to the assignment.

Re-purposed HTML Block example. The double headed arrow was supposed to be a pointing hand but my screen capture software changed it.

Added to front page site news.

Average of ratings: -
Re: Generico Showcase

Cool, definitely cool!

Average of ratings: -
Re: Generico Showcase

Works well on my system.
The flaws that I was finding are gone.  They work independently even on the course page.
Choice of font...  How about a color picker?

It seems to me that you should include your name in the instructor so we know whom to bla... ummm, give credit.

I accidentally caused the image to be centered.  It does not seem to happen quite right if I highlight the statement in the description as it becomes only partially centered.  It has something to do with having a centered link in the description there before placing the filter.

Average of ratings: -
Re: Generico Showcase

Here's a version with font and font-size for the title, again with no interference from/with other countdowns on the same page.  Color later...got clock code I have been avoiding working on for two days, on another project. Needed for next release of a plugin I maintain now.

You can safely ignore my version number that is part of the file name since the actual name is IN the file. Just drop the file on the Bundle button like you normally would.

Average of ratings: -
Re: Generico Showcase

Hmmmm, something funny going on. Last two times I've posted, it has logged me out. Any way, here is the picture I meant to add with the last post showing two different fonts in use..

Average of ratings: -
Re: Generico Showcase

Interesting that your last two releases were posted just as I was about to release mine.  I had comments for the tags, unique tag identifiers although your method is far more elegant, and isolated functions.  (I did not know one could identify the tag with @@AUTOID@@.)

Although I know HTML, there was a lot of discovery involved in the 15 hours of work!  What didn't help is that my system has been "updated" recently and it takes 30 - 60 seconds per edit! Good thing no one else is dependent on the system.

From your most recent code, I added a prompt for message font_size, added a second message with prompt for font_size and placed it under the timer as a caption.

I now see how to set defaults for the prompts within the code and added a few more.  Now I wonder if sooner or later, there might be a "Save as Default" button once the user has entered the Title, message and font_size.

As for the colorpicker, fortunately is it is not too difficult to change colors in the code.
All in all it is a very nice fiiter. I plan to use it to sell Generico to the university

Average of ratings: -
Re: Generico Showcase

A correction for your latest and greatest.... (New_assign_countdown2016080402)

Add the @@AUTOID@@ to the smalltext class.  I had a second assign_countdown running further down the list and it kept overriding my many attempts to change the color in the first one ....

Average of ratings: -
Re: Generico Showcase

I am glad to see that you are now able to make changes and get the countdown timer looking like you need it to be. I started to add an autoid to small text, but something came up and I needed to leave, so I published what I had. The REALLY nice thing about Generico is that once you play around with a couple of the templates, you start to see how easy they are to modify and make them do exactly what you want. Hope things work out with trying to sell Generico to your university.

I like the idea of a "Save as Default" button, but it is pretty easy to just go change the default prompts when you want to.

I would also like to see another plugin, maybe a block, that a teacher could install in a course, that would give them the ability to add templates from within their course so they would not HAVE to get an admin to do it for them. (I have another professor I've been helping who is struggling with that problem right now after getting IT to finally install Generico.)

Probably would also need to add an owner and permission for others to use, setting for templates so that a teacher could only modify templates they created so their changes would not percolate throughout the site and change the look of someone else's course. Kind of like the typing exercises for the MooTyper plugin. The plugin is available to the whole site and includes a few lessons with multiple exercises. Any course teacher can add one or more MooTyper activities and use the default lessons, but they can also add their own lessons. When they do make their own lessons, they have the option to keep them hidden, make their use available to anyone else, and make them editable by anyone else. Something similar would be nice for Genrico filters.

Average of ratings: -
Re: Generico Showcase

I am glad to see that you are now able to make changes and get the countdown timer looking like you need it to be.

It has been quite a learning experience form learning the code, learning Generico, and learning how to install a plug-in to begin with. Add to this the frustration of having to wait 30 - 60 seconds per edit.  (This happened about two weeks ago and my one-person IT team is looking into that.)

I started to add an autoid to smalltext, but something came up and I needed to leave, so I published what I had.

It was an interesting turn of events trying to figure out why my color changes were not taking.  (: I forgot too quickly that my recognition earlier that the tags were being overwritten was the answer. I just had to learn that again.

The REALLY nice thing about Generico is that once you play around with a couple of the templates, you start to see how easy they are to modify and make them do exactly what you want.

One hidden feature is that after I installed 17 timers, I decided that I wanted to increase the font_weight for all of them.  All I had to do is change one setting in the template,refresh the screen and all 17 were updated!  I only wish I could to this when I want to change one entry in all 136 assignments....

I like the idea of a "Save as Default" button, but it is pretty easy to just go change the default prompts when you want to.

I thought about this after posting the idea. Then I realized that it would change the default for all users in the system.  Making it user sensitive is the answer but yes, changes when creating the entry is easy.  Also, using copy/paste of the phrase and update the ID is easy too.

I would also like to see another plugin, maybe a block, that a teacher could install in a course, that would give them the ability to add templates from within their course so they would not HAVE to get an admin to do it for them.

This is what I see too.  After the course starts then I will be an instructor again without the capacity to make these changes and will have to pester the Site Admin for changes.  At least I can write my own preset files and submit them.

I am not sure but it looks as if when someone does not want an entry in the message that @@Message@@ will show in the resource.  I figure that a default blank space (or hyphen) should be present when no message is entered.

This template removes a lot of confusion in how I was handling the due time/date for my weekly assignments. It also removes that "option" that students were using that they were confused as to when it was due.  I love the fact that it goes negative when over due.

It is Just plain good stuff.....

Average of ratings: -
Re: Generico Showcase

For fear of the worst, and hope that I am not stepping on toes, here is my latest and greatest version of assign_countdown.  I hope it works as well on your site as it does on mine.

Feedback appreciated.

Average of ratings: -
Re: Generico Showcase

Hmm, I like the extras you've added, but for me, each block of the countdown time, days, hours, minutes and seconds, are stacked one above the other, instead of side by side. I tried changing themes, but still getting the same "stack" behavior.

I know one of my earlier versions caused the same behavior, but I didn't save it, and can't remember offhand why it was doing it.

I'll look at it some more tomorrow. Right now my eyes are killing me  from a combination of my severe case of dry eye and standing over a hot stove canning fig preserves.  My trees let me down this year...we only managed to pick enough for 12 pints. The pears were worse. Only THREE pears from a tree that normally produces so many I have to prop the limbs up to keep them from breaking.

Average of ratings: -
Re: Generico Showcase

Are you saying that you get a stacked display from my version or that you want a stacked version? Mine show as side-by-side.

I have two plum trees.  One is self pollinating while the other is dependent on the first. Just my luck, the first one died in a matter of a week while it was blooming.  As a result, I am now down to that second tree and it produced one plum.....

Average of ratings: -
Re: Generico Showcase

I guess I should have included a pic, so here it is...  Is this what ou see on your system?
Yes it is 29 days until the assignment is due because the semester doesn't start until August 29th...

Average of ratings: -
Re: Generico Showcase

OK, it is driving me crazy,.....

I am trying to adapt the code but just don't understand it.
What does the line <span class="hours"></span>   mean?
Is this supposed to carry the hours value into the div?
How/where is it set?

Average of ratings: -
Re: Generico Showcase

It looks as if I have achieved international recognition for my Generico Pathfinder...

Average of ratings: -
Re: Generico Showcase

Yes, so far as I know, <span class="hours"></span> does carry the hours value into the div. It is set in a variable further down the page in Custom JS.

Sorry for not providing a picture of what I meant by saying my result was stacked. The problem arose from having your version and my version running on the same page. Since they are similar, but mine doesn't have @@AUTOID@@ in a few spots where yours does, it was causing the funny results. Basically, I can run multiple occurrences of mine on a page and there's no problem. I can run multiple occurrences of yours on a page and there's no problem. If I try to use both mine and yours, then mine works as normal and yours changes to different colors and each of the timer blocks appears on a line by itself, thus appearing to be stacked.

I'll probably play with it some more in a day or two. Right now I'm trying to finish up "code checking" and user testing for a new release of MooTyper that adds four or five new capabilities.

Average of ratings: -
Re: Generico Showcase

I have had similar complications.  Multiple incidents of one template seem to work but mixing different versions of the same kind of template causes problems.

I have been testing them by changing the order on the page.    Sometimes, not only the colors and arrangement will change but the value of the digits are not correct.  It seems that the last one loaded takes over for CSS and calculations.  Once you have one of each working, slide the bottom one above the top one and refresh the page.

I keep the original version which uses global variables and test mine against it to get all variables to be local to avoid the cross talk.

It looks as if every function, value, and tag has to be unique from functions, values, and tags in all other templates.  They have to be localize otherwise there will be arguments.

Right now, I have a countdown that is all there except it does not display the digits.  (:  hat is why I asked the span question.  I would like too see a flow chart to help understand the language.  The CSS and HTML (and any other language in there) are a bit more sophisticated for me at the moment.

I think I even made a CSS error that changed the Moodle code itself.  I lost part of the editor and in another incident lost the left side tags for Admin.....

Average of ratings: -
Re: Generico Showcase

So I had to work on some kind of dashboard on the course page itself, I did that using the generico filter , I have attached 3 bundles here. All of them use the database and generate data according to the current course and the current user.  Though I eventually implemented the course section breadcrumb within the course format since they needed alot of extra work like progress indicators etc, I was not able to get all that in a single database query

Hope it helps someone

Average of ratings: Useful (3)
Re: Generico Showcase

Since I could attach only 2 out of the 3 files :D, I thought I ll make another post

Average of ratings: Useful (2)
Re: Generico Showcase

Wow thats impressive Farhan. Those look great. I will have to study these!

Average of ratings: -
Re: Generico Showcase

Looks good.. As a bit of a newb.. What does dataset refer to?

Regards,

Vernon

Average of ratings: -
Re: Generico Showcase

Hi Vernon

The dataset allows us to write custom sql statements for the generico filter ,  the dataset contains the result of the database query.  In my case it is quering the course grade categories and showing those in the graphs

Average of ratings: -
Re: Generico Showcase

It might come as a surprise, but I have been slowly chipping away at a Generico "book." (as in a moodle book activity). I do this when I am stuck without internet ... like on a plane or something.

Anyway, here are my notes on the dataset property. Farhan's charts are the best examples of the use of the dataset property. Have a look at those to see it in action.

The Template Dataset

It is also possible to set a custom SQL script which will be executed server side and the resulting data returned to your template. The SQL script will be called using Moodle’s DB->get_records_sql() function. See: https://docs.moodle.org/dev/Data_manipulation_API#moodle_database::get_records_sql.28.29 If there is only a single record returned, the record will be available for use in the body area of the template using the following syntax @@DATASET:[fieldname]@@. e.g template dataset: “SELECT * FROM {user} WHERE id = 37;”template body: User 37’s first name is <b>@@DATASET:firstname@@</b>, don’t forget it. Whether one record or many are returned, if you specify a dataset then a @@DATASET@@ variable will be available to your template’s custom javascript. This will be an array of objects, each object representing one of the records that were returned. In the process of conversion from a PHP array of objects to an javascript array of objects, the order/index of the objects in the array appears to be modified, and so cannot be relied upon. The Template Dataset Variables. Template variables do not work in the template dataset. This is because the get_records_sql api has its own template system. The first parameter to the function is the SQL statement. When you place question marks in the SQL statement, i.e. ‘?’ , Moodle recognises that as a variable. Variable values are passed in the second parameter to the function. Moodle will swap out each question mark for one of the values passed in the second parameter. Generic uses this system and allows you to specify a comma separated list of variable values in the Template Dataset Variables field. You can specify Generico template variables here, which gives this a lot of power. Lets demonstrate this by rewriting the above example to return the currently logged in user’s information. template dataset: “SELECT * FROM {user} WHERE id = ?;”template dataset vars: @@USER:id@@template body: User @@USER:id@@’s first name is <b>@@DATASET:firstname@@</b>, don’t forget it. Actually this is trivial because we already have access to the currently logged in user’s information via the Generico @@USER:xx@@ variable. But it demonstrates how to pull a dataset from the database using Generico template variables. You can use @@USER:xx@@, @@COURSE:xx@@ or any of the preset variables, and in addition can use variables which you have defined yourself. Note that there are no ajax calls to get the data. When the filter is parsed the data will be fetched, and after that it will not be fetched again. NB A bug in Generico means that currently only the first of the set of variables specified in the Dataset variables is actually made available to the SQL statement in the Dataset section. Average of ratings: Useful (5) Re: Generico Showcase Super cool template! I have made a similar attempt (creating a course/user Dashboard) using the Configurable Reports block and a new filter I developed that only show the graph part of the report. and so I use it with a Poster activity (which display a page that includes several block regions) in which I placed several HTML blocks with different CR filters showing different CR reports graphs. Check it out the CR Filter: Average of ratings: Useful (1) Re: Generico Showcase Hi Justin and co I think i am getting the hang of this and here comes the but I am trying to set up a modal (bootstrap 2) using Generico as the insert but it leaves a "} in the generico variables code which throws everything out when } removed works fine and it won't let you add any pictures via the atto add picture do i have to insert them via img src? Theme im using is adaptable 3.1 alpha moodle Gary Average of ratings: - Re: Generico Showcase Gary It works perfectly for me. Though the button maybe should be at the bottom. Perhaps you are copying and pasting stuff in the Moodle HTML editor. That is deadly because invisible html rubbish like <span></span><p> gets stuck in there and breaks the filter string. But the template itself would be fine in that case. Average of ratings: Useful (1) Re: Generico Showcase Hi Justin I fixed the text part Just needed to add some p tags But i cant work out how to insert an image after the text using the file picker it loads in the editor but breaks when saved it just shows a broken image place holder Gary Average of ratings: - Re: Generico Showcase Are you inserting the image between the Generico tags. ie not in them, but between them. So {GENERICO:type=garymodal,text="blahblahblah"} -->image goes in here {GENERICO:type=garymodal_end} Average of ratings: - Re: Generico Showcase Hi All Here is another one of my attempts Its a modal which i use for 'did you know facts' it only takes text as i haven't figured out how to get the footer to stay at the bottom when a picture is inserted. but hey im sharing! It's better to install it than me explain but you can customise the modal button for background and text colour etc add a fontawesome on the button and control size with font size numbers. As i have said before im on my css etc learning journey so it might be abit brutal in the coding style but it works Gary Average of ratings: - Re: Generico Showcase Hi Justin / Everyone I hope you are well I'm still having a problem inserting an image into a modal i cant fix the issue you have on your example of the button positioning before the image i have tried evrything in my limited knowledge to change the position. As i use your filter to simplify actions for my team who will add images via the image picker in the atto editor. Help would be gratefully recieved. Gary Average of ratings: - Re: Generico Showcase Sorry Gary. I can't be much help right now. Average of ratings: - Re: Generico Showcase Hi Justin No problem hope your not too busy and stressed i did solve it i will post the new one when im back in the office. i found that i had put my div tags in the wrong place Gary Average of ratings: - Re: Generico Showcase Hi, awesome set of plugins, great work! I'm just starting to fiddle with it now. Took me an embarrassingly long time to figure out i needed accordion items in the accordion! Could this be used for a jquery tour type scenario? eg http://bootstraptour.com/ or http://foundation.zurb.com/sites/docs/v/5.5.3/components/joyride.html - i'm not sure how you'd (or if it's wise to) pull in the extra scripts required (perhaps they aren't with the bootstrap one)? Cheers - sorry if this is not the forum for questions like this. Average of ratings: - Re: Generico Showcase Intro.js Template This gives a little tour of the page and how to use it. See introjs.com for details. You need to tell Generico what the various steps are. You do that by putting an html table in between the generico tags. A bit like this ========================= {GENERICO:type="introjs"} col1 col2 col3 .flowplayer watch this video top .qcontainer answer these questions top {GENERICO:type="introjs_end"} ========================= Ignore the the first row(TH) but on each subsequent row (TR) define a step of the tour. Col1 = the css selector e.g .myclass or #myid, Col2 the text to display Col3 the position of the text . Positions can be any of: top,left,right,bottom,bottom-left-aligned,bottom-middle-aligned,bottom-right-aligned More details on intro.js here https://github.com/usablica/intro.js/wiki/Documentation Average of ratings: Useful (2) Re: Generico Showcase No worries, looks good, but i'm getting the same issue with pulling in the js via cdn, comes up with errors (a result is that it makes the editing docks buttons inactive) - same happens in clean. Thanks either way - possibly just my environment then... Average of ratings: - Re: Generico Showcase The other day, in another forum, someone asked about how to use Templates with the TinyMCE editor so they could have something like a school stationary heading available when opening the editor to add text. It is doable, but takes multiple steps and requires some modifications to Moodle files. Generico templates work GREAT for doing the same job in the Atto editor. All you need to do is create your boiler plate text in any HTML editor and get it to looking like you want it using whatever font, size and color, then copy the HTML and paste into one of the Generico templates. I use KompoZer, and when finished with formatting, switch to HTML Source view, copy everything between the body tags, and paste into a text box for, The body of template x, then add a name in The display name for the template x. So simple, but can save a lot of typing. I hate to think how many times I have typed out nearly identical instructions in dozens and dozens of assignments and other Moodle activities. Something like a school address at the top of a page doesn't even need any variables, whereas assignment directions might. This also works great the the just released PoodLL3 Filter and the Atto PoodLL3 Widget tool. Average of ratings: - Re: Generico Showcase I tried to install assign_countdown. When I ran it, all I have is red squares where the numbers should be. I am running this on my home system and we did not set up chron. Is that the problem? Average of ratings: - Re: Generico Showcase How old is this Generico? I see that the first post here is about 9 months old and this seems to be the only place it is discussed. Is there a repository/descriptions for these presets? How do I find out what is out there aside from stumbling onto a thread with an attachment? Average of ratings: - Re: Generico Showcase Hi Carol, The Generico filter was released more than two years ago and includes around 19 presets you can setup and use immediately. This forum and a couple of others are where a number of other presets have been posted for anyone to use. https://moodle.org/mod/forum/discuss.php?d=324771 https://moodle.org/mod/forum/discuss.php?d=261896 Right at the moment, stumbling onto threads is one way and of course, just type Generico in the forum search box. Average of ratings: - Re: Generico Showcase I picked up a copy of assign_countdown and coded the ????? out of it. I would like to know who wrote the original so I can include credit because I would not have been able to enhance it otherwise. I am still not sure if this is the proper procedure but it was fun and a serious learning experience. It certainly boosted by Javascript coding skills. It is attached here. My goal was to adapt it so that it would not argue with other presets when multiples of them were placed on the course page. Right now I have 17 of them announcing the due dates for weekly assignments. I believe they all run independently. I would appreciate your feedback and performance check results. I am always open to suggestions. You are gonna love the flourishes. Average of ratings: - Re: Generico Showcase Hi Steve, Somewhere about the ninth entry in this forum, Andy Chaplin submitted the very first version of of the countdown timer, in which you had to enter the title and message, then manually enter the month, day, year and time to countdown to. A few entries later I wondered if it could automatically count down to an assignment date. Justin Hunt almost immediately modified the Generico filter by adding two more database fields, dataset and datasetvars, to make that possible. Average of ratings: - Re: Generico Showcase Either it is a bit like making stone soup... or I stand on the shoulders of giants... (: Average of ratings: - Re: Generico Showcase I like the stone soup analogy. Hmmm....reminds me I'm two hours late for lunch. Here is a possible pebble to add. In your 05 version, could it be that the word "exists" is missing from the first Instruction sentence? Average of ratings: - Re: Generico Showcase Sometime "exists" existed, other times it did not. When I made enough mistakes I had to go back to an earlier version. In the final version, "exists" did not... When I get my Moodle back, I will take care of it. Average of ratings: - Re: Generico Showcase Maybe you can answer a few questions about these presets in general. As you can see, the length of variables to fill is rather lengthy. On my system, I cannot move that list to bring it above the bottom border of my screen. In order to get to the submit button I have to use <ctrl> Mouse wheel to shrink the image. Can the list be made to show the variables in two columns? What might prevent the list from being moveable by using the mouse? Maybe these act differently on your system. Average of ratings: - Re: Generico Showcase What monitor resolution do you have? Can you try moving the list while using another theme? I ask because when I use your version of countdown, I have a bar across the top, which says "Enter Preferences" with a close button, and I can grab the bar and move it with the mouse, no problem. Average of ratings: - Re: Generico Showcase I don't think that monitor matters. For me, I have that bar at the top too but I cannot drag it more than 1/8". I have never seen that before. I do see that when I choose templates, they are side by side depending on the length of the name of the template. Maybe this can be applied to the setting of preferences. I would also like to know how to change the order of the preference text boxes. I thought it would have been in the settings test box in the template but maybe it is in the order in which they are used by the code. I cannot check that until I get my server working again. Life is tough when you can't Moodle.... Average of ratings: - Re: Generico Showcase Hmmm...Something must be wrong somewhere as I can move mine all over the place. I'm not sure about the order and haven't tried testing it. Been working on something else. I have a countdown timer for both lessons and quizzes and when I started to update them to use the @@AUTOID@@ entries in multiple places like we've begun to use for the assignment countdown, I had an idea about trying to make a universal countdown timer. After all, the ONLY difference between each one is the table and field name used in the SQL. It has been a head scratching two days of frustration. Again, I'm over two hours late for lunch. Think I'll quite for the day and do some yard work. Average of ratings: - Re: Generico Showcase Nope, scarcely a nudge when I try. I did not think to use a different browser. It was Firefox, what was your's? Both in one. I wonder the benefit. I guess you can enter the date manually and suit both templates or are you going to create a switch. You have me thinking, if you set up the assign_countdown and save it, then change the due date of the assignment, is the template updated or at the original setting. I believe it is a new look up every time it is invoked. I remain Moodleless so I cannot test it. Average of ratings: - Re: Generico Showcase Ok, just found about this generic plugin wayyy to late. I've been wanting something that makes the close date for quizzes really noticeable for my students. The default close date for quizzes is way too small. So I took Steve's awesome bundle and converted it for quizzes. I allow students many attempts on quizzes until a certain date. Average of ratings: - Re: Generico Showcase Here is my latest and greatest version of the countdown preset file. My intention was to have it run in the Course page and not interfere with other instances of countdown and uses of assign_countdown. I have not added the color choice yet but when my Moodle is restored, I will continue. I would appreciate your testing it to see if there are any arguments with any other template on the course page. Average of ratings: - Re: Generico Showcase Ok, so I finally rebuilt my server and am once again reinstalling the TOPCOL, Generico and edit_dates. Unfortunate there does not be any indication into tell me in which folder they belong. Is there a magic secret location to find out this special instruction? I am quite sure that Generico belongs in filters but is it really just a guessing game? Average of ratings: - Re: Generico Showcase No magic involved, just reading: Average of ratings: - Re: Generico Showcase Ach, I wonder how I missed that. I guess I am still not used to the terminology. I will add this to my pathfinder. Thanks. Average of ratings: - Re: Generico Showcase Ok, my home Moodle is back online again and no more 30 - 60 second delays either (Yeaaa!) A few weeks ago I picked up two filters from here in this forum and added my own flourishes. I finished them just this morning and believe they are effectively done. "effectively" because there will always be suggestions on how to improve them. You will need to have Site Administration rights to install these but any instructor can use them. The Countdown_A-04 preset will accept a date/time and start counting down the days, hours, minutes and seconds to that date/time. It has default Title, message1 and message2, and a preset light color and dark color but you have the option to change any of them. The assign_countdown_A-04 preset has the same Title, message1, message2 lines and the color presets that you can change but the time/date settings are pulled from the due date set in a resource and will automatically update if you change the assignment time/date. I plan to forward these for use in the University Moodle but would like to have them stress tested before I do. Please see if you can make them misbehave and send in your results whether or not they perform as designed. I have also designed a pathfinder in case you are not familiar with Generico Filters. Same here too, please let me know how well this worked (or not) for you. Average of ratings: Useful (1) Re: Generico Showcase BTW: I am using 3.1to modify the assign_countdown_A-04 and Countdown_A-04 presets and believe that they are not version dependent but I would like to know if this is true. Average of ratings: - Re: Generico Showcase Hi Steve, I was just looking at your Countdown_A-04.txt filter and it appears that there a number of problems with it. The instructions appear to be for an activity, but this is a general purpose countdown timer. It appears that you have left @@module_id@@ in the Dataset Variables text area so it still gets asked for when inserting the Filter somewhere. You have also left the assignment duedate sql in the Dataset text area, even though this is a general purpose countdown instead an assignment countdown. The actual script for the clock should be in the Custom JS text area, but is tacked on to the end of your code in the body of the template text area. Also, the third line from the end of the code in the body template, var deadline = '@@Month@@ @@Day@@ @@Year@@ @@Time@@ UTC+100'; is hard coding the time to GMT plus one hour (mainland Europe) so it is never going to be a correct countdown time for me here in US Central time. I had to change it to var deadline = '@@Month@@ @@Day@@ @@Year@@ @@Time@@ UTC-500'; to get the right countdown time. Yesterday, my service provider change my home IP and so far, I only have three, (all Moodle 3.1), sites back up and running. When I get the others up later today, I will check to see if Moodle versions make a difference to your templates. I doubt it will. I would imagine the only thing that would make a difference would be the Generico version. Average of ratings: - Re: Generico Showcase You are correct on all accounts. Had I understood the use of the UTC+100, I would have changed it. The instructions and use of @@module_id@@ is a result of using a copy, and modifcation, of the assign_countdown and I neglected to compensate for it being general purpose. I did question it but neglected to act on it. I believe the original countdown timer had all of the code in that one location. The assign_countdown has it divided into the two areas. I prefer the divided style but it seemed to fail when I tried to get the countdown to work with the divided. I musta mist sumpin.... I was concentrating much more on segregating multiple copies from each other. Thanks for the review. Right now I am working on a simplified technique to isolate each of the templates from each other. The Wikipedia directions to do so are concise enough that I have to read them over and over again to get the gist of it. Very few statements but very concentrated in concept. Right now, I have gone back to the original version of countdown and am working to "... avoid variable hoisting from within blocks [and] protect against polluting the global environment ..." (Wikipedia). If I can get two of them to work independently in the main course page then I will apply the fix to other templates. Average of ratings: - Re: Generico Showcase The actual script for the clock should be in the Custom JS text area, but is tacked on to the end of your code in the body of the template text area. When I move the JS into the Custom JS test area the preset fails. (With or without the <script> tag.) What is happening. Average of ratings: - Re: Generico Showcase The assign_countdown_A-04 preset has the same Title, message1, message2 lines and the color presets that you can change but the time/date settings are pulled from the due date set in a resource and will automatically update if you change the assignment time/date. Will the assignment countdown work on a quiz intro page? I give students multiple attempts on a quiz until they get the score they want. Often they forget to see the tiny due date at the bottom. Average of ratings: - Re: Generico Showcase Sorry, no, the assign_countdown_A_04 only works with assignments due to the sql in the dataset of the template specifically pulling info from the assign table of the Moodle database. Average of ratings: - Re: Generico Showcase Working on another preset file. assign_countdown uses duedate ID from the assignment code. I used inspect elements to see that allowsubmissionsdate is the ID used to see the date set to allow submissions. I replaced three IDs of duedate with allowsubmissionsdate (two in the getTimeRemaining function and one in the Dataset Select statement) but it did not work. Is there some thing else I should be doing? Average of ratings: - Re: Generico Showcase Here is my kludge for the Countdown preset. Please let me know if the link doesn't work. It is packed with @@AUTOID@@ tags. I had hoped that there would be a more eleganter way to do this like setting the variables and functions to local from global but at least this one seems to work. You should be able to place these both in the assignment and the main page using a label. You can even load two into the description box in an assignment and they will work independently of each other. Of course two or more will work on the course page. Its purpose if to count down to a given time/date. It is presently preset to mark the beginning of 2017. I have it on my web site in case I have to make a change you will get the latest and greatest. If I continue to post them here, then a trail of expired versions will be left for unwary seekers of Generico filter presets. Average of ratings: - Re: Generico Showcase ##### Creating a Block with Links to User's Social Media Hi all I put together the following filter so that students (and probably teachers too!) could easily access their own social media accounts. The filter requires a bit of other work on the site namely the creation of custom user profile fields. I created a category "Social Media" and then created each of the links. In the filter the code looks for the fields twitter, facebook, linkedin, gplus and ytube. If you use different field names, you will need to change that in the code accordingly. Also you need to put the path to the location of each icon. The idea behind the filter is to give learners easier access to their PLNs and also to provide direct access to make sharing content to Moodle forums easier. Hope you find it useful, and if you find any bugs or can improve it, I'd be happy to hear from you. All the best Andy Average of ratings: Useful (1) Re: Generico Showcase Hi All Can some one help me? I am trying to get this modal to work I had my previous modal working fine but unfortunately some one has made a mess!! i have lost my working copy an one of my team has done a server clean up whist i was away I can get it to display my pictures it is showing broken image link with either upload or drag drop. I would really appreciate help guys. Gary Average of ratings: - Re: Generico Showcase Thanks Andy. Is it possible to add Skype id here? Average of ratings: - Re: Generico Showcase Wow--Generico is pretty amazing! Thank you Justin for sharing this with the world! Question for the community: Anyone know if Generico could embed a "live" Google Doc on a page or assignment? That would a cool way for teachers to distribute "live" documents or collect assignments that could be annotated, revised, etc. Thanks! Average of ratings: - Re: Generico Showcase Does this template/bundle attached, do you what you want? Average of ratings: - Re: Generico Showcase Does this template/bundle attached, do you what you want? Average of ratings: Useful (1) Re: Generico Showcase Hi Justin: A big "THANK YOU!"--it worked! Also figured out that if you share a document so that others can comment / edit, you can use Generico to embed a "live" document! Just need to figure out how get Moodle to have a bigger page / window for the Generico filter to have more room for the iframe embed.....but it works! Thank you! Average of ratings: Useful (1) Re: Generico Showcase Hi Joseph, one option would be to put the document in a large modal which is either triggered by a button or a link. That looks quite neat, and doesn't take up so much space on the course page. All the best, Andy Average of ratings: - Re: Generico Showcase Thanks everyone for sharing your templates for Generico....the Google Docs embed, cool video backgrounds, and new course formats are AMAZING!!!! These will really help teachers make cool stuff for their students.... Question for the amazing Generico community: Anyone know how to make template for Google Docs that will help teachers "force a copy" to distribute a Google Doc to their students (e.g. a writing / discussion prompt, or a graphic organizer for notes)? Here's how you manually do it in Google Docs: Need to do my homework and study how the templates work in order to help figure out how to develop new Generico templates.... Thanks! Average of ratings: - Re: Generico Showcase Hi Justin, I create googledoc template using the code in your attachment but unfortunately it doesn't work. Maybe I don't fully understand the code. Can I get I right? - key: googledoc - Instructions: From the file menu on Google Docs, choose "Publish to Web". Follow the process until you get a link that you can copy. - requirecss, requirejs, shim: defaults = empty - variable defaults: link=paste-link-here,width=1000,height=800 - body: <iframe src=\"@@link@@?embedded=true\" width=\"@@width@@\" height=\"@@height@@\"></iframe> - "bodyend":"","script":"","style":"","dataset":"","datasetvars" - I don't undstand what is this line used for? + Do I miss anything? Thanks in advance, Average of ratings: - Re: Generico Showcase Oh, I understood. Just upload googledoc.txt to presets folder. But it still doesn't work. Is somebody kind enough to help me out? Average of ratings: - Re: Generico Showcase It works "out of the box" for me. You shouldn't need to upload it to any folder. You just need to drag and drop the googledoc.txt into the "bundle" area in the administration/plugins/filters/Generico/empty template Vernon Average of ratings: - Re: Generico Showcase I get an error message on some of my dev sites about "framing". So I put it in a URL and it worked fine. V Average of ratings: - Re: Generico Showcase Thanks Vernon, I fully understand now. My googledoc looks different because I get the link; https://docs.google.com/document/d/11KXvAcG4iUu4ku0IiLf0sVT0bWbe2yGwxZxKHaJcHPI/pub instead of https://docs.google.com/document/d/11KXvAcG4iUu4ku0IiLf0sVT0bWbe2yGwxZxKHaJcHPI/edit By the way, Happy New Year Kind regards, Phoenix, Average of ratings: - Re: Generico Showcase Hi Guys, love this space, huge fan of Generico. Thought I'd share some of the new video uses for Generico I've been working on. To be clear, it's not my code. I've just modded it for Generico. I've included the source links in the explanation part of the bundle. As you can also see in the right screengrab.. I've already benefited from the largesse displayed in this forum in the countdown timer. Cheers, Vernon Live (Youtube) Space Station Feed With Text overlay Looped hosted video background Average of ratings: Useful (2) Re: Generico Showcase OMG! That is just sooooo cool! I've just tested it on my site and it works like a dream using Moodle 3.1 and the Morecandy theme. Just for clarity, I would add that you only need the last bit of the youtube link, not the whole embed code. One issue it will cause though is the need to think carefully about colours, you need a video that's very consistent in tone or some elements are going to be hard to see at times. Also the movement needs to be slow (even the NASA example could be a bit slower). But this really does create some very interesting options. Thanks you so much for sharing it! All the best, Andy Average of ratings: - Re: Generico Showcase The video background looks AMAZING! Do you mind sharing how you got the YouTube link to work? I tried different versions of the embed code and wasn't having any luck.... Thank you for sharing great ideas for using the Generico filters to help make our courses more engaging for students! Cheers, --Joe Average of ratings: - Re: Generico Showcase This was the old code below but that live stream is no longer available. Just add SF7FUU7CThs to the code below. It's working for me now. The lesson to take home here is that we cant always rely on a feed... Even Nasa Hope this helps, Vernon ISS placeholder {GENERICO:type="Youtube_Page_background",embedcode="UGPuEDyAsU8",Video Title="A Live feed from the ISS",video intro text="Beautiful and atmospheric music set to one of the most awesome views available to humanity.",source or attribution info="Original source code in the Generico module"} Average of ratings: Useful (1) Re: Generico Showcase Anyway to get the video to start off muted? Average of ratings: - Re: Generico Showcase Haven't tried it but supposedly, in the body of the template, if you add volume="0" right after allowfullscreen, that should do it. Average of ratings: - Re: Generico Showcase Haven't tried it but supposedly, in the body of the template, if you add volume="0" right after allowfullscreen, that should do it. No, there is no volume parameter for youtube embed. You can only do that with javascript. I'm trying to get this script to work: Average of ratings: - Re: Generico Showcase Yeah...doesn't work. While waiting on something else, I gave it a quick try and found that to be true. I have located an example of another way to do it that might help you out. https://www.labnol.org/internet/embed-mute-youtube-video/29149/ I made a page resource in my dev site, added the code from that page to the "Page content" area while in HTML mode, replaced YOUR_VIDEO_ID with a YouTube video ID and it works. Just need to adapt it for a Generico filter. Average of ratings: Useful (1) Re: Generico Showcase Yeah...doesn't work. While waiting on something else, I gave it a quick try and found that to be true. Pretty much all of the solutions for muting a background youtube video require the YT Libary which I can not figure out how to get it to play with Generico well. It's something to do with shims and AMD and I've tried everything I could. I get YTPlayer not defined error messages even if I link to the youtube library javascript. YouTube is blocked at my school anyway, so I just convert the youtube to MP4 (There are dozens of sites that will do this for you) and then host the mp4 on my webserver. (I annoyingly found that dropbox and google drive no longer support hot-linking) So I decided to rely on the VIDEO tag which works with MP4. The video tag has awesome attributes that control looping, muting, autoplay etc. It also supports streaming. This bundle allows to mute and pause the video. It's pretty easy to customize, and you can remove the control box below if you want. I've attached the bundle below. It should work right out of the box. Average of ratings: Useful (1) Re: Generico Showcase In another forum I just ran across some youtube settings that removes the player controls except for a play button, the border, full screen capability, and does NOT show related videos at the end. The only thing remaining is the YouTube watermark that works like it always has. I added the settings to the youtube filter bundle that is attached, and they work as expected. Average of ratings: - Re: Generico Showcase Here is a tooltip bundle for Generico or PoodLL. The text on the page looks like this: {GENERICO:type="tooltip",TIP="I am hovering hovering ooo",TEXT="link"} And it looks like this when its in action .. Average of ratings: Useful (1) Re: Generico Showcase Some of the templates coming through recently, like Vernon's YouTube background player, have been really interesting. The lack of a really good place to share these templates, and provide screenshots, instructions etc has bothered me for a while. I did have a few attempts at putting something together. But never got very far. David Mudrak suggested we set it up on the good ol' Moodle plugins database. Andy Chaplin and I had a talk about it and agreed that is in fact the best option. So we made a tracker issue to get a category for Generico/VideoEasy/PoodLL templates on the plugins database. Its here if you wish to watch/vote for or read it. Average of ratings: Useful (2) Re: Generico Showcase Hi everyone.This is Tiledtothemax1 The view shows the mobile and the full-view on my sample course. This is a rehash of one I made and used a couple of years ago. Inherits the courseid. You might need to change/delete some of the section numbers depending on the naming conventions and number of sections you use. I made this because the original tile course format(two years ago?) was loading all the resources from the entire course ~ about a 26 second DOMContentLoaded time. The one with full sample content does around 1.5 to 2 seconds. Correct image selection and sizing helps too. I use it with: Essential theme Onetopic course format. Hope it's usefull, Vernon 1 Average of ratings: Useful (1) Re: Generico Showcase Hi All! I've put together a filter which is based on Vernon's video background. The idea for this was to create individual backgrounds for different courses, so that different departments could have their own images underlaying their courses, or course creators can use different images for different topics - in my case, I'll be using business images behind my commercial courses, school images for teachers, catering images for catering English courses and so on. Some templates allow background images, but as far as I know, none of them allow you to change it according to the course. I think this not only helps with design, it is also a subtle orienteering point for learners. The screenshot shows an example using the Morecandy theme and the Grid course format. I've also tested it with Grid using More and Clean. It will probably look best with a fairly neutral background image. Here I took an image and placed it on a white background and set the transparency of the image to 80%. You just add the filter to the course introduction section. Hope you find it useful, or can use it as a springboard for your own ideas. All the best, Andy Average of ratings: Useful (2) Re: Generico Showcase (Thrust :) ) Hi All, With the release of the Moodle 3.2 and the "Boost" theme/format I thought I'd share my humble offering, 'Thrust". Below I present my version of a side navigation theme being the sincerest form of flattery (A ripoff of the "Boost" theme). It's a simple setup using the site/theme colors, css etc so it's quite robust. I've taken screenshots of the different sizing for mobiles. I've also added the 'tiled to the max' bundle I uploaded earlier because that's what I used in these shots. Hope this is useful. Kind Regards, Vernon Average of ratings: - Re: Generico Showcase (Thrust :) ) Boy thats really good Vernon. I am looking forward to getting a repository of these items together so that we can really make them available to people to use easily. Everyone has been pretty busy in Perth I think getting 3.2 out the door, but hopefully soon. Average of ratings: - Re: Generico Showcase (Thrust :) ) Thanks Justin, I've been following the chat about the repo. I'd love to see it included in the plugins DB as the Generico tool itself is very powerful and can duplicate the capabilities of exiting plugins. I feel that people seeing examples of it's capabilities as they search would be a great way to get more people to know about it. Still trying to get my head around the advanced capabilities.. Would love to learn more about the use of sql and datasets. You going to Moodlemoot au next year? Cheers again, V Average of ratings: - Re: Generico Showcase (Thrust :) ) Hi Vernon I intend to go to Moot in AU next year if things work out. Its a patchy way to get the message out to people though. So I would like to make a course on template creation next year. Average of ratings: Useful (1) Re: Generico Showcase (Ridden Away) Generico Bundle: RiddenAway (A tiled activity/resource) This is my latest bundle that I have created for Generico. I’ve named it “Ridden Away” in homage to the original tile adopter for Moodle (Julian Ridden). It automatically converts all activities and resources (except lables) to the tiles you see below. They are responsive and are great for all devices making the activities and resources easily accessible with a much larger clickable area. I've included a walkthrough video below. Used in the Essential theme with onetopic but I tested it with Clean/More/Elegance and with the normal Topics theme. The images are the standard moodle images that are located in the pix folder in the main www directory.. But I copied the -64 images and renamed them to -24 and changed the image size. This means that they display cleanly in high-res. Sample Course here: https://www.onlinetestingauthority.com/course/view.php?id=159&section=0 Average of ratings: Useful (4) Re: Generico Showcase (Ridden Away) Excellent - I created a course format that does the same thing - Julian's tiles live on! I am interested in this though as my css has been a little buggy and your responsiveness seems to work better than mine! Average of ratings: - Re: Generico Showcase (Ridden Away) I did see your posts/discussions yesterday. I can't claim much of this.. It's mostly Julian Ridden and Jason La Greca You'd be able to mod this easy enough into a site wide theme thing via the additional CSS areas of a lot of themes. There will be the odd conflict with different themes as I discovered with some sizing issues with the Elegance theme but they should be easy enough to overcome. HTH Vernon Average of ratings: - Re: Generico Showcase (Ridden Away) Vernon, this is great, and a nice succinct video. Two questions" 1. Does your bundle work OK with Moodle 3.2? 2. Also: I agree Onetopic is quite special. Does this work for 3.2? -Derek Average of ratings: - Re: Generico Showcase (Ridden Away) Hi Derek, Onetopic (made for 3.1) doesn't work in "boost" but works in the "clean" and "more" themes (included). Generico works fine but the bundle will need some tweaking depending on the theme. The bundle works in Boost but will need minor modifications to formatting(not unexpected). I'm still not sold on "Boost" but the "Thrust" bundle I did above works in "Clean" and "More". I'm nearly 100% sure the difference is the Bootstrap 4 code. I'll check it out when I get time. The "Riddenaway" bundle display brilliantly in "clean" and "more". Regards and a Merry New Year to all. Vernon Average of ratings: - Re: Generico Showcase (Ridden Away) Vernon, as a non-expert opinion, I think you are right: it is all about BS4. Just a quick post to describe my findings with Generico tabs plus Boost. When in a label, they have no 'tabbed' formattin, and they are vertical/stacked. This is how they appear: This is almost definitely due to Bootstrap 4. Damien has this to say: The examples on the bootstrap site without data-attributes all require triggering the behaviour with a chunk of javascript. Unless you call the javascript function somewhere you will get some of the styles but none of the extra functionality. (So it's easiest to stick to the data-attribute examples). https://moodle.org/mod/forum/discuss.php?d=344651#p1392645amien The problem seems to be the two different types of tab formatting (at least three) indicated on the Bootstrap site. eg http://v4-alpha.getbootstrap.com/components/navs/#using-data-attributes There is also a problem with labels if you use the date-attribute example Damien suggests. The tabs look OK in the editor, then when you save them, they fault. The faulting is complex: the tabs don't tab from one to the next, except sometimes the last tab works and then it flicks to the top of the page - or the bottom sometimes. I've given up for now, I plan to see if I can upgrade to 3.2.1 on our dev site, reinstall bunch of stuff and start again. Just listing this information here in case it is helpful. Re Boost: I'll if we can get some choice in the drawer: or at least reduce down to just the section titles, or get the section titles (ie the most used stuff) at the top. I actually think the one flat nav is an improvement. In Moodle 3.0 I use • a BS 3 based theme • plugin course menu for navigation (which is OK in Boost) • BS3 tabs in labels to solve the scroll of death problem (Broken in Boost, obviously) - and I have not got BS4 tabs working yet in Boost. Out of curiosity, why are you not liking Boost? I can see it is not properly set up for BS4 yet. And the drawer does have some detractors. I'm experimenting with Waxed and Fordson themes. -Derek Average of ratings: - Re: Generico Showcase (Ridden Away) I've got nothing against Boost really, I've barely looked at it but definitely plan to. Still getting the hang of the changes in the combination of the left NAV vs tabbed nav. As it is for me I'm very much a fan of the Essential theme(BS2) but love BS3 (From Julian's Elegance theme back in the day) but will have to get the hang of BS4 in due course.. Kind of looking forward to it. I'm off work soon so might have a bit of spare time between jobs to play V Average of ratings: - Re: Generico Showcase Thanks a lot for all the posts and contributed templates in the forum, esp. for Justin. I learned a lot here. I also created a template for the fancybox display of images in the page. Attached is the template. One problem I cannot solve is: you need to enter the url of the images, instead of insert the images. Screen shot for reference: If anyone can help solve this, it would be perfect. thanks. duan Average of ratings: - Re: Generico Showcase Thanks for this cool template. I modified it a bit, so you could just drop images into the editor between the Generico tags. This version of the template it will popup the fancybox images after clicking on a text link. Doing this with a thumbnail and a big picture is still possible. But it got a bit complicated trying to do that, so I decided to just leave it with the text link I admit I thought I fixing it up so that you could just insert images on the page was going to be a walk in the park. But because fancybox is a jquery plugin that is not AMD compatible, it was harder than I thought. The lightbox images, look just like lightbox images. On the page, in edit mode, it looks like this: Average of ratings: - Re: Generico Showcase Brand new to Generico! The potential is amazing. Would anyone happen to have an example of a bundle that shows a button with a Javascript modal dialog box that I could borrow and adapt? Just a simple button that calls a popup dialog box with confirm/cancel buttons and goes to @@url_var@@ if the user clicks Confirm, or closes the dialog box if the user clicks Cancel. I've been playing around with various simple dialog box javascripts that I am finding out there, but haven't been able to make any of them (or really any javascript!) work yet in Generico. If you're wondering why I'm wanting to use Generico for this, it's because I'm pulling the contents of a user field to add to the @@url_var@@ as a parameter. I've got the link working like a charm with a bundle that I based on Button-Maker, but I need to show a confirmation dialog box to the user before loading the URL. I'd greatly appreciate any tips! TIA, Genericoists! Average of ratings: - Re: Generico Showcase Happy easter ... I hope this helps Average of ratings: - Re: Generico Showcase Thank you SO much. Happy Easter to you as well! Average of ratings: - Re: Generico Showcase Thanks again for your advice and the succinct little dialog box template bundle (which helped clarify where to put all the elements). I tried it out and it works perfectly, except that the Generico vars that are being entered into the filter instance are not populating the URL the they do when it's a regular button and not part of a javascript. Body of template: <button id="@@AUTOID@@">@@caption@@</button> <div class="hide"> <div id="@@AUTOID@@_dialog" title="Registration Confirmation Required"> @@message@@ </div>​ </div> Variable defaults: url="https://[target]?userID=@@USER:email@@&courseID=@@courseID@@", courseID="0", caption="REGISTER NOW AND BEGIN COURSE", style="btn-primary", target="_top", message="Confirm registration and continue to course?" The [target] runs a script that registers the user in the courseID using an API, then redirects them to the course page to start the course .... basically, mimicking the self-enroll button, but we can use it anywhere on the site and reference the course by courseID. The intention is to allow people to enroll straight from the category level, which the self-enroll button can't do because it's not context-aware of which course it's "in", due to the fact that technically it's not in a course, it's (being presented in) a category. I know this is a problem that other people have grappled with. Generico is a perfect solution, but I would like to improve upon the self-enroll button by giving the user a confirmation step before they just get dropped right into the course. Custom JS:("#" + @@AUTOID@@ + "_dialog").dialog({
autoOpen: false,
modal: true,
buttons : {
"Confirm" : function() {
window.location.href = @@url@@;
},
"Cancel" : function() {
$(this).dialog("close"); } } });$("#"+ @@AUTOID@@).on("click", function(e) {
e.preventDefault();
debugger;
$("#" + @@AUTOID@@ + "_dialog").dialog("open"); }); Seems like it should work, and everything does, except for the construction of the @@URL@@ variable, which doesn't contain either of the variables it should (the USER:email native variable and the courseID variable). What's happening is that when the user clicks Confim, the script executes with the literal URL given in the defaults (url="[target URL]?userID=@@USER:email@@&courseID=@@courseID@@"). So it isn't enrolling the user, because it doesn't have the values of the variables where it should. Instead it has the variable names, just as in the url string shown above. The same URL works if called directly from a regular button like the one made with Button-Maker, just not from the javascript. What can I do differently to make sure that the @@url@@ referenced in the javascript gets populated with the variables? Are there mistakes I'm not seeing in the template above? Hope this makes sense. Thanks again for your timely intervention. May the Easter Bunny bless you with much very good dark chocolate. Average of ratings: - Re: Generico Showcase Yeah well ... here in Japan they don't do easter bunnies. Not even a flipping chocolate egg with buttons inside it. Hot cross buns ..forget it. So I do Generico at Easter. Its a pretty basic mistake. There is some documentation on Generico. Some things have changed a wee bit, but the fundamentals remain. https://docs.moodle.org/31/en/filter_generico The variable defaults should not contain variables (ie in @@ pairs). Because this is where we specify the default values for variables. So the part where you declared the url with user variables in the defaults, should actually be placed in the script. So take the url variable out of defaults and put it in script, something like this: var theurl = 'https://[target]?userID=' + @@USER:email@@ + '&courseID=' + @@courseID@@;$("#" + @@AUTOID@@ + "_dialog").dialog({autoOpen: false,   modal: true,   buttons : {        "Confirm" : function() {            window.location.href = theurl;                  },        "Cancel" : function() {          \$(this).dialog("close");        }      }    });

Average of ratings: -