mirror of
https://github.com/wiosna-dev/limesurvey-api-client.git
synced 2026-03-12 10:11:49 +01:00
Compare commits
6 Commits
0.1.0
...
bugfix/UW-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8ffcafbd8 | ||
|
|
7551f6db95 | ||
|
|
a1e681b66e | ||
|
|
2c42a2165a | ||
|
|
058eb06d4d | ||
|
|
1389e78068 |
@@ -12,7 +12,7 @@
|
||||
"require": {
|
||||
"php": ">=5.6",
|
||||
"fguillot/json-rpc": "^1.2",
|
||||
"meritoo/common-library": "^0.1.0"
|
||||
"wiosna-dev/common-library": "^0.1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^2.6",
|
||||
|
||||
@@ -69,6 +69,7 @@ dir.tests = ${project.basedir}/tests
|
||||
dir.build = ${project.basedir}/build
|
||||
dir.reports = ${dir.build}/logs
|
||||
dir.reports.pdepend = ${dir.reports}/pdepend
|
||||
dir.reports.coverage = ${dir.reports}/phpunit_coverage
|
||||
|
||||
# Data directories
|
||||
#
|
||||
|
||||
@@ -39,6 +39,13 @@ abstract class BaseParticipant extends BaseItem
|
||||
*/
|
||||
protected $email;
|
||||
|
||||
/**
|
||||
* Token of the participant
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $token;
|
||||
|
||||
/**
|
||||
* Returns ID of the participant
|
||||
*
|
||||
@@ -78,4 +85,14 @@ abstract class BaseParticipant extends BaseItem
|
||||
{
|
||||
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;
|
||||
|
||||
/**
|
||||
* Token of the participant
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $token;
|
||||
|
||||
/**
|
||||
* Language of the participant
|
||||
*
|
||||
@@ -232,16 +225,6 @@ class Participant extends BaseParticipant
|
||||
return $this->emailStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns token of the participant
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getToken()
|
||||
{
|
||||
return $this->token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns language of the participant
|
||||
*
|
||||
|
||||
@@ -28,6 +28,10 @@ class ParticipantShort extends BaseParticipant
|
||||
$this->id = (int)$value;
|
||||
break;
|
||||
|
||||
case 'token':
|
||||
$this->token = trim($value);
|
||||
break;
|
||||
|
||||
case 'participant_info':
|
||||
$this->firstName = trim($value['firstname']);
|
||||
$this->lastName = trim($value['lastname']);
|
||||
@@ -52,6 +56,7 @@ class ParticipantShort extends BaseParticipant
|
||||
|
||||
$data = [
|
||||
'tid' => $participant->getId(),
|
||||
'token' => $participant->getToken(),
|
||||
'participant_info' => $info,
|
||||
];
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ class SurveyService
|
||||
*
|
||||
* @throws CannotProcessDataException
|
||||
*/
|
||||
public function getSurveyParticipants($surveyId, $onlyCompleted = false)
|
||||
public function getSurveyParticipants($surveyId, $onlyCompleted = false, array $criteria = [])
|
||||
{
|
||||
$hasSurvey = $this
|
||||
->allParticipants
|
||||
@@ -244,6 +244,8 @@ class SurveyService
|
||||
$offset,
|
||||
$limit,
|
||||
$includeUnused,
|
||||
$attributes = false,
|
||||
$criteria
|
||||
];
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user