Guest Users adding entries to database

Guest Users adding entries to database

Mark Davies -
回帖数: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

回复Mark Davies

Re: Guest Users adding entries to database

Helen Foster -
Core developers的头像 Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像 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.
回复Helen Foster

Re: Guest Users adding entries to database

Anthony Borrow -
Core developers的头像 Plugin developers的头像 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
回复Anthony Borrow

Re: Guest Users adding entries to database

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
回复John Stinson

Re: Guest Users adding entries to database

David Bogner -
Core developers的头像 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
回复David Bogner

Re: Guest Users adding entries to database

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?
回复John Stinson

Re: Guest Users adding entries to database

David Bogner -
Core developers的头像 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
回复David Bogner

Re: Guest Users adding entries to database

Wande Shokunbi -

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

回复Helen Foster

Re: Guest Users adding entries to database

Wande Shokunbi -

what particular role do I have to override?

回复Wande Shokunbi

Re: Guest Users adding entries to database

Mary Cooch -
Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Testers的头像 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.