Prevent students editing a field in a database activity

Prevent students editing a field in a database activity

by Gordon McLeod -
Number of replies: 1

Hello,

I'm looking for a way to setup a database activity that students can complete several pieces of information (eg placement, dates, experience gained), which also includes a couple of fields for staff to show it has been reviewed and give comments.

Is there a way to restrict who can add content to a specific field based on their role within the course, or perhaps using css to set the field to hidden if blank so that only staff can see it if nothing has been added?

Thanks, Gordon.

Average of ratings: -
In reply to Gordon McLeod

Re: Prevent students editing a field in a database activity

by William Lu -
Picture of Particularly helpful Moodlers

Hi Gordon,

I don't know how to define a field with a role permission. You can try to ask Itamar in his forum Dataform. I know you are good at code, hope you can add this feature to Database module.

I used another database to record 'Staff only' information related to students' entries. Then, link the two databases together. For students, if they click on the 'Staff database only' link, they will see 'unavailable' message. You can find my examples in my Moodle cloud site . You can also find all of my presets in this forum, or in Moodle.net, or from the link in my profile.