Add "Keine Angabe" to scales and an "Enthaltung" shortcut for choice slides
CI / Deploy / PHP 8.5 (push) Successful in 1m38s
CI / Deploy / PHP 8.4 (push) Successful in 1m39s
CI / Deploy / test (push) Successful in 2s
CI / Deploy / deploy (push) Skipped

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:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-21 12:39:44 +01:00
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');
}
}