diff --git a/resources/js/components/certificate.tsx b/resources/js/components/certificate.tsx index 07ce7a01..937db828 100644 --- a/resources/js/components/certificate.tsx +++ b/resources/js/components/certificate.tsx @@ -43,19 +43,19 @@ const Certificate = ({ course, watchHistory }: { course: Course; watchHistory: W drawCertificate(ctx, dimensions); - canvas.toBlob((blob) => { + canvas.toBlob((blob) => { if (!blob) return; const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; - a.download = `${studentName}_${courseName}_Certificate.png`; + a.download = `${studentName}_${courseName}_Zertifikat.png`; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); - toast.success(frontend.png_certificate_saved); + toast.success(frontend.png_certificate_saved); }, 'image/png'); }; @@ -86,7 +86,7 @@ const Certificate = ({ course, watchHistory }: { course: Course; watchHistory: W pdf.addImage(imgData, 'PNG', 0, 0, dimensions.width, dimensions.height); // Save the PDF - pdf.save(`${studentName}_${courseName}_Certificate.pdf`); + pdf.save(`${studentName}_${courseName}_Zertifikat.pdf`); toast.success(frontend.pdf_certificate_saved); }; @@ -253,21 +253,21 @@ const Certificate = ({ course, watchHistory }: { course: Course; watchHistory: W
diff --git a/resources/js/components/dynamic-certificate.tsx b/resources/js/components/dynamic-certificate.tsx index ad4637b9..ff06891b 100644 --- a/resources/js/components/dynamic-certificate.tsx +++ b/resources/js/components/dynamic-certificate.tsx @@ -68,13 +68,13 @@ const DynamicCertificate = ({ template, courseName, studentName, completionDate const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; - a.download = `${studentName}_${courseName}_Certificate.png`; + a.download = `${studentName}_${courseName}_Zertifikat.png`; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); - toast.success('Certificate saved as PNG!'); + toast.success('Zertifikat als PNG gespeichert!'); }, 'image/png'); }; @@ -111,7 +111,7 @@ const DynamicCertificate = ({ template, courseName, studentName, completionDate pdf.addImage(imgData, 'PNG', 0, 0, dimensions.width, dimensions.height); pdf.save(`${studentName}_${courseName}_Certificate.pdf`); - toast.success('Certificate saved as PDF!'); + toast.success('Zertifikat als PDF gespeichert!'); }; const wrapText = (ctx: CanvasRenderingContext2D, text: string, x: number, y: number, maxWidth: number, lineHeight: number) => { @@ -228,7 +228,7 @@ const DynamicCertificate = ({ template, courseName, studentName, completionDate // Completion date ctx.font = `18px ${template_data.fontFamily}`; ctx.fillStyle = template_data.secondaryColor; - ctx.fillText(`Completed on: ${completionDate}`, dimensions.width / 2, currentY); + ctx.fillText(`Abgeschlossen am: ${completionDate}`, dimensions.width / 2, currentY); currentY += 60; // Footer @@ -346,14 +346,14 @@ const DynamicCertificate = ({ template, courseName, studentName, completionDate color: template_data.secondaryColor, }} /> -

- Completed on: {completionDate} -

+

+ Abgeschlossen am: {completionDate} +

@@ -382,21 +382,21 @@ const DynamicCertificate = ({ template, courseName, studentName, completionDate
diff --git a/resources/js/components/dynamic-marksheet.tsx b/resources/js/components/dynamic-marksheet.tsx index e4210393..6a91653a 100644 --- a/resources/js/components/dynamic-marksheet.tsx +++ b/resources/js/components/dynamic-marksheet.tsx @@ -69,13 +69,13 @@ const DynamicMarksheet = ({ template, courseName, studentName, completionDate, s const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; - a.download = `${studentName}_${courseName}_Marksheet.png`; + a.download = `${studentName}_${courseName}_Notenblatt.png`; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); - toast.success('Marksheet saved as PNG!'); + toast.success('Notenblatt als PNG gespeichert!'); }, 'image/png'); }; @@ -110,9 +110,9 @@ const DynamicMarksheet = ({ template, courseName, studentName, completionDate, s const imgData = canvas.toDataURL('image/png'); pdf.addImage(imgData, 'PNG', 0, 0, dimensions.width, dimensions.height); - pdf.save(`${studentName}_${courseName}_Marksheet.pdf`); + pdf.save(`${studentName}_${courseName}_Notenblatt.pdf`); - toast.success('Marksheet saved as PDF!'); + toast.success('Notenblatt als PDF gespeichert!'); }; const drawMarksheet = async ( @@ -174,7 +174,7 @@ const DynamicMarksheet = ({ template, courseName, studentName, completionDate, s // Column 1 - Student Name ctx.font = `16px ${template_data.fontFamily}`; ctx.fillStyle = template_data.secondaryColor; - ctx.fillText('Student Name', col1X, currentY); + ctx.fillText('Name des Studierenden', col1X, currentY); ctx.font = `bold 20px ${template_data.fontFamily}`; ctx.fillStyle = template_data.primaryColor; @@ -183,7 +183,7 @@ const DynamicMarksheet = ({ template, courseName, studentName, completionDate, s // Column 2 - Course ctx.font = `16px ${template_data.fontFamily}`; ctx.fillStyle = template_data.secondaryColor; - ctx.fillText('Course', col2X, currentY); + ctx.fillText('Kurs', col2X, currentY); ctx.font = `bold 20px ${template_data.fontFamily}`; ctx.fillStyle = template_data.primaryColor; @@ -215,7 +215,7 @@ const DynamicMarksheet = ({ template, courseName, studentName, completionDate, s // Column 1 - Completion Date ctx.font = `16px ${template_data.fontFamily}`; ctx.fillStyle = template_data.secondaryColor; - ctx.fillText('Completion Date', col1X, currentY); + ctx.fillText('Abschlussdatum', col1X, currentY); ctx.font = `18px ${template_data.fontFamily}`; ctx.fillStyle = template_data.primaryColor; @@ -224,7 +224,7 @@ const DynamicMarksheet = ({ template, courseName, studentName, completionDate, s // Column 2 - Overall Grade ctx.font = `16px ${template_data.fontFamily}`; ctx.fillStyle = template_data.secondaryColor; - ctx.fillText('Overall Grade', col2X, currentY); + ctx.fillText('Gesamtnote', col2X, currentY); ctx.font = `bold 20px ${template_data.fontFamily}`; ctx.fillStyle = template_data.primaryColor; @@ -236,7 +236,7 @@ const DynamicMarksheet = ({ template, courseName, studentName, completionDate, s ctx.textAlign = 'left'; ctx.font = `bold 22px ${template_data.fontFamily}`; ctx.fillStyle = template_data.primaryColor; - ctx.fillText('Exam Type', leftMargin, currentY); + ctx.fillText('Prüfungsart', leftMargin, currentY); currentY += 35; // Table Header Background @@ -247,9 +247,9 @@ const DynamicMarksheet = ({ template, courseName, studentName, completionDate, s // Table Headers ctx.font = `bold 18px ${template_data.fontFamily}`; ctx.fillStyle = template_data.primaryColor; - ctx.fillText('Exam Type', leftMargin + 15, currentY + 28); + ctx.fillText('Prüfungsart', leftMargin + 15, currentY + 28); ctx.textAlign = 'right'; - ctx.fillText('Total Marks', rightMargin - 15, currentY + 28); + ctx.fillText('Gesamtpunkte', rightMargin - 15, currentY + 28); // Table Border ctx.strokeStyle = template_data.borderColor; @@ -264,7 +264,7 @@ const DynamicMarksheet = ({ template, courseName, studentName, completionDate, s ctx.textAlign = 'left'; ctx.font = `18px ${template_data.fontFamily}`; ctx.fillStyle = template_data.secondaryColor; - ctx.fillText('Assignment', leftMargin + 15, currentY + 28); + ctx.fillText('Aufgabe', leftMargin + 15, currentY + 28); ctx.textAlign = 'right'; ctx.font = `bold 18px ${template_data.fontFamily}`; @@ -373,13 +373,13 @@ const DynamicMarksheet = ({ template, courseName, studentName, completionDate, s

- Student Name -

+ className="text-sm" + style={{ + color: template_data.secondaryColor, + }} + > + Name des Studierenden +

- Course + Kurs

-

- Completion Date -

+

+ Abschlussdatum +

-

- Overall Grade -

+

+ Gesamtnote +

diff --git a/resources/js/pages/course-player/partials/certificate.tsx b/resources/js/pages/course-player/partials/certificate.tsx index 074eca40..fc5ac4b7 100644 --- a/resources/js/pages/course-player/partials/certificate.tsx +++ b/resources/js/pages/course-player/partials/certificate.tsx @@ -43,13 +43,13 @@ const Certificate = () => { drawCertificate(ctx, dimensions); - canvas.toBlob((blob) => { + canvas.toBlob((blob) => { if (!blob) return; const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; - a.download = `${studentName}_${courseName}_Certificate.png`; + a.download = `${studentName}_${courseName}_Zertifikat.png`; document.body.appendChild(a); a.click(); document.body.removeChild(a); @@ -86,7 +86,7 @@ const Certificate = () => { pdf.addImage(imgData, 'PNG', 0, 0, dimensions.width, dimensions.height); // Save the PDF - pdf.save(`${studentName}_${courseName}_Certificate.pdf`); + pdf.save(`${studentName}_${courseName}_Zertifikat.pdf`); toast.success(frontend.pdf_certificate_saved); }; @@ -255,21 +255,21 @@ const Certificate = () => {
diff --git a/resources/js/pages/student/course.tsx b/resources/js/pages/student/course.tsx index 3a0bef50..76198157 100644 --- a/resources/js/pages/student/course.tsx +++ b/resources/js/pages/student/course.tsx @@ -32,7 +32,7 @@ const Course = (props: StudentCourseProps) => { }, { value: 'quizzes', - label: 'Tests', + label: 'Quizze', }, { value: 'resources', diff --git a/resources/js/pages/student/partials/quiz-result-dialog.tsx b/resources/js/pages/student/partials/quiz-result-dialog.tsx index 24f96248..ba8c44dd 100644 --- a/resources/js/pages/student/partials/quiz-result-dialog.tsx +++ b/resources/js/pages/student/partials/quiz-result-dialog.tsx @@ -74,7 +74,7 @@ const QuizResultDialog = ({ quiz, submission }: Props) => {

{percentage}%

-

Total Score

+

Gesamtpunktzahl

@@ -114,7 +114,7 @@ const QuizResultDialog = ({ quiz, submission }: Props) => { {/* Questions and Answers */}
-

Quiz Questions

+

Quizfragen

{quiz.quiz_questions && quiz.quiz_questions.map((question, index) => { @@ -136,7 +136,7 @@ const QuizResultDialog = ({ quiz, submission }: Props) => {
{isCorrect ? : } - {isCorrect ? 'Correct' : 'Wrong'} + {isCorrect ? 'Richtig' : 'Falsch'} @@ -163,7 +163,7 @@ const QuizResultDialog = ({ quiz, submission }: Props) => {
{isUserAnswer && ( - Your Answer + Deine Antwort )} {isCorrectAnswer && } @@ -178,13 +178,13 @@ const QuizResultDialog = ({ quiz, submission }: Props) => { {/* Boolean type */} {question.type === 'boolean' && (
- {['True', 'False'].map((option) => { - const isUserAnswer = userAnswers.includes(option); - const isCorrectAnswer = correctAnswers.includes(option); + {[{ value: 'True', label: 'Wahr' }, { value: 'False', label: 'Falsch' }].map((option) => { + const isUserAnswer = userAnswers.includes(option.value); + const isCorrectAnswer = correctAnswers.includes(option.value); return (
{ }`} >
- {option} + {option.label}
{isUserAnswer && ( - Your Answer + Deine Antwort )} {isCorrectAnswer && }