Skip to content

Commit

Permalink
fixes for broken custom course fields and accordian/tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
justinhunt committed Dec 19, 2022
1 parent 89766de commit 16e491f
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Change List
=========
Version 1.4.17(Build 2022121900)
- Added non JQuery UI versions of tabs and accordians. Thanks @alexmorrisnz
- Fixed issue with custom course variables not being picked up if no courseid specified.
Now @@COURSE:customvariable@@ should resolve in templates.

Version 1.4.16(Build 2022082200)
- Added lightbox, Buncee, Flip, Wordwall, Quizlet templates

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion presets/accordian.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"key":"accordian","name":"accordian","instructions":"Between the accordian tags enter as many accordian item tags as you need","requirecss":"//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css","requirejs":"filter/generico/accordion.js","shim":"","defaults":"","amd":"1","body":"<div id=\"@@AUTOID@@\">","bodyend":"</div>","script":" $(function() {\n $( \"#\" + @@AUTOID@@).accordion({\n header: \"h3\",\n heightStyle: \"content\"\n })\n});","style":"","dataset":"","datasetvars":"","alternate":"","alternateend":"","version":"1.0.1"}
{"key":"accordian","name":"Accordian","instructions":"Between the accordian tags enter as many accordian item tags as you need","requirecss":"//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css","requirejs":"/filter/generico/fakejqueryui/accordion.js","shim":"","defaults":"","amd":"1","body":"<div id=\"@@AUTOID@@\">","bodyend":"</div>","script":"$( \"#\" + @@AUTOID@@).accordion({\n header: \"h3\",\n heightStyle: \"content\"\n });;","style":"","dataset":"","datasetvars":"","alternate":"","alternateend":"","version":"1.0.2"}
2 changes: 1 addition & 1 deletion presets/tabitem.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"key":"tabitem","name":"Tab Item","instructions":"Nest Generico tabitems in between Generico tabs, to produce a tabset. You can not put bullet points inside tabs.","requirecss":"","requirejs":"","shim":"","defaults":"title=\"my tab\"","amd":"1","body":"<div id=\"@@AUTOID@@\" class=\"filter_generico_tabitem\" title=\"@@title@@\">","bodyend":"</div>","script":"","style":"","dataset":"","datasetvars":"","alternate":"","alternateend":"","version":"1.0.1"}
{"key":"tabitem","name":"Tab Item","instructions":"Nest Generico tabitems in between Generico tabs, to produce a tabset. ","requirecss":"","requirejs":"","shim":"","defaults":"title=\"my tab\"","amd":"1","body":"<div id=\"@@AUTOID@@\" class=\"filter_generico_tabitem\" title=\"@@title@@\">","bodyend":"</div>","script":"","style":"","dataset":"","datasetvars":"","alternate":"","alternateend":"","version":"1.0.2"}
2 changes: 1 addition & 1 deletion presets/tabs.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"key":"tabs","name":"Tabs","instructions":"Tabs separate content by heading and are an efficient way to organize data and avoid lots of scrolling. Between the Generico tab tags nest as many Generico tabitem tags as you need. ","requirecss":"//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css","requirejs":"/filter/generico/tabs.js","shim":"","defaults":"","amd":"1","body":"<div id=\"@@AUTOID@@\">\n<div class=\"filter_generico_tabs_container\">\n<ul class=\"filter_generico_tabs\"></ul>","bodyend":"</div>\n</div>","script":"var theul = $(\"#\" + @@AUTOID@@ + \" ul.filter_generico_tabs\");\n//because users may copy/paste/massage the tab items, we get html junk\n//so move any span nested tab items to directly under tabs\n$(\".filter_generico_tabitem\", $(\"#\" + @@AUTOID@@)).each(function () {\n $(this).unwrap('span');\n});\n\n//create li items for each tab item, ignore the (important) ul element and remove html junk\n$(\"#\" + @@AUTOID@@ + \" .filter_generico_tabs_container\").children().each(function () {\n if($(this).is(\".filter_generico_tabitem\")){\n theul.append(\"<li><a href='#\" + this.id + \"'><span>\"+this.title+\"</span></a></li>\");\n //$(this).appendTo('#' + @@AUTOID@@); \n //end of if is tabitem\n}else if(!$(this).is('ul.filter_generico_tabs')){\n this.remove();\n}\n});\n\n//finally create the tabs\n$( \"#\" + @@AUTOID@@ + \" .filter_generico_tabs_container\").tabs();","style":"","dataset":"","datasetvars":"","alternate":"","alternateend":"","version":"1.0.3"}
{"key":"tabs","name":"Tabs","instructions":"Tabs separate content by heading and are an efficient way to organize data and avoid lots of scrolling. Between the Generico tab tags nest as many Generico tabitem tags as you need. ","requirecss":"//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css","requirejs":"/filter/generico/fakejqueryui/tabs.js","shim":"","defaults":"","amd":"1","body":"<div id=\"@@AUTOID@@\">\n<div class=\"filter_generico_tabs_container\">\n<ul class=\"filter_generico_tabs\"></ul>","bodyend":"</div>\n</div>","script":"var theul = $(\"#\" + @@AUTOID@@ + \" ul.filter_generico_tabs\");\n//because users may copy/paste/massage the tab items, we get html junk\n//so move any span nested tab items to directly under tabs\n$(\".filter_generico_tabitem\", $(\"#\" + @@AUTOID@@)).each(function () {\n $(this).unwrap('span');\n});\n\n//create li items for each tab item, ignore the (important) ul element and remove html junk\n$(\"#\" + @@AUTOID@@ + \" .filter_generico_tabs_container\").children().each(function () {\n if($(this).is(\".filter_generico_tabitem\")){\n theul.append(\"<li><a href='#\" + this.id + \"'><span>\"+this.title+\"</span></a></li>\");\n //$(this).appendTo('#' + @@AUTOID@@); \n //end of if is tabitem\n}else if(!$(this).is('ul.filter_generico_tabs')){\n this.remove();\n}\n});\n\n//finally create the tabs\n$( \"#\" + @@AUTOID@@ + \" .filter_generico_tabs_container\").tabs();","style":"","dataset":"","datasetvars":"","alternate":"","alternateend":"","version":"1.0.4"}
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2022082200; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2022121900; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2011070100; // Requires this Moodle version
$plugin->component = 'filter_generico'; // Full name of the plugin (used for diagnostics)
$plugin->maturity = MATURITY_STABLE;
$plugin->release = 'Version 1.4.16(Build 2022082200)';
$plugin->release = 'Version 1.4.17(Build 2022121900)';

0 comments on commit 16e491f

Please sign in to comment.