Make private slides start with hidden results instead of withholding them
Anonymous/internal feedback now only presets "hide results" on the stage: presenter and embed get the full results flagged private and can show them on demand. Participants still never get results of private slides, the public PDF export strips them via ResultsService::withoutContents(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d1facd32a6
commit
ecb8f9d31c
11 files changed
+143
-95
No files matched your search
@@ -90,14 +90,16 @@ class ReportService
|
||||
*/
|
||||
protected function resultsFor(Slide $slide, bool $includeInternal): array
|
||||
{
|
||||
// Public shape first: it never contains private data.
|
||||
$results = $this->results->forSlide($slide);
|
||||
$mayRead = !$slide->isPrivate() || $includeInternal;
|
||||
if (!$mayRead) {
|
||||
return ResultsService::withoutContents($results);
|
||||
}
|
||||
|
||||
if ($slide->type === Slide::TYPE_OPEN && $mayRead) {
|
||||
if ($slide->type === Slide::TYPE_OPEN) {
|
||||
$results['answers'] = $this->results->answers($slide);
|
||||
}
|
||||
if ($slide->type === Slide::TYPE_SCALE && $mayRead) {
|
||||
if ($slide->type === Slide::TYPE_SCALE) {
|
||||
// Ratings next to comments: complete version always, public one only with the setting.
|
||||
$showRatings = $includeInternal || (bool)$slide->setting('comment_ratings');
|
||||
$comments = [];
|
||||
|
||||
Reference in new issue
Block a user