Removing search "clutter"

Removing search "clutter"

by Ben Tapscott -
Number of replies: 11

Hi everyone, does anyone have any ideas about the following problem which has left me scratching my head:

I would like to remove the search "clutter" from the View List in ,y database, but I don't know how to (here are two images to illustrate my problem: 

search clutter on view list


and also below:




I am using a preset with html code for the View List (the one from Moodle Buzz on this page https://moodle.org/mod/forum/discuss.php?d=84050)


Does anyone have any ideas? 

The html code has also forced the navigation bar to the bottom, has anyone experienced this problem too? 

I would be very grateful if you have any ideas. Thanks!

Average of ratings: -
In reply to Ben Tapscott

Re: Removing search "clutter"

by Ben Tapscott -

For anyone interested, I found the problem. I found a clue from this forum entry: 

https://moodle.org/mod/forum/discuss.php?d=252767

Where Helen Foster said 

"With the editor disabled you'll notice that that the repeated entry field contains table rows, and there is actually something in the footer! "

I looked at my view list template, and it was empty for some reason! I therefore copied this code from the preset (listtemplatefooter): </table><br /><br />

And now my database looks a lot better:



Basically the filter has been moed to the bottom (you can't see it here) and the "advanced search"doesn't appear (unless you do an advanced search, then it apears on View List. The navigation block is also in the right place. 

However, on "view single" the navigation block is still pushed to the bottom and is not next to the entry (as you can see) so that is the next problem to solve.



Well, I hope this helps someone one day! 

In reply to Ben Tapscott

Re: Removing search "clutter"

by William Lu -
Picture of Particularly helpful Moodlers
 (listtemplatefooter): </table><br /><br />

Should be:

</tbody>
</table>

only, not need for <br>s

In reply to Ben Tapscott

Re: Removing search "clutter"

by William Lu -
Picture of Particularly helpful Moodlers
Martin said here “When editing your template make sure your HTML editor is switched off too (the editor can't cope too well with partial tables)”  

The Buzz preset has some extra codes which you can't edit in Editor, if you do, then the code messed up and that makes your page "clutter".

Just start again with the preset. When you want to edit it, first things first is "Disable Editor'.

Or you can go to https://moodle.net/mod/data/view.php?id=3 to find other preset and try it. 

If it still has the same problem, try on other theme.

HTH

In reply to William Lu

Re: Removing search "clutter"

by Ben Tapscott -

Thank you William,

Yes I have disabled the editor. It mostly works well except for a few small problems. 

Just to be clear, is the buzz preset influenced by other code elsewhere (apart from that in the templates). For example does the following line in the View List template reference a class I can't see or does it only create a new one?

{<table width="80%" 

cellpadding="5" border="1" align="center" 

class="buzzdata generaltable">}

I also notice that there is very little CSS in the template. Have you experimented with adding anything in there for this template?

Personally I would like to hide the "SELECT ALL / DESELECT ALL / DELETE SELECTED / EXPORT TO PORTFOLIO" buttons AND the "Entries per page / search / sort by" using CSS but I am unsure how to do that...

Sorry, I'm a real newbie at all of this

In reply to Ben Tapscott

Re: Removing search "clutter"

by William Lu -
Picture of Particularly helpful Moodlers
Just to be clear, is the buzz preset influenced by other code elsewhere (apart from that in the templates). ......class="buzzdata generaltable">

Yes, every  Moodle page refers to a Style Sheet from your theme and default Moodle theme. the class="generaltable" is from your Moodle default style and can display the 'List view' beautifully.

 to hide the "SELECT ALL / DESELECT ALL / DELETE SELECTED / EXPORT TO PORTFOLIO" buttons

It is a very good feature of Database, add the :##delcheck## into the 'Vew list', then you can quickly delete many entries. It is only available to teacher, students can't see them. I suggest you use them rather than remove them. 

Export is a good feature too. Add ##export## into List view and Single View, then users can save entries to a pure clean HTML file. You must enable 'Export to portfolio' in site level first. If it is disabled, then the button won't show.

Check this for step by step guide: https://moodle.net/mod/data/view.php?d=1&rid=93


In reply to William Lu

Re: Removing search "clutter"

by Ben Tapscott -

Thank you again William, I am starting to make some progress now.

In fact, the users of my database will all have the "teacher" role (it is a database for teachers to upload resources!), but I fear that some will accidentally delete too many entries, so I have "prevented" "manage entries", which has removed those buttons, but I think this works for me as they seem to still be able to edit and delete their own entries.

The resources preset looks very interesting indeed, I will start investigating whether this is a better fit to my requirements. Did you come up with all of these presets yourself?


In reply to Ben Tapscott

Re: Removing search "clutter"

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Just because it is a database for teachers to upload resources doesn't mean they have to have the teacher role. (Sorry- I haven't read the rest of the thread so I apologise if this is out of context.)

In reply to Mary Cooch

Re: Removing search "clutter"

by Ben Tapscott -

Thanks Mary, I did think about that, yes.

In fact, I want them to have the teacher role so that they can add other sections on the course etc...

In reply to Ben Tapscott

Re: Removing search "clutter"

by William Lu -
Picture of Particularly helpful Moodlers

As Mary said, they should be 'student role' rather than 'teacher role', so they can only edit their own entries.

Even they are 'teacher role' in the course, you can overwrite their accessibilities in the Database activity:


Remove teacher from all 'Manage.....' 



Now, when teacher using the Database, they will see the same buttons and tabs as students can see.


In reply to Ben Tapscott

Re: Removing search "clutter"

by William Lu -
Picture of Particularly helpful Moodlers
I think this works for me as they seem to still be able to edit and delete their own entries.

You can change the database to 'read only', if you don't need them to edit their entries any more.

The Glossary module can be used to collect resources too, and can stop users to edit their own entries.


Did you come up with all of these presets yourself?

Yes, see live examples at: https://william.moodlecloud.com/

In reply to William Lu

Re: Removing search "clutter"

by Ben Tapscott -

Thank you for your very helpful advice William, I am sure my database will be how I want it to be soon.