diff --git a/app/Http/Controllers/Course/CourseForumController.php b/app/Http/Controllers/Course/CourseForumController.php index 0684a71c..6a3fa972 100644 --- a/app/Http/Controllers/Course/CourseForumController.php +++ b/app/Http/Controllers/Course/CourseForumController.php @@ -20,7 +20,7 @@ class CourseForumController extends Controller { $this->forumService->createForum($request->validated()); - return back()->with('success', 'Forum created successfully'); + return back()->with('success', 'Forum erfolgreich erstellt.'); } /** @@ -30,7 +30,7 @@ class CourseForumController extends Controller { $this->forumService->updateForum($id, $request->validated()); - return back()->with('success', 'Forum updated successfully'); + return back()->with('success', 'Forum erfolgreich aktualisiert.'); } /** @@ -40,6 +40,6 @@ class CourseForumController extends Controller { $this->forumService->deleteForum($id); - return back()->with('success', 'Forum deleted successfully'); + return back()->with('success', 'Forum erfolgreich gelöscht.'); } } diff --git a/app/Http/Controllers/Course/PlayerController.php b/app/Http/Controllers/Course/PlayerController.php index 6dde37bd..28e01f7d 100644 --- a/app/Http/Controllers/Course/PlayerController.php +++ b/app/Http/Controllers/Course/PlayerController.php @@ -123,7 +123,7 @@ class PlayerController extends Controller $watch_history->completion_date = now(); $watch_history->save(); - return back()->with('success', 'Course completed successfully'); + return back()->with('success', 'Kurs erfolgreich abgeschlossen.'); } /** diff --git a/app/Services/StudentService.php b/app/Services/StudentService.php index 402c61ee..ce2da242 100644 --- a/app/Services/StudentService.php +++ b/app/Services/StudentService.php @@ -110,7 +110,7 @@ class StudentService extends MediaService ->first(); if (!$enrollment) { - throw new \Exception('You are not enrolled in this course'); + abort(403, 'You are not enrolled in this course'); } return Course::with(['instructor:id,user_id', 'instructor.user:id,name,photo'])->find($id); diff --git a/resources/js/components/profile-toggle.tsx b/resources/js/components/profile-toggle.tsx index 9c3100b7..92170ae2 100644 --- a/resources/js/components/profile-toggle.tsx +++ b/resources/js/components/profile-toggle.tsx @@ -9,6 +9,7 @@ const ProfileToggle = () => { const { props } = usePage(); const { user } = props.auth; const { button } = props.translate; + const showWishlist = props.system.fields?.show_student_wishlist !== false; const studentMenuItems = [ { @@ -17,12 +18,16 @@ const ProfileToggle = () => { slug: 'courses', Icon: GraduationCap, }, - { - id: nanoid(), - name: button.wishlist, - slug: 'wishlist', - Icon: Heart, - }, + ...(showWishlist + ? [ + { + id: nanoid(), + name: button.wishlist, + slug: 'wishlist', + Icon: Heart, + }, + ] + : []), { id: nanoid(), name: button.profile, diff --git a/resources/js/pages/course-player/partials/content-list.tsx b/resources/js/pages/course-player/partials/content-list.tsx index 27266f2b..d76e0086 100644 --- a/resources/js/pages/course-player/partials/content-list.tsx +++ b/resources/js/pages/course-player/partials/content-list.tsx @@ -103,7 +103,7 @@ const ContentList = ({ completedContents, courseCompletion }: ContentListProps) ) : (
-

There is no lesson added

+

Keine Lektion vorhanden

)} @@ -139,7 +139,7 @@ const ContentList = ({ completedContents, courseCompletion }: ContentListProps) ) : (
-

There is no section added

+

Kein Abschnitt vorhanden

)} @@ -148,8 +148,8 @@ const ContentList = ({ completedContents, courseCompletion }: ContentListProps) {liveClasses.length <= 0 ? ( -

No Live Classes Scheduled

-

Schedule your first live class to get started with Zoom.

+

Keine Live-Sitzungen geplant

+

Plane deine erste Live-Session, um mit Zoom zu starten.

) : ( liveClasses.map((liveClass) => { @@ -178,7 +178,7 @@ const ContentList = ({ completedContents, courseCompletion }: ContentListProps) - Class Note + Hinweis zur Sitzung diff --git a/resources/js/pages/student/tabs-content/course-live-classes.tsx b/resources/js/pages/student/tabs-content/course-live-classes.tsx index bc8e3d94..aa67da1c 100644 --- a/resources/js/pages/student/tabs-content/course-live-classes.tsx +++ b/resources/js/pages/student/tabs-content/course-live-classes.tsx @@ -17,8 +17,8 @@ const CourseLiveClasses = () => { {live_classes.length <= 0 ? (
-

No Live Classes Scheduled

-

Schedule your first live class to get started with Zoom.

+

Keine Live-Sitzungen geplant

+

Plane deine erste Live-Session, um mit Zoom zu starten.

) : ( live_classes.map((liveClass) => { @@ -47,7 +47,7 @@ const CourseLiveClasses = () => { - Class Note + Hinweis zur Sitzung diff --git a/resources/js/pages/student/tabs-content/live_classes.tsx b/resources/js/pages/student/tabs-content/live_classes.tsx index 4670bd04..712f9ba3 100644 --- a/resources/js/pages/student/tabs-content/live_classes.tsx +++ b/resources/js/pages/student/tabs-content/live_classes.tsx @@ -17,8 +17,8 @@ const LiveClasses = () => { {live_classes.length <= 0 ? (
-

No Live Classes Scheduled

-

Schedule your first live class to get started with Zoom.

+

Keine Live-Sitzungen geplant

+

Plane deine erste Live-Session, um mit Zoom zu starten.

) : ( live_classes.map((liveClass) => { @@ -46,8 +46,8 @@ const LiveClasses = () => { {liveClass.class_note && ( - - Class Note + + Hinweis zur Sitzung