Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: To filter the responses based on user group

To filter the responses based on user group 5 Monate 1 Woche 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 5 Monate 6 Tage her #107579

  • c_schmitz
  • c_schmitzs Avatar
  • ONLINE
  • LimeSurvey Team
  • Beiträge: 786
  • Dank erhalten: 113
  • Karma: 92
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 5 Monate 6 Tage 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 5 Monate 6 Tage her #107584

  • DenisChenu
  • DenisChenus Avatar
  • OFFLINE
  • Moderator Lime
  • Beiträge: 6338
  • Dank erhalten: 819
  • Karma: 243
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 5 Monate 6 Tage her #107620

Thank you!
Der Administrator hat öffentliche Schreibrechte deaktiviert.

To filter the responses based on user group 1 Monat 3 Wochen her #111364

  • dweisser
  • dweissers Avatar
  • OFFLINE
  • Bronze Donor
  • Beiträge: 204
  • Dank erhalten: 5
  • Karma: 5
I have a similar question. I am on page: application/views/admin/super/header.php.

I am able to get the user by: $tempuser= Yii::app()->session;
But I am not able to get the user group. I am only trying to return a string of the user's group. I tried the solution above, but the page breaks.

Any help would be much appreciated.
David
Letzte Änderung: 1 Monat 3 Wochen her von dweisser.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.235 Sekunden
Donation Image