Hiding Tabs on Database Activity

Hiding Tabs on Database Activity

by Natalia Bezerra -
Number of replies: 6
Hi,

I would like to hide some of the tabs in the database activity ("View list", "Search"), is that possible?

Thank you,
Natalia
Average of ratings: -
In reply to Natalia Bezerra

Re: Hiding Tabs on Database Activity

by Itamar Tzadok -
Should be possible in various ways. On the client side as on per database basis you can add javascript to the database that accesses the relevant elements (li) and set their display to none so that the tabs are not displayed. Alternatively you can add javascript in the relevant templates that redirects the page to the view list and so while the tabs are still there they are in effect disabled. smile
Average of ratings: Useful (1)
In reply to Itamar Tzadok

Re: Hiding Tabs on Database Activity

by Roger Mepham -

Hi

I'm trying to hide the tabs at the top of the database entry screen as well, and I'm not sure of the javascript required. It would be fantastic if you could maybe jot down in a reply the specific code needed in the Javascript template to hide the List Tab and the Search tab

Many many thanks in advance of your kind help

Roger

In reply to Itamar Tzadok

Re: Hiding Tabs on Database Activity

by Aruna Dayanatha -

Hi Itamar,

 

Once you have hidden the tabs like that, How would you have access to the tabls.

 

 

In reply to Aruna Dayanatha

Re: Hiding Tabs on Database Activity

by Jaswant Tak -

Hi, 

Go to <moodle>\mod\data\tabs.php and comment the unwanted tab, which you dont want. for example (this will hide the List view tab)

//$row[] = new tabobject('list', $CFG->wwwroot.'/mod/data/view.php?d='.$data->id, get_string('list','data'));

Thanks

In reply to Jaswant Tak

Re: Hiding Tabs on Database Activity

by Roger Mepham -

Just came back to this thread with the same question as in 2009!

By adding this CSS to the CSS template the tabs can be hidden

.nav-tabs > li {
    visibility: collapse;
}

The you can add in links or buttons to the screens required (i.e. add entry, view list etc.) in the description text or the course page.

Roger

Average of ratings: Useful (1)