mirror of
https://github.com/wiosna-dev/limesurvey-api-client.git
synced 2026-03-12 02:11:45 +01:00
Compare commits
2 Commits
0.1.1
...
bugfix/UW-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8ffcafbd8 | ||
|
|
7551f6db95 |
@@ -39,6 +39,13 @@ abstract class BaseParticipant extends BaseItem
|
|||||||
*/
|
*/
|
||||||
protected $email;
|
protected $email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Token of the participant
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $token;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns ID of the participant
|
* Returns ID of the participant
|
||||||
*
|
*
|
||||||
@@ -78,4 +85,14 @@ abstract class BaseParticipant extends BaseItem
|
|||||||
{
|
{
|
||||||
return $this->email;
|
return $this->email;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns token of the participant
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getToken()
|
||||||
|
{
|
||||||
|
return $this->token;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,13 +42,6 @@ class Participant extends BaseParticipant
|
|||||||
*/
|
*/
|
||||||
private $emailStatus;
|
private $emailStatus;
|
||||||
|
|
||||||
/**
|
|
||||||
* Token of the participant
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
private $token;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Language of the participant
|
* Language of the participant
|
||||||
*
|
*
|
||||||
@@ -232,16 +225,6 @@ class Participant extends BaseParticipant
|
|||||||
return $this->emailStatus;
|
return $this->emailStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns token of the participant
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getToken()
|
|
||||||
{
|
|
||||||
return $this->token;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns language of the participant
|
* Returns language of the participant
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -28,6 +28,10 @@ class ParticipantShort extends BaseParticipant
|
|||||||
$this->id = (int)$value;
|
$this->id = (int)$value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'token':
|
||||||
|
$this->token = trim($value);
|
||||||
|
break;
|
||||||
|
|
||||||
case 'participant_info':
|
case 'participant_info':
|
||||||
$this->firstName = trim($value['firstname']);
|
$this->firstName = trim($value['firstname']);
|
||||||
$this->lastName = trim($value['lastname']);
|
$this->lastName = trim($value['lastname']);
|
||||||
@@ -52,6 +56,7 @@ class ParticipantShort extends BaseParticipant
|
|||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'tid' => $participant->getId(),
|
'tid' => $participant->getId(),
|
||||||
|
'token' => $participant->getToken(),
|
||||||
'participant_info' => $info,
|
'participant_info' => $info,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ class SurveyService
|
|||||||
*
|
*
|
||||||
* @throws CannotProcessDataException
|
* @throws CannotProcessDataException
|
||||||
*/
|
*/
|
||||||
public function getSurveyParticipants($surveyId, $onlyCompleted = false)
|
public function getSurveyParticipants($surveyId, $onlyCompleted = false, array $criteria = [])
|
||||||
{
|
{
|
||||||
$hasSurvey = $this
|
$hasSurvey = $this
|
||||||
->allParticipants
|
->allParticipants
|
||||||
@@ -244,6 +244,8 @@ class SurveyService
|
|||||||
$offset,
|
$offset,
|
||||||
$limit,
|
$limit,
|
||||||
$includeUnused,
|
$includeUnused,
|
||||||
|
$attributes = false,
|
||||||
|
$criteria
|
||||||
];
|
];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user