|
@@ -15,8 +15,8 @@ class DiagnosticChapterService
|
|
|
$chapters = TextbookCatalog::query()
|
|
$chapters = TextbookCatalog::query()
|
|
|
->where('textbook_id', $textbookId)
|
|
->where('textbook_id', $textbookId)
|
|
|
->where('node_type', 'chapter')
|
|
->where('node_type', 'chapter')
|
|
|
- ->orderBy('display_no')
|
|
|
|
|
->orderBy('sort_order')
|
|
->orderBy('sort_order')
|
|
|
|
|
+ ->orderBy('display_no')
|
|
|
->orderBy('id')
|
|
->orderBy('id')
|
|
|
->get();
|
|
->get();
|
|
|
|
|
|
|
@@ -34,8 +34,8 @@ class DiagnosticChapterService
|
|
|
$sectionIds = TextbookCatalog::query()
|
|
$sectionIds = TextbookCatalog::query()
|
|
|
->where('parent_id', $chapter->id)
|
|
->where('parent_id', $chapter->id)
|
|
|
->where('node_type', 'section')
|
|
->where('node_type', 'section')
|
|
|
- ->orderBy('display_no')
|
|
|
|
|
->orderBy('sort_order')
|
|
->orderBy('sort_order')
|
|
|
|
|
+ ->orderBy('display_no')
|
|
|
->orderBy('id')
|
|
->orderBy('id')
|
|
|
->pluck('id')
|
|
->pluck('id')
|
|
|
->toArray();
|
|
->toArray();
|
|
@@ -79,8 +79,8 @@ class DiagnosticChapterService
|
|
|
$chapter = TextbookCatalog::query()
|
|
$chapter = TextbookCatalog::query()
|
|
|
->where('textbook_id', $textbookId)
|
|
->where('textbook_id', $textbookId)
|
|
|
->where('node_type', 'chapter')
|
|
->where('node_type', 'chapter')
|
|
|
- ->orderBy('display_no')
|
|
|
|
|
->orderBy('sort_order')
|
|
->orderBy('sort_order')
|
|
|
|
|
+ ->orderBy('display_no')
|
|
|
->orderBy('id')
|
|
->orderBy('id')
|
|
|
->first();
|
|
->first();
|
|
|
|
|
|
|
@@ -94,8 +94,8 @@ class DiagnosticChapterService
|
|
|
$sectionIds = TextbookCatalog::query()
|
|
$sectionIds = TextbookCatalog::query()
|
|
|
->where('parent_id', $chapter->id)
|
|
->where('parent_id', $chapter->id)
|
|
|
->where('node_type', 'section')
|
|
->where('node_type', 'section')
|
|
|
- ->orderBy('display_no')
|
|
|
|
|
->orderBy('sort_order')
|
|
->orderBy('sort_order')
|
|
|
|
|
+ ->orderBy('display_no')
|
|
|
->orderBy('id')
|
|
->orderBy('id')
|
|
|
->pluck('id')
|
|
->pluck('id')
|
|
|
->toArray();
|
|
->toArray();
|
|
@@ -140,8 +140,8 @@ class DiagnosticChapterService
|
|
|
$chapters = TextbookCatalog::query()
|
|
$chapters = TextbookCatalog::query()
|
|
|
->where('textbook_id', $textbookId)
|
|
->where('textbook_id', $textbookId)
|
|
|
->where('node_type', 'chapter')
|
|
->where('node_type', 'chapter')
|
|
|
- ->orderBy('display_no')
|
|
|
|
|
->orderBy('sort_order')
|
|
->orderBy('sort_order')
|
|
|
|
|
+ ->orderBy('display_no')
|
|
|
->orderBy('id')
|
|
->orderBy('id')
|
|
|
->get();
|
|
->get();
|
|
|
|
|
|
|
@@ -156,8 +156,8 @@ class DiagnosticChapterService
|
|
|
$sectionIds = TextbookCatalog::query()
|
|
$sectionIds = TextbookCatalog::query()
|
|
|
->where('parent_id', $chapter->id)
|
|
->where('parent_id', $chapter->id)
|
|
|
->where('node_type', 'section')
|
|
->where('node_type', 'section')
|
|
|
- ->orderBy('display_no')
|
|
|
|
|
->orderBy('sort_order')
|
|
->orderBy('sort_order')
|
|
|
|
|
+ ->orderBy('display_no')
|
|
|
->orderBy('id')
|
|
->orderBy('id')
|
|
|
->pluck('id')
|
|
->pluck('id')
|
|
|
->toArray();
|
|
->toArray();
|
|
@@ -263,8 +263,8 @@ class DiagnosticChapterService
|
|
|
$sectionIds = TextbookCatalog::query()
|
|
$sectionIds = TextbookCatalog::query()
|
|
|
->where('parent_id', $chapterId)
|
|
->where('parent_id', $chapterId)
|
|
|
->where('node_type', 'section')
|
|
->where('node_type', 'section')
|
|
|
- ->orderBy('display_no')
|
|
|
|
|
->orderBy('sort_order')
|
|
->orderBy('sort_order')
|
|
|
|
|
+ ->orderBy('display_no')
|
|
|
->orderBy('id')
|
|
->orderBy('id')
|
|
|
->pluck('id')
|
|
->pluck('id')
|
|
|
->toArray();
|
|
->toArray();
|
|
@@ -315,8 +315,8 @@ class DiagnosticChapterService
|
|
|
$chapters = TextbookCatalog::query()
|
|
$chapters = TextbookCatalog::query()
|
|
|
->where('textbook_id', $textbookId)
|
|
->where('textbook_id', $textbookId)
|
|
|
->where('node_type', 'chapter')
|
|
->where('node_type', 'chapter')
|
|
|
- ->orderBy('display_no')
|
|
|
|
|
->orderBy('sort_order')
|
|
->orderBy('sort_order')
|
|
|
|
|
+ ->orderBy('display_no')
|
|
|
->orderBy('id')
|
|
->orderBy('id')
|
|
|
->get();
|
|
->get();
|
|
|
|
|
|
|
@@ -383,8 +383,8 @@ class DiagnosticChapterService
|
|
|
$chapters = TextbookCatalog::query()
|
|
$chapters = TextbookCatalog::query()
|
|
|
->where('textbook_id', $textbookId)
|
|
->where('textbook_id', $textbookId)
|
|
|
->where('node_type', 'chapter')
|
|
->where('node_type', 'chapter')
|
|
|
- ->orderBy('display_no')
|
|
|
|
|
->orderBy('sort_order')
|
|
->orderBy('sort_order')
|
|
|
|
|
+ ->orderBy('display_no')
|
|
|
->orderBy('id')
|
|
->orderBy('id')
|
|
|
->get();
|
|
->get();
|
|
|
|
|
|
|
@@ -445,8 +445,8 @@ class DiagnosticChapterService
|
|
|
$chapters = TextbookCatalog::query()
|
|
$chapters = TextbookCatalog::query()
|
|
|
->where('textbook_id', $textbookId)
|
|
->where('textbook_id', $textbookId)
|
|
|
->where('node_type', 'chapter')
|
|
->where('node_type', 'chapter')
|
|
|
- ->orderBy('display_no')
|
|
|
|
|
->orderBy('sort_order')
|
|
->orderBy('sort_order')
|
|
|
|
|
+ ->orderBy('display_no')
|
|
|
->orderBy('id')
|
|
->orderBy('id')
|
|
|
->get();
|
|
->get();
|
|
|
|
|
|