Database with look up function only?

Database with look up function only?

by Robert T -
Number of replies: 1

Hello all,


Im interested in having a database where students are able to look up only one entry at a time given a unique key/code.


The database will have two fields - a numerical code and a picture. 


Ideally I want something where the student can only search for entries (not see them in a list or single view tab) and has to input the precise code to return one and only one entry.


Is this possible in Moodle?


thanks for looking!

Average of ratings: -
In reply to Robert T

Re: Database with look up function only?

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers
You can hide the “List” and “Single” view tabs using css. You can edit the “Search” template to only show the code field. You can tweak the permissions of that particular database activity to stop learners (and other roles if necessary) from adding entries. Would that work?

CSS (in the database CSS template) -

#region-main .nav-tabs li.nav-item:nth-child(1),
#region-main .nav-tabs li.nav-item:nth-child(2) {
display: none ;
}


Tweaking permissions -
Average of ratings: Useful (1)