onmotion / yii2-survey

Adds survey functionality to your Yii2 application
14 stars 20 forks source link

Add hidden and private surveys with access right checking #13

Closed hguenot closed 4 years ago

hguenot commented 5 years ago
onmotion commented 4 years ago

Hi!

What we do with the already user assignment existed feature (respondents.php)?

2019-09-23_13-41-34

hguenot commented 4 years ago

Hi,

On my understanding, anyone can vote on a survey. And in respondents.php, we can see who has voted and reset the vote status. When I click on the red trash, "respondent" disappear, and user can click on "done" again. Furthermore, there is no restriction anywhere in the code (I add it in this pull request).

My "private" flags is a restriction of who can vote... Maybe we can merge the two things in one... but I think the "respondent" view will be difficult to understand...

onmotion commented 4 years ago

Sounds reasonable. But what if will be added many users (fa 1000). Without pagination, it will slow down the page...

hguenot commented 4 years ago

Maybe we raise memory limit before :D Yes of course... I didn't make test load... I think if you need to add 1000 users, we need to think another way to restrict the poll (ie restrict to user with a specific access right or allows developer to "inject" their own users filtering class/method)

hguenot commented 4 years ago

But I will update to use same method as respondents.

onmotion commented 4 years ago

In my case, I do so: In the users GRID, a have checkboxes which can bulk assign the survey through modal image

image

And only these users can access to the survey.

hguenot commented 4 years ago

Hi, view / user selection adapted as discussed...

onmotion commented 4 years ago

Hi. Cool! I check it out tomorrow. Thank you!