Do not fetch all participants of given survey to get information if participant has filled the survey

This commit is contained in:
Meritoo
2017-10-27 11:02:39 +02:00
parent cdbee2991c
commit fafb11633f
10 changed files with 429 additions and 343 deletions

View File

@@ -10,7 +10,7 @@ namespace Meritoo\LimeSurvey\ApiClient\Result\Item;
use DateTime;
use Meritoo\Common\Utilities\Date;
use Meritoo\LimeSurvey\ApiClient\Base\Result\BaseItem;
use Meritoo\LimeSurvey\ApiClient\Base\Result\BaseParticipant;
/**
* One item of the result/data: full data of one participant
@@ -18,17 +18,10 @@ use Meritoo\LimeSurvey\ApiClient\Base\Result\BaseItem;
* @author Krzysztof Niziol <krzysztof.niziol@meritoo.pl>
* @copyright Meritoo.pl
*/
class Participant extends BaseItem
class Participant extends BaseParticipant
{
const className = 'Meritoo\LimeSurvey\ApiClient\Result\Item\Participant';
/**
* ID of the participant
*
* @var int
*/
private $id;
/**
* Another ID of the participant?
* Don't know where it is used.
@@ -44,27 +37,6 @@ class Participant extends BaseItem
*/
private $mpId;
/**
* First name of the participant
*
* @var string
*/
private $firstName;
/**
* Last name of the participant
*
* @var string
*/
private $lastName;
/**
* E-mail of the participant
*
* @var string
*/
private $email;
/**
* Status of the e-mail
*
@@ -231,16 +203,6 @@ class Participant extends BaseItem
}
}
/**
* Returns ID of the participant
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Returns another ID of the participant?
* Don't know where it is used.
@@ -262,36 +224,6 @@ class Participant extends BaseItem
return $this->mpId;
}
/**
* Returns first name of the participant
*
* @return string
*/
public function getFirstName()
{
return $this->firstName;
}
/**
* Returns last name of the participant
*
* @return string
*/
public function getLastName()
{
return $this->lastName;
}
/**
* Returns e-mail of the participant
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* Returns status of the e-mail
*

View File

@@ -8,7 +8,7 @@
namespace Meritoo\LimeSurvey\ApiClient\Result\Item;
use Meritoo\LimeSurvey\ApiClient\Base\Result\BaseItem;
use Meritoo\LimeSurvey\ApiClient\Base\Result\BaseParticipant;
/**
* One item of the result/data: short data of one participant
@@ -16,38 +16,10 @@ use Meritoo\LimeSurvey\ApiClient\Base\Result\BaseItem;
* @author Krzysztof Niziol <krzysztof.niziol@meritoo.pl>
* @copyright Meritoo.pl
*/
class ParticipantShort extends BaseItem
class ParticipantShort extends BaseParticipant
{
const className = 'Meritoo\LimeSurvey\ApiClient\Result\Item\ParticipantShort';
/**
* ID of the participant
*
* @var int
*/
private $id;
/**
* First name of the participant
*
* @var string
*/
private $firstName;
/**
* Last name of the participant
*
* @var string
*/
private $lastName;
/**
* E-mail of the participant
*
* @var string
*/
private $email;
/**
* {@inheritdoc}
*/
@@ -66,46 +38,6 @@ class ParticipantShort extends BaseItem
}
}
/**
* Returns ID of the participant
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Returns first name of the participant
*
* @return string
*/
public function getFirstName()
{
return $this->firstName;
}
/**
* Returns last name of the participant
*
* @return string
*/
public function getLastName()
{
return $this->lastName;
}
/**
* Returns e-mail of the participant
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* Returns short data of participant created from full data of participant
*