@if ($subject == 'speaking')
@php
$part1Topic = $enrollmentCdtSet->cdtSet->feedbackTopics->where('subject', 'Speaking')->where('type', 'Part 1')->first();
$part2Topic = $enrollmentCdtSet->cdtSet->feedbackTopics->where('subject', 'Speaking')->where('type', 'Part 2&3')->first();
@endphp
@if($part1Topic)
SPEAKING PART 1
{!! $part1Topic->question !!}
@endif
@if($part2Topic)
SPEAKING PART 2
{!! $part2Topic->question !!}
SPEAKING PART 3
{!! $part2Topic->question2 !!}
@endif
@else
@php
$task1Topic = $enrollmentCdtSet->cdtSet->feedbackTopics->where('subject', 'Writing')->where('type', 'Task 1')->first();
$task2Topic = $enrollmentCdtSet->cdtSet->feedbackTopics->where('subject', 'Writing')->where('type', 'Task 2')->first();
$answer1 = $task1Topic ? $task1Topic->answer : '';
$answer2 = $task2Topic ? $task2Topic->answer : '';
@endphp
@if($task1Topic)
WRITING TASK 1
{!! $task1Topic->question !!}
@if (!empty($task1Topic->chart_s3_key))

@endif
@endif
@if($task2Topic)
WRITING TASK 2
{!! $task2Topic->question !!}
@if (!empty($task2Topic->chart_s3_key))

@endif
@endif
@endif