add test batches
This commit is contained in:
@@ -13,15 +13,15 @@ class ExamDraftDownloadNameService
|
||||
$row = DB::table('exam_drafts as ed')
|
||||
->select('ed.version', 'ed.exam_type', 'ed.class_section_id', 'cs.class_section_name')
|
||||
->leftJoin('classSection as cs', 'cs.class_section_id', '=', 'ed.class_section_id')
|
||||
->where('ed.'.$column, $filename)
|
||||
->where('ed.' . $column, $filename)
|
||||
->limit(1)
|
||||
->first();
|
||||
|
||||
$row = $row ? (array) $row : [];
|
||||
|
||||
$classLabel = trim((string) ($row['class_section_name'] ?? ('Class'.($row['class_section_id'] ?? '0'))));
|
||||
$classLabel = trim((string) ($row['class_section_name'] ?? ('Class' . ($row['class_section_id'] ?? '0'))));
|
||||
$typeLabel = trim((string) ($row['exam_type'] ?? 'Exam'));
|
||||
$version = 'v'.max(1, (int) ($row['version'] ?? 1));
|
||||
$version = 'v' . max(1, (int) ($row['version'] ?? 1));
|
||||
|
||||
$parts = array_filter([
|
||||
$this->slugify($classLabel),
|
||||
@@ -40,7 +40,6 @@ class ExamDraftDownloadNameService
|
||||
if ($value === '') {
|
||||
return 'Exam';
|
||||
}
|
||||
|
||||
return mb_strtolower($value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user