Read Onle Mode in Database Activity in Moodle 3.1

Read Onle Mode in Database Activity in Moodle 3.1

by Daniel Duenner -
Number of replies: 2
Hello everyone

I'm using a moodle database activity with my students and from today I would like to turn on the read only mode, so that the students have no longer the possibility to add or change their entries but are still allowed to see them or download files from it.
But when I set a date for the "read-only-mode from" in the settings, I still can add and change entries as a student.
I tried it with a new database and there it was working.
I personanlized the templates and rewrote the whole code. Is it possible that I have removed by accident an required item for that function?

Thanks for your help.



Average of ratings: -
In reply to Daniel Duenner

Re: Read Onle Mode in Database Activity in Moodle 3.1

by William Lu -
Picture of Particularly helpful Moodlers

Hi Daniel,

The read-only feature is new since Moodle2. It is quick and easy to setup.

I can only guess that the database which is giving you a problem might have been created long before 2X, then the new feature didn't take effect, just guess.

I used the following methods before 2X:

Option A:

If you think every student already submitted enough entries, then you can set 'Maximum number of entries=1'


Also, remove the ##edit##  and ##delete## tags from all template. Then, all existing entries will be Read-only, no one can add more entry.

If there are students who never add an entry yet, they will see the 'Add entry' tab. To be sure, set 'Approval required=Yes'


And remove ##approve## tag.


Option B: 


Edit Database permissions in THIS Database only: Select Student, 



Change 'Write entries' to 'Prevent'




Remember to remove the ##edit## and ##delete## tags from all templates too.


HTH

In reply to William Lu

Re: Read Onle Mode in Database Activity in Moodle 3.1

by Daniel Duenner -

Hi William

Thanks for your detailed answer.

As I changed a bit the rights for the students to manage the entries in the database, it might the the cause of it.

But I can't change the rights back of my own, so I have to try that out later.

Greetings