Add "Keine Angabe" to scales and an "Enthaltung" shortcut for choice slides
Scales and star ratings get an optional "Keine Angabe" answer (setting allow_skip). It counts as taking part but stays out of the average and the distribution; the number is shown separately on stage, in the evaluation and in the PDF. The choice form gets a button that appends an "Enthaltung" option. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1b48ce7852
commit
d6432911ed
14 files changed
+195
-11
No files matched your search
@@ -238,4 +238,30 @@ class ParticipateControllerTest extends TestCase
|
||||
$this->assertFlashMessage('Diese Antwort kann nicht mehr geändert werden.');
|
||||
$this->assertFalse(TableRegistry::getTableLocator()->get('Responses')->exists(['text_value' => 'Hack']));
|
||||
}
|
||||
|
||||
public function testScaleSkipButtonOnlyWithSetting(): void
|
||||
{
|
||||
[$poll] = $this->createPoll();
|
||||
$slide = $this->createSlide($poll, Slide::TYPE_SCALE);
|
||||
$this->goLive($poll, $slide);
|
||||
$this->cookie('plenario_pid', self::PID);
|
||||
$this->get('/p/' . $poll->join_code);
|
||||
$this->assertResponseNotContains('Keine Angabe');
|
||||
|
||||
$slide = $this->createSlide($poll, Slide::TYPE_SCALE, ['settings' => ['allow_skip' => true, 'comments' => true]]);
|
||||
$this->goLive($poll, $slide);
|
||||
$this->cookie('plenario_pid', self::PID);
|
||||
$this->get('/p/' . $poll->join_code);
|
||||
$this->assertResponseContains('name="skip"');
|
||||
|
||||
$this->cookie('plenario_pid', self::PID);
|
||||
$this->post("/p/{$poll->join_code}/vote", ['slide_id' => $slide->id, 'skip' => '1']);
|
||||
$this->assertFlashMessage('Danke für deine Antwort!');
|
||||
|
||||
// No rating, so no comment to add afterwards.
|
||||
$this->cookie('plenario_pid', self::PID);
|
||||
$this->get('/p/' . $poll->join_code);
|
||||
$this->assertResponseContains('Deine Antwort ist angekommen.');
|
||||
$this->assertResponseNotContains('Kommentar hinzufügen');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user