mirror of
https://github.com/wiosna-dev/limesurvey-api-client.git
synced 2026-03-12 10:11:49 +01:00
Participant has completed survey - fix getting proper information
This commit is contained in:
@@ -201,7 +201,12 @@ class Participant extends BaseItem
|
||||
break;
|
||||
|
||||
case 'completed':
|
||||
$this->completed = 'Y' === trim(strtoupper($value));
|
||||
if ('N' === trim(strtoupper($value))) {
|
||||
$this->completed = false;
|
||||
break;
|
||||
}
|
||||
|
||||
$this->completed = Date::isValidDate($value, true);
|
||||
break;
|
||||
|
||||
case 'usesleft':
|
||||
|
||||
@@ -200,7 +200,7 @@ class ParticipantTest extends BaseTestCase
|
||||
'sent' => 'Y',
|
||||
'remindersent' => 'N',
|
||||
'remindercount' => 1,
|
||||
'completed' => 'Y',
|
||||
'completed' => (new DateTime())->format('Y-m-d H:i'),
|
||||
'usesleft' => 5,
|
||||
'validfrom' => (new DateTime())->format('Y-m-d H:i:s'),
|
||||
'validuntil' => null,
|
||||
|
||||
Reference in New Issue
Block a user