Guest Users adding entries to database

Guest Users adding entries to database

by Mark Davies -
Number of replies: 9

Is it possible to setup a database and allow guest users to add and view entries for this database?

If so how do you do this?

Regards,

Mark

Average of ratings: -
In reply to Mark Davies

Re: Guest Users adding entries to database

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Mark,

It's possible to do so using Roles in Moodle 1.7 onwards, however the guest role is not normally allowed to enter text anywhere because of the risk of spam.
In reply to Helen Foster

Re: Guest Users adding entries to database

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Helen - I was recently working with a client that wanted to be able to allow guests to add entries to the database. I did not feel that the code supported or responded to the capability and permission overrides as intended. As such, I filed a bug MDL-19852 along with a patch. The patch code allows for guests to be able to add entries to the database and in addition to allow for the view entries to be prevented without disabling the view to the entire view.php page which provides a description of the database. I think the patch is more in line with how the permissions are intended to function. I would welcome any feedback on the tracker issue. One area where I think the database could be used in a business setting is as a customer interest database. If folks are interested in seeing this patch in core, please feel free to watch, comment, and/or vote on the issue. Peace - Anthony
In reply to Anthony Borrow

Re: Guest Users adding entries to database

by John Stinson -
i would like to apply this patch to my 1.9.5+ moodle install.

how do i do it?

thanks in advance,

john
In reply to John Stinson

Re: Guest Users adding entries to database

by David Bogner -
Picture of Core developers Picture of Plugin developers
Hi John,

you do not have to install this patch. You only have to overwrite the guest role and the authenticated user role, that they are able to write entries (update database->override permissions). Then every logged in user can add an entry.
If you want to have guest users without login to add an entry you will have to apply the patch.
Yours,
David
In reply to David Bogner

Re: Guest Users adding entries to database

by John Stinson -
I do want to have guest users without login be able to add entries. Just like you describe. How would I go about applying the patch?
In reply to John Stinson

Re: Guest Users adding entries to database

by David Bogner -
Picture of Core developers Picture of Plugin developers
Hi John,

applying patches is described in http://docs.moodle.org/en/Development:How_to_apply_a_patch
It depends if you are an windows or linux.


In linux just go to your moodle root folder, copy the patch to the moodle root folder and then type
patch -p1 < jsea_guests.patch

(you have to have patch installed and do this in a terminal window)

Regards,
David
In reply to David Bogner

Re: Guest Users adding entries to database

by Wande Shokunbi -

Then what you're saying is, guests (unauthenticated users) can't fill into a database without the patch being applied?

In reply to Helen Foster

Re: Guest Users adding entries to database

by Wande Shokunbi -

what particular role do I have to override?

In reply to Wande Shokunbi

Re: Guest Users adding entries to database

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

Hello there. As far as I am aware, guests cannot add entries to databases. Please see Guest role If you would like guests to add entries then perhaps you should make a new role "visitor" with very few permissions allowed, then create an account and assign it the role of visitor. Guests can then share this visitor account.