Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: To filter the responses based on user group

To filter the responses based on user group 3 Monate 2 Wochen her #107560

I have a survey, that was filled from different departments of the company (sales, IT, HR, billling), is possible to allow every department manager to see only the answers that belongs to his department?
Thank you for all your hard job.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

To filter the responses based on user group 3 Monate 1 Woche her #107579

  • c_schmitz
  • c_schmitzs Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 746
  • Dank erhalten: 103
  • Karma: 87
Hello Omar,

I am sorry, but this is currently not possible :-(
Support us, too. Donate to the LimeSurvey project and help keep us going!
Der Administrator hat öffentliche Schreibrechte deaktiviert.

To filter the responses based on user group 3 Monate 1 Woche her #107580

Thank you.
I'm doing the php code modifications myself, but having issues getting the actual user group.
I'm on the page application\controllers\admin\responses.php and I'm able to get the userId by:
User::model()->findByPk(Yii::app()->session);
but can you please let me know how to get the usergroup?
Der Administrator hat öffentliche Schreibrechte deaktiviert.

To filter the responses based on user group 3 Monate 1 Woche her #107584

  • DenisChenu
  • DenisChenus Avatar
  • OFFLINE
  • Moderator Lime
  • Beiträge: 6222
  • Dank erhalten: 791
  • Karma: 238
Using Yii find all: or Yii find if you are sure user have only one group:
$oUserId= User::model()->findByPk(Yii::app()->session);
$oUserInGroup= UserInGroup::model()->find('uid= :uid',array(':uid'=>$oUserId->uid);
$oUserGroup=UserGroup::model()->find('ugid= :ugid',array(':ugid'=>$oUserInGroup->ugid);
Really bad solution, must use join here www.yiiframework.com/doc/api/1.1/CDbCommand#join%28%29
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: omarrodriguezt

To filter the responses based on user group 3 Monate 1 Woche her #107620

Thank you!
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.195 Sekunden
Donation Image