Code Monkey home page Code Monkey logo

moodle-filter_tabs's People

Contributors

abias avatar josepfs avatar kathrin84 avatar nadavkav avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moodle-filter_tabs's Issues

AMD module `init` called too many times

The init function of the AMD module is executed for each piece of text that is being passed through filters. This leads to a large number of redundant JavaScript calls, like this:

M.util.js_pending('filter_tabs/tabs'); require(['filter_tabs/tabs'], function(amd) {amd.init(); M.util.js_complete('filter_tabs/tabs');});;
M.util.js_pending('filter_tabs/tabs'); require(['filter_tabs/tabs'], function(amd) {amd.init(); M.util.js_complete('filter_tabs/tabs');});;
M.util.js_pending('filter_tabs/tabs'); require(['filter_tabs/tabs'], function(amd) {amd.init(); M.util.js_complete('filter_tabs/tabs');});;
M.util.js_pending('filter_tabs/tabs'); require(['filter_tabs/tabs'], function(amd) {amd.init(); M.util.js_complete('filter_tabs/tabs');});;
M.util.js_pending('filter_tabs/tabs'); require(['filter_tabs/tabs'], function(amd) {amd.init(); M.util.js_complete('filter_tabs/tabs');});;
M.util.js_pending('filter_tabs/tabs'); require(['filter_tabs/tabs'], function(amd) {amd.init(); M.util.js_complete('filter_tabs/tabs');});;
M.util.js_pending('filter_tabs/tabs'); require(['filter_tabs/tabs'], function(amd) {amd.init(); M.util.js_complete('filter_tabs/tabs');});;
M.util.js_pending('filter_tabs/tabs'); require(['filter_tabs/tabs'], function(amd) {amd.init(); M.util.js_complete('filter_tabs/tabs');});;
M.util.js_pending('filter_tabs/tabs'); require(['filter_tabs/tabs'], function(amd) {amd.init(); M.util.js_complete('filter_tabs/tabs');});;
M.util.js_pending('filter_tabs/tabs'); require(['filter_tabs/tabs'], function(amd) {amd.init(); M.util.js_complete('filter_tabs/tabs');});;
M.util.js_pending('filter_tabs/tabs'); require(['filter_tabs/tabs'], function(amd) {amd.init(); M.util.js_complete('filter_tabs/tabs');});;
M.util.js_pending('filter_tabs/tabs'); require(['filter_tabs/tabs'], function(amd) {amd.init(); M.util.js_complete('filter_tabs/tabs');});;

As documentated in the base filter class, the function setup of the filter must handle repeated calls:

    /**
     * Setup page with filter requirements and other prepare stuff.
     *
     * [...]
     *
     * Note this method is invoked from {@see setup_page_for_filters()}
     * for each piece of text being filtered, so it is responsible
     * for controlling its own execution cardinality.
     *
     * [...]
     */
    public function setup($page, $context) {}

However, filter_tabs does not:

    public function setup($page, $context) {
        $this->page = $page;
        $page->requires->js_call_amd('filter_tabs/tabs', 'init');
    }

It appears the solution is as simple as the following (copied from the Glossary filter):

    public function setup($page, $context) {
        if ($page->requires->should_create_one_time_item_now('filter_glossary_autolinker')) {
            // Code here.
        }
    }

Multiple tab sets combining

HI -
I've got a book page in Moodle with 3 sets of tabs, 2 tabs each. When I view the page all 6 tabs are combined into one set.

It was happening on the version downloaded from Moodle.org and also with the version pulled from GitHub just now. I did clear all caches between just in case that was an issue.

Any suggestions / thoughts?

Broken Content

In moodle 3.8 the new 4.0 version breaks the embedding of an iframe.

Going back to the old plugin version was the work-around.
But getting the new version correct would be nice

Bootstrap tabs interfere custom menu

Hi!

Bootstrap filter tabs do interfere the functionality of custom menus in Moodle 2.8 using the core "more" theme (no other themes installed). After enabling the boostrap tabs setting the submenu of a custom menu does not show up properly, e.g., submenu 1 is shown when clicking custom menu 2, submenu 2 is shown when clicking any other toplevel menu etc.

With standard filter YUI tabs (bootstrap tabs disabled) everything is fine albeit the nice bootstrap look is lacking.

Kind regards,
George

link to a tabbed page

Hi ,
I've made an anchor on a tabbed page but linking to the anchor refers to the tabs front page and not to the part of the page related to the specified tab.

Is there a way to link directly to the page section under a specific Tab?

Thanks

Willem

Bookmodule only prints the content on the first tab

Hi, We love the tab option to organise our content.
We use it a lot in the bookmodule.
We encounter a problem with the printing options of the bookmodule. When printing a page/chapter only the content of the tab shown is printed.
That's not a big problem, one just has to give a print order for every tab content which has to be printed. But with the "print whole bookmodule" option it is it is a real problem that only the tabs shown are printed
Could this be solved or is there a workaround?

Thanks very much for your help,

Willem

Performance issue with creating the random ID

The current random ID assignment uses an old, slow random function "rand". Also, the range is huge.
This caused the page to load without displaying the tabs.

I replaced line 76 in filter.php with:
$id = mt_rand(1000,9999);

Chances are that this will be random enough not to collide, but it is very fast and does not cause the page to fail when loading.

Thanks,
Roman

Display issue

Hello, when I open the course sometimes appears the window with all the tabs, while other times it remains white, without content.

Can you help me please?

Thank you, Paolo.

tabs content now showing atto markup

hi, i noticed when i updated to latest commit that markup in the tab content started appearing. atto tends to add

etc to the content and previously this was filtered out.
on mdl 3.9.13

cheers

phpunit failure with privacy provider

Hi, thanks for this plugin, just reporting this in case you weren't aware. cheers

mdl 3.9.x

10:11:16.409 3) provider_testcase::test_all_providers_compliant with data set "filter_tabs" ('filter_tabs', 'filter_tabs\privacy\provider')
10:11:16.409 Failed asserting that false is true.
10:11:16.409
10:11:16.409 /opt/data/go-agent/pipelines/Moodle/moodle/privacy/tests/provider_test.php:178
10:11:16.409 /opt/data/go-agent/pipelines/Moodle/moodle/lib/phpunit/classes/advanced_testcase.php:80
10:11:16.409

Raw html showing when using 2022050300 on Moodle 3.11.4+ 20211123

It came to my attention that we're experiencing an issue with the tabs plugin.
When using the familiar {%:XXX}...{%} construct to show tabs and text, the text is no longer formatted but it is displayed in raw html.
We are using Tabs version 2022050300 on Moodle 3.11.4+ 20211123
Can you advise a solution?

New version 4.0 is not showing HTML properly

The new version of plugin (4.0) after update is not showing HTML properly on moodle 3.11.5

tabs_html_error

I needed to use version "2022041302" to downgrade to previous version. Please don't use this number for fixed version 4.0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.