General plugins

Looking for single page app plugin with customizable css AND js

 
Picture of Philippos Papadopoulos
Looking for single page app plugin with customizable css AND js
 

The use case is providing a very light-weight interactive resource (single page app) with customizable appearance and functionality (using css styling and javascript code). Can be used for simple games, interactive graphics etc.

The app has otherwise minimal integration with the moodle framework(*) and needs only minimal database access. In essence it only just serves three app specific html, css, and js files eg., from moodledata or from the db

Having been looking around to no avail so far. The Page activity does not seem to allow either css or js content. The revealjs plugin seems to be the closest to what I have in mind but it does not allow custom javascript and is focused on presentation style apps.

I suspect (or hope smile that this should not be at all hard to code if one was familiar with the current architecture and philosophy of moodle. Any pointers to previous discussions or a good starting point for would be appreciated

(*)To preempt the security discussion, the idea is that only admins/developers contribute to the js library





 
Average of ratings: -
Picture of Justin Hunt
Re: Looking for single page app plugin with customizable css AND js
Particularly helpful MoodlersPlugin developers

Philippos,

Have you looked at the Generico plugin? Its actually a filter, but it adds custom html / css / js to wherever it acts upon. So you can use in a regular page activity, to embed youtube, or add lightboxes etc. It can do basic database lookups. If you look at the Generico showcase thread, you can see some of what other people have made. 

Here are some links:

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

Generico Showcase Forum
https://moodle.org/mod/forum/discuss.php?d=324771

Some docs
https://docs.moodle.org/35/en/filter_generico


 
Average of ratings: Useful (1)
Picture of Philippos Papadopoulos
Re: Looking for single page app plugin with customizable css AND js
 

Hi Justin,

many thanks for the pointer, this looks promising (Not sure why it did not come up in search). Will try to port a representative app via the filter and hopefully report back here with a positive story!


 
Average of ratings: -
Picture of Philippos Papadopoulos
Re: Looking for single page app plugin with customizable css AND js
 

Generico worked out of the box for the first app I tried to port (Moodle 3.0 version). It is a periodic table type interactivity where the template involves a table and the custom js / css are grouped in single files. It displays as a popup to accommodate the required width.

A small glitch comes from the fact that styling elements inherit properties from the YUI library. Hence the css must be adapted to undo or fine-tune some of these choices (margins etc.)


Overall though it literally opens up an new window on how to customize Moodle smile

Many thanks!




The Periodic Table of Risk Elements

 
Average of ratings: -