some bugfixes
All checks were successful
Build & Push Docker Image / docker (push) Successful in 1m51s

This commit is contained in:
Ahmed Darrazi 2025-12-18 22:49:22 +01:00
parent 52e935b0d0
commit da407e95e8
7 changed files with 28 additions and 23 deletions

View File

@ -20,7 +20,7 @@ class CourseForumController extends Controller
{ {
$this->forumService->createForum($request->validated()); $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()); $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); $this->forumService->deleteForum($id);
return back()->with('success', 'Forum deleted successfully'); return back()->with('success', 'Forum erfolgreich gelöscht.');
} }
} }

View File

@ -123,7 +123,7 @@ class PlayerController extends Controller
$watch_history->completion_date = now(); $watch_history->completion_date = now();
$watch_history->save(); $watch_history->save();
return back()->with('success', 'Course completed successfully'); return back()->with('success', 'Kurs erfolgreich abgeschlossen.');
} }
/** /**

View File

@ -110,7 +110,7 @@ class StudentService extends MediaService
->first(); ->first();
if (!$enrollment) { 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); return Course::with(['instructor:id,user_id', 'instructor.user:id,name,photo'])->find($id);

View File

@ -9,6 +9,7 @@ const ProfileToggle = () => {
const { props } = usePage<SharedData>(); const { props } = usePage<SharedData>();
const { user } = props.auth; const { user } = props.auth;
const { button } = props.translate; const { button } = props.translate;
const showWishlist = props.system.fields?.show_student_wishlist !== false;
const studentMenuItems = [ const studentMenuItems = [
{ {
@ -17,12 +18,16 @@ const ProfileToggle = () => {
slug: 'courses', slug: 'courses',
Icon: GraduationCap, Icon: GraduationCap,
}, },
...(showWishlist
? [
{ {
id: nanoid(), id: nanoid(),
name: button.wishlist, name: button.wishlist,
slug: 'wishlist', slug: 'wishlist',
Icon: Heart, Icon: Heart,
}, },
]
: []),
{ {
id: nanoid(), id: nanoid(),
name: button.profile, name: button.profile,

View File

@ -103,7 +103,7 @@ const ContentList = ({ completedContents, courseCompletion }: ContentListProps)
</> </>
) : ( ) : (
<div className="px-4 py-3 text-center"> <div className="px-4 py-3 text-center">
<p>There is no lesson added</p> <p>Keine Lektion vorhanden</p>
</div> </div>
)} )}
</AccordionContent> </AccordionContent>
@ -139,7 +139,7 @@ const ContentList = ({ completedContents, courseCompletion }: ContentListProps)
</Accordion> </Accordion>
) : ( ) : (
<div className="p-6 text-center"> <div className="p-6 text-center">
<p>There is no section added</p> <p>Kein Abschnitt vorhanden</p>
</div> </div>
)} )}
</TabsContent> </TabsContent>
@ -148,8 +148,8 @@ const ContentList = ({ completedContents, courseCompletion }: ContentListProps)
{liveClasses.length <= 0 ? ( {liveClasses.length <= 0 ? (
<Card className="p-8 text-center"> <Card className="p-8 text-center">
<Calendar className="mx-auto mb-4 h-12 w-12 text-gray-400" /> <Calendar className="mx-auto mb-4 h-12 w-12 text-gray-400" />
<h3 className="mb-2 text-lg font-medium">No Live Classes Scheduled</h3> <h3 className="mb-2 text-lg font-medium">Keine Live-Sitzungen geplant</h3>
<p className="text-gray-500">Schedule your first live class to get started with Zoom.</p> <p className="text-gray-500">Plane deine erste Live-Session, um mit Zoom zu starten.</p>
</Card> </Card>
) : ( ) : (
liveClasses.map((liveClass) => { liveClasses.map((liveClass) => {
@ -178,7 +178,7 @@ const ContentList = ({ completedContents, courseCompletion }: ContentListProps)
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="item-1" className="bg-muted overflow-hidden rounded-lg border-none"> <AccordionItem value="item-1" className="bg-muted overflow-hidden rounded-lg border-none">
<AccordionTrigger className="[&[data-state=open]]:!bg-secondary-lighter px-3 py-1.5 text-sm font-normal hover:no-underline"> <AccordionTrigger className="[&[data-state=open]]:!bg-secondary-lighter px-3 py-1.5 text-sm font-normal hover:no-underline">
Class Note Hinweis zur Sitzung
</AccordionTrigger> </AccordionTrigger>
<AccordionContent className="p-3"> <AccordionContent className="p-3">
<Renderer value={liveClass.class_note} /> <Renderer value={liveClass.class_note} />

View File

@ -17,8 +17,8 @@ const CourseLiveClasses = () => {
{live_classes.length <= 0 ? ( {live_classes.length <= 0 ? (
<div className="p-8 text-center"> <div className="p-8 text-center">
<Calendar className="mx-auto mb-4 h-12 w-12 text-gray-400" /> <Calendar className="mx-auto mb-4 h-12 w-12 text-gray-400" />
<h3 className="mb-2 text-lg font-medium">No Live Classes Scheduled</h3> <h3 className="mb-2 text-lg font-medium">Keine Live-Sitzungen geplant</h3>
<p className="text-gray-500">Schedule your first live class to get started with Zoom.</p> <p className="text-gray-500">Plane deine erste Live-Session, um mit Zoom zu starten.</p>
</div> </div>
) : ( ) : (
live_classes.map((liveClass) => { live_classes.map((liveClass) => {
@ -47,7 +47,7 @@ const CourseLiveClasses = () => {
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="item-1" className="bg-muted overflow-hidden rounded-lg border-none"> <AccordionItem value="item-1" className="bg-muted overflow-hidden rounded-lg border-none">
<AccordionTrigger className="[&[data-state=open]]:!bg-secondary-lighter px-3 py-1.5 text-sm font-normal hover:no-underline"> <AccordionTrigger className="[&[data-state=open]]:!bg-secondary-lighter px-3 py-1.5 text-sm font-normal hover:no-underline">
Class Note Hinweis zur Sitzung
</AccordionTrigger> </AccordionTrigger>
<AccordionContent className="p-3"> <AccordionContent className="p-3">
<Renderer value={liveClass.class_note} /> <Renderer value={liveClass.class_note} />

View File

@ -17,8 +17,8 @@ const LiveClasses = () => {
{live_classes.length <= 0 ? ( {live_classes.length <= 0 ? (
<div className="p-8 text-center"> <div className="p-8 text-center">
<Calendar className="mx-auto mb-4 h-12 w-12 text-gray-400" /> <Calendar className="mx-auto mb-4 h-12 w-12 text-gray-400" />
<h3 className="mb-2 text-lg font-medium">No Live Classes Scheduled</h3> <h3 className="mb-2 text-lg font-medium">Keine Live-Sitzungen geplant</h3>
<p className="text-gray-500">Schedule your first live class to get started with Zoom.</p> <p className="text-gray-500">Plane deine erste Live-Session, um mit Zoom zu starten.</p>
</div> </div>
) : ( ) : (
live_classes.map((liveClass) => { live_classes.map((liveClass) => {
@ -47,7 +47,7 @@ const LiveClasses = () => {
<Accordion type="single" collapsible className="w-full"> <Accordion type="single" collapsible className="w-full">
<AccordionItem value="item-1" className="bg-muted overflow-hidden rounded-lg border-none"> <AccordionItem value="item-1" className="bg-muted overflow-hidden rounded-lg border-none">
<AccordionTrigger className="[&[data-state=open]]:!bg-secondary-lighter px-3 py-1.5 text-sm font-normal hover:no-underline"> <AccordionTrigger className="[&[data-state=open]]:!bg-secondary-lighter px-3 py-1.5 text-sm font-normal hover:no-underline">
Class Note Hinweis zur Sitzung
</AccordionTrigger> </AccordionTrigger>
<AccordionContent className="p-3"> <AccordionContent className="p-3">
<Renderer value={liveClass.class_note} /> <Renderer value={liveClass.class_note} />