@foreach ($test_series->section_content as $section)
@php
$_content = json_decode($section->content, true);
$_content = is_array($_content) ? $_content : [];
$percent = \App\Models\TestSeriesStatus::getPercent([
'test_series_id' => $test_series->id,
'test_series_content_id' => $section->id
],$_content);
$collapsed = "collapsed";
if ($section->id == $sectionContentId
|| ($sectionContentId == false && $loop->first)
) {
$collapsed = "";
}
@endphp
@if (is_array($_content) && count($_content) > 0)
@foreach ($_content as $testId)
@php
$link = _route('student.test-series.detailType', [
$test_series->id,
$section->id,
$testId,
]);
$status = \App\Models\TestSeriesStatus::getStatus([
'test_series_id' => $test_series->id,
'test_series_content_id' => $section->id,
'test_id' => $testId,
]);
$_test = \App\Models\Tests::where('id', $testId)->first('title');
$title = $_test->title ?? null;
$text_class = "text-dark";
if ($status == \App\Models\TestSeriesStatus::STATUS_COMPLETED) {
$text_class = "success";
}else if($status == \App\Models\TestSeriesStatus::STATUS_INPROGRESS){
$text_class = "warning";
}
@endphp
@if (!empty($title))
-
{{$title}} {{$status}}
@endif
@endforeach
@endif
@endforeach
@isset($view)
@include($view)
@endisset
{{-- @if (is_student_master())
@if (is_null($test_series->payment))
@include('frontend.test-series.detail')
@endif
@endif --}}