From bbdbda4942e4ed0862061e28132dee5dd0745c1b Mon Sep 17 00:00:00 2001 From: Jannat Patel <31363128+pateljannat@users.noreply.github.com> Date: Mon, 10 Feb 2025 21:38:56 +0530 Subject: [PATCH 01/16] chore: French translations --- lms/locale/fr.po | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lms/locale/fr.po b/lms/locale/fr.po index c92c7e77..5261d43a 100644 --- a/lms/locale/fr.po +++ b/lms/locale/fr.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: frappe\n" "Report-Msgid-Bugs-To: jannat@frappe.io\n" -"POT-Creation-Date: 2025-01-24 16:04+0000\n" -"PO-Revision-Date: 2025-01-28 12:17\n" +"POT-Creation-Date: 2025-02-07 16:03+0000\n" +"PO-Revision-Date: 2025-02-10 16:08\n" "Last-Translator: jannat@frappe.io\n" "Language-Team: French\n" "MIME-Version: 1.0\n" @@ -240,6 +240,11 @@ msgstr "Tous les envois" msgid "All questions should have the same marks if the limit is set." msgstr "Toutes les questions doivent avoir les mêmes notes si la limite est fixée." +#. Label of the allow_guest_access (Check) field in DocType 'LMS Settings' +#: lms/lms/doctype/lms_settings/lms_settings.json +msgid "Allow Guest Access" +msgstr "" + #. Label of the allow_posting (Check) field in DocType 'Job Settings' #: lms/job/doctype/job_settings/job_settings.json msgid "Allow Job Posting From Website" @@ -1214,6 +1219,7 @@ msgstr "Contenu du cours" #. Name of a role #: frontend/src/pages/ProfileRoles.vue:16 +#: lms/lms/doctype/course_chapter/course_chapter.json #: lms/lms/doctype/lms_course/lms_course.json #: lms/lms/doctype/lms_program/lms_program.json #: lms/lms/doctype/lms_question/lms_question.json @@ -1340,7 +1346,7 @@ msgstr "Cours terminés" msgid "Courses Mentored" msgstr "Cours encadrés" -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 msgid "Courses deleted successfully" msgstr "" @@ -4917,7 +4923,7 @@ msgid "Submitted {0}" msgstr "" #: frontend/src/components/Assignment.vue:316 -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 #: frontend/src/components/BatchOverlay.vue:135 #: frontend/src/components/BatchStudents.vue:302 #: frontend/src/components/CourseCardOverlay.vue:165 From f01bb1aecb6918164233873841d6231efe51f492 Mon Sep 17 00:00:00 2001 From: Jannat Patel <31363128+pateljannat@users.noreply.github.com> Date: Mon, 10 Feb 2025 21:38:57 +0530 Subject: [PATCH 02/16] chore: Spanish translations --- lms/locale/es.po | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lms/locale/es.po b/lms/locale/es.po index 1a26fb89..d85ce414 100644 --- a/lms/locale/es.po +++ b/lms/locale/es.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: frappe\n" "Report-Msgid-Bugs-To: jannat@frappe.io\n" -"POT-Creation-Date: 2025-01-24 16:04+0000\n" -"PO-Revision-Date: 2025-01-28 12:17\n" +"POT-Creation-Date: 2025-02-07 16:03+0000\n" +"PO-Revision-Date: 2025-02-10 16:08\n" "Last-Translator: jannat@frappe.io\n" "Language-Team: Spanish\n" "MIME-Version: 1.0\n" @@ -240,6 +240,11 @@ msgstr "Todas las entregas" msgid "All questions should have the same marks if the limit is set." msgstr "Todas las preguntas deberían tener las mismas marcas si el límite está establecido." +#. Label of the allow_guest_access (Check) field in DocType 'LMS Settings' +#: lms/lms/doctype/lms_settings/lms_settings.json +msgid "Allow Guest Access" +msgstr "" + #. Label of the allow_posting (Check) field in DocType 'Job Settings' #: lms/job/doctype/job_settings/job_settings.json msgid "Allow Job Posting From Website" @@ -1214,6 +1219,7 @@ msgstr "Contenido del curso" #. Name of a role #: frontend/src/pages/ProfileRoles.vue:16 +#: lms/lms/doctype/course_chapter/course_chapter.json #: lms/lms/doctype/lms_course/lms_course.json #: lms/lms/doctype/lms_program/lms_program.json #: lms/lms/doctype/lms_question/lms_question.json @@ -1340,7 +1346,7 @@ msgstr "Cursos completados" msgid "Courses Mentored" msgstr "Cursos Mentorados" -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 msgid "Courses deleted successfully" msgstr "Cursos eliminados correctamente" @@ -4917,7 +4923,7 @@ msgid "Submitted {0}" msgstr "Enviado {0}" #: frontend/src/components/Assignment.vue:316 -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 #: frontend/src/components/BatchOverlay.vue:135 #: frontend/src/components/BatchStudents.vue:302 #: frontend/src/components/CourseCardOverlay.vue:165 From d0898d4c75ac32a5efcbd81291a7fa4ae33f34ce Mon Sep 17 00:00:00 2001 From: Jannat Patel <31363128+pateljannat@users.noreply.github.com> Date: Mon, 10 Feb 2025 21:38:59 +0530 Subject: [PATCH 03/16] chore: Arabic translations --- lms/locale/ar.po | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lms/locale/ar.po b/lms/locale/ar.po index 865a4a48..2c4cc89c 100644 --- a/lms/locale/ar.po +++ b/lms/locale/ar.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: frappe\n" "Report-Msgid-Bugs-To: jannat@frappe.io\n" -"POT-Creation-Date: 2025-01-24 16:04+0000\n" -"PO-Revision-Date: 2025-01-28 12:17\n" +"POT-Creation-Date: 2025-02-07 16:03+0000\n" +"PO-Revision-Date: 2025-02-10 16:08\n" "Last-Translator: jannat@frappe.io\n" "Language-Team: Arabic\n" "MIME-Version: 1.0\n" @@ -240,6 +240,11 @@ msgstr "" msgid "All questions should have the same marks if the limit is set." msgstr "" +#. Label of the allow_guest_access (Check) field in DocType 'LMS Settings' +#: lms/lms/doctype/lms_settings/lms_settings.json +msgid "Allow Guest Access" +msgstr "" + #. Label of the allow_posting (Check) field in DocType 'Job Settings' #: lms/job/doctype/job_settings/job_settings.json msgid "Allow Job Posting From Website" @@ -1214,6 +1219,7 @@ msgstr "" #. Name of a role #: frontend/src/pages/ProfileRoles.vue:16 +#: lms/lms/doctype/course_chapter/course_chapter.json #: lms/lms/doctype/lms_course/lms_course.json #: lms/lms/doctype/lms_program/lms_program.json #: lms/lms/doctype/lms_question/lms_question.json @@ -1340,7 +1346,7 @@ msgstr "" msgid "Courses Mentored" msgstr "" -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 msgid "Courses deleted successfully" msgstr "" @@ -4917,7 +4923,7 @@ msgid "Submitted {0}" msgstr "" #: frontend/src/components/Assignment.vue:316 -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 #: frontend/src/components/BatchOverlay.vue:135 #: frontend/src/components/BatchStudents.vue:302 #: frontend/src/components/CourseCardOverlay.vue:165 From 1953d89e3cf2a570be0cf8e7008f7424fe5213c1 Mon Sep 17 00:00:00 2001 From: Jannat Patel <31363128+pateljannat@users.noreply.github.com> Date: Mon, 10 Feb 2025 21:39:00 +0530 Subject: [PATCH 04/16] chore: German translations --- lms/locale/de.po | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lms/locale/de.po b/lms/locale/de.po index d1370769..91c9842f 100644 --- a/lms/locale/de.po +++ b/lms/locale/de.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: frappe\n" "Report-Msgid-Bugs-To: jannat@frappe.io\n" -"POT-Creation-Date: 2025-01-24 16:04+0000\n" -"PO-Revision-Date: 2025-01-28 12:17\n" +"POT-Creation-Date: 2025-02-07 16:03+0000\n" +"PO-Revision-Date: 2025-02-10 16:09\n" "Last-Translator: jannat@frappe.io\n" "Language-Team: German\n" "MIME-Version: 1.0\n" @@ -240,6 +240,11 @@ msgstr "Alle Einsendungen" msgid "All questions should have the same marks if the limit is set." msgstr "Alle Fragen sollten die gleiche Punktzahl haben, wenn das Limit festgelegt ist." +#. Label of the allow_guest_access (Check) field in DocType 'LMS Settings' +#: lms/lms/doctype/lms_settings/lms_settings.json +msgid "Allow Guest Access" +msgstr "" + #. Label of the allow_posting (Check) field in DocType 'Job Settings' #: lms/job/doctype/job_settings/job_settings.json msgid "Allow Job Posting From Website" @@ -1214,6 +1219,7 @@ msgstr "Kursinhalt" #. Name of a role #: frontend/src/pages/ProfileRoles.vue:16 +#: lms/lms/doctype/course_chapter/course_chapter.json #: lms/lms/doctype/lms_course/lms_course.json #: lms/lms/doctype/lms_program/lms_program.json #: lms/lms/doctype/lms_question/lms_question.json @@ -1340,7 +1346,7 @@ msgstr "Abgeschlossene Kurse" msgid "Courses Mentored" msgstr "Betreute Kurse" -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 msgid "Courses deleted successfully" msgstr "" @@ -4917,7 +4923,7 @@ msgid "Submitted {0}" msgstr "" #: frontend/src/components/Assignment.vue:316 -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 #: frontend/src/components/BatchOverlay.vue:135 #: frontend/src/components/BatchStudents.vue:302 #: frontend/src/components/CourseCardOverlay.vue:165 From 838de2f692e32f90fd94fe9206e9be37ba79732f Mon Sep 17 00:00:00 2001 From: Jannat Patel <31363128+pateljannat@users.noreply.github.com> Date: Mon, 10 Feb 2025 21:39:02 +0530 Subject: [PATCH 05/16] chore: Hungarian translations --- lms/locale/hu.po | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lms/locale/hu.po b/lms/locale/hu.po index 983f99c8..d3438f3d 100644 --- a/lms/locale/hu.po +++ b/lms/locale/hu.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: frappe\n" "Report-Msgid-Bugs-To: jannat@frappe.io\n" -"POT-Creation-Date: 2025-01-24 16:04+0000\n" -"PO-Revision-Date: 2025-01-28 12:17\n" +"POT-Creation-Date: 2025-02-07 16:03+0000\n" +"PO-Revision-Date: 2025-02-10 16:09\n" "Last-Translator: jannat@frappe.io\n" "Language-Team: Hungarian\n" "MIME-Version: 1.0\n" @@ -240,6 +240,11 @@ msgstr "" msgid "All questions should have the same marks if the limit is set." msgstr "" +#. Label of the allow_guest_access (Check) field in DocType 'LMS Settings' +#: lms/lms/doctype/lms_settings/lms_settings.json +msgid "Allow Guest Access" +msgstr "" + #. Label of the allow_posting (Check) field in DocType 'Job Settings' #: lms/job/doctype/job_settings/job_settings.json msgid "Allow Job Posting From Website" @@ -1214,6 +1219,7 @@ msgstr "" #. Name of a role #: frontend/src/pages/ProfileRoles.vue:16 +#: lms/lms/doctype/course_chapter/course_chapter.json #: lms/lms/doctype/lms_course/lms_course.json #: lms/lms/doctype/lms_program/lms_program.json #: lms/lms/doctype/lms_question/lms_question.json @@ -1340,7 +1346,7 @@ msgstr "" msgid "Courses Mentored" msgstr "" -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 msgid "Courses deleted successfully" msgstr "" @@ -4917,7 +4923,7 @@ msgid "Submitted {0}" msgstr "" #: frontend/src/components/Assignment.vue:316 -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 #: frontend/src/components/BatchOverlay.vue:135 #: frontend/src/components/BatchStudents.vue:302 #: frontend/src/components/CourseCardOverlay.vue:165 From 48e0787344fa5c584c85311f13f33367b095f9a8 Mon Sep 17 00:00:00 2001 From: Jannat Patel <31363128+pateljannat@users.noreply.github.com> Date: Mon, 10 Feb 2025 21:39:04 +0530 Subject: [PATCH 06/16] chore: Polish translations --- lms/locale/pl.po | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lms/locale/pl.po b/lms/locale/pl.po index f69f2704..c82d6ab1 100644 --- a/lms/locale/pl.po +++ b/lms/locale/pl.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: frappe\n" "Report-Msgid-Bugs-To: jannat@frappe.io\n" -"POT-Creation-Date: 2025-01-24 16:04+0000\n" -"PO-Revision-Date: 2025-01-28 12:17\n" +"POT-Creation-Date: 2025-02-07 16:03+0000\n" +"PO-Revision-Date: 2025-02-10 16:09\n" "Last-Translator: jannat@frappe.io\n" "Language-Team: Polish\n" "MIME-Version: 1.0\n" @@ -240,6 +240,11 @@ msgstr "" msgid "All questions should have the same marks if the limit is set." msgstr "" +#. Label of the allow_guest_access (Check) field in DocType 'LMS Settings' +#: lms/lms/doctype/lms_settings/lms_settings.json +msgid "Allow Guest Access" +msgstr "" + #. Label of the allow_posting (Check) field in DocType 'Job Settings' #: lms/job/doctype/job_settings/job_settings.json msgid "Allow Job Posting From Website" @@ -1214,6 +1219,7 @@ msgstr "" #. Name of a role #: frontend/src/pages/ProfileRoles.vue:16 +#: lms/lms/doctype/course_chapter/course_chapter.json #: lms/lms/doctype/lms_course/lms_course.json #: lms/lms/doctype/lms_program/lms_program.json #: lms/lms/doctype/lms_question/lms_question.json @@ -1340,7 +1346,7 @@ msgstr "" msgid "Courses Mentored" msgstr "" -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 msgid "Courses deleted successfully" msgstr "" @@ -4917,7 +4923,7 @@ msgid "Submitted {0}" msgstr "" #: frontend/src/components/Assignment.vue:316 -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 #: frontend/src/components/BatchOverlay.vue:135 #: frontend/src/components/BatchStudents.vue:302 #: frontend/src/components/CourseCardOverlay.vue:165 From db39a6416c90d653964d0a71bbde07269b65e396 Mon Sep 17 00:00:00 2001 From: Jannat Patel <31363128+pateljannat@users.noreply.github.com> Date: Mon, 10 Feb 2025 21:39:05 +0530 Subject: [PATCH 07/16] chore: Russian translations --- lms/locale/ru.po | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lms/locale/ru.po b/lms/locale/ru.po index c74f587e..41d0d1f5 100644 --- a/lms/locale/ru.po +++ b/lms/locale/ru.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: frappe\n" "Report-Msgid-Bugs-To: jannat@frappe.io\n" -"POT-Creation-Date: 2025-01-24 16:04+0000\n" -"PO-Revision-Date: 2025-01-28 12:17\n" +"POT-Creation-Date: 2025-02-07 16:03+0000\n" +"PO-Revision-Date: 2025-02-10 16:09\n" "Last-Translator: jannat@frappe.io\n" "Language-Team: Russian\n" "MIME-Version: 1.0\n" @@ -240,6 +240,11 @@ msgstr "Все заявки" msgid "All questions should have the same marks if the limit is set." msgstr "Если установлен лимит, все вопросы должны иметь одинаковые баллы." +#. Label of the allow_guest_access (Check) field in DocType 'LMS Settings' +#: lms/lms/doctype/lms_settings/lms_settings.json +msgid "Allow Guest Access" +msgstr "" + #. Label of the allow_posting (Check) field in DocType 'Job Settings' #: lms/job/doctype/job_settings/job_settings.json msgid "Allow Job Posting From Website" @@ -1214,6 +1219,7 @@ msgstr "Содержание курса" #. Name of a role #: frontend/src/pages/ProfileRoles.vue:16 +#: lms/lms/doctype/course_chapter/course_chapter.json #: lms/lms/doctype/lms_course/lms_course.json #: lms/lms/doctype/lms_program/lms_program.json #: lms/lms/doctype/lms_question/lms_question.json @@ -1340,7 +1346,7 @@ msgstr "Курсов завершено" msgid "Courses Mentored" msgstr "Курсы с наставником" -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 msgid "Courses deleted successfully" msgstr "" @@ -4917,7 +4923,7 @@ msgid "Submitted {0}" msgstr "Отправлено {0}" #: frontend/src/components/Assignment.vue:316 -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 #: frontend/src/components/BatchOverlay.vue:135 #: frontend/src/components/BatchStudents.vue:302 #: frontend/src/components/CourseCardOverlay.vue:165 From 25f3d2fb9f8535a1cddf63f9610b4d631822287c Mon Sep 17 00:00:00 2001 From: Jannat Patel <31363128+pateljannat@users.noreply.github.com> Date: Mon, 10 Feb 2025 21:39:07 +0530 Subject: [PATCH 08/16] chore: Swedish translations --- lms/locale/sv.po | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lms/locale/sv.po b/lms/locale/sv.po index 22de7537..fa61fc54 100644 --- a/lms/locale/sv.po +++ b/lms/locale/sv.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: frappe\n" "Report-Msgid-Bugs-To: jannat@frappe.io\n" -"POT-Creation-Date: 2025-01-24 16:04+0000\n" -"PO-Revision-Date: 2025-02-09 16:12\n" +"POT-Creation-Date: 2025-02-07 16:03+0000\n" +"PO-Revision-Date: 2025-02-10 16:09\n" "Last-Translator: jannat@frappe.io\n" "Language-Team: Swedish\n" "MIME-Version: 1.0\n" @@ -240,6 +240,11 @@ msgstr "Alla Godkännande" msgid "All questions should have the same marks if the limit is set." msgstr "Alla frågor ska ha samma märken om gräns är angiven." +#. Label of the allow_guest_access (Check) field in DocType 'LMS Settings' +#: lms/lms/doctype/lms_settings/lms_settings.json +msgid "Allow Guest Access" +msgstr "Tillåt Gäst Åtkomst" + #. Label of the allow_posting (Check) field in DocType 'Job Settings' #: lms/job/doctype/job_settings/job_settings.json msgid "Allow Job Posting From Website" @@ -1214,6 +1219,7 @@ msgstr "Kursinnehåll" #. Name of a role #: frontend/src/pages/ProfileRoles.vue:16 +#: lms/lms/doctype/course_chapter/course_chapter.json #: lms/lms/doctype/lms_course/lms_course.json #: lms/lms/doctype/lms_program/lms_program.json #: lms/lms/doctype/lms_question/lms_question.json @@ -1340,7 +1346,7 @@ msgstr "Klara Kurser" msgid "Courses Mentored" msgstr "Kurser Mentorerade" -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 msgid "Courses deleted successfully" msgstr "Kurser borttagna" @@ -4917,7 +4923,7 @@ msgid "Submitted {0}" msgstr "Inskickad {0}" #: frontend/src/components/Assignment.vue:316 -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 #: frontend/src/components/BatchOverlay.vue:135 #: frontend/src/components/BatchStudents.vue:302 #: frontend/src/components/CourseCardOverlay.vue:165 From cb2dc3e6452c93e7907b7a9ed8c4e1f9335ca042 Mon Sep 17 00:00:00 2001 From: Jannat Patel <31363128+pateljannat@users.noreply.github.com> Date: Mon, 10 Feb 2025 21:39:09 +0530 Subject: [PATCH 09/16] chore: Turkish translations --- lms/locale/tr.po | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lms/locale/tr.po b/lms/locale/tr.po index e086767c..ccad300a 100644 --- a/lms/locale/tr.po +++ b/lms/locale/tr.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: frappe\n" "Report-Msgid-Bugs-To: jannat@frappe.io\n" -"POT-Creation-Date: 2025-01-24 16:04+0000\n" -"PO-Revision-Date: 2025-01-28 12:17\n" +"POT-Creation-Date: 2025-02-07 16:03+0000\n" +"PO-Revision-Date: 2025-02-10 16:09\n" "Last-Translator: jannat@frappe.io\n" "Language-Team: Turkish\n" "MIME-Version: 1.0\n" @@ -240,6 +240,11 @@ msgstr "Tüm Gönderiler" msgid "All questions should have the same marks if the limit is set." msgstr "Eğer bir sınır konulmuşsa tüm soruların puanları aynı olmalıdır." +#. Label of the allow_guest_access (Check) field in DocType 'LMS Settings' +#: lms/lms/doctype/lms_settings/lms_settings.json +msgid "Allow Guest Access" +msgstr "" + #. Label of the allow_posting (Check) field in DocType 'Job Settings' #: lms/job/doctype/job_settings/job_settings.json msgid "Allow Job Posting From Website" @@ -523,7 +528,7 @@ msgstr "Rozet Resmi" #: lms/lms/doctype/lms_certificate_request/lms_certificate_request.json #: lms/lms/doctype/lms_live_class/lms_live_class.json msgid "Batch" -msgstr "Toplu İşlem" +msgstr "Parti" #. Label of the batch_confirmation_template (Link) field in DocType 'LMS #. Settings' @@ -1214,6 +1219,7 @@ msgstr "Kurs İçeriği" #. Name of a role #: frontend/src/pages/ProfileRoles.vue:16 +#: lms/lms/doctype/course_chapter/course_chapter.json #: lms/lms/doctype/lms_course/lms_course.json #: lms/lms/doctype/lms_program/lms_program.json #: lms/lms/doctype/lms_question/lms_question.json @@ -1340,7 +1346,7 @@ msgstr "Tamamlanan Kurslar" msgid "Courses Mentored" msgstr "Mentorluk Yapılan Kurslar" -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 msgid "Courses deleted successfully" msgstr "Kurslar başarıyla silindi" @@ -4917,7 +4923,7 @@ msgid "Submitted {0}" msgstr "Kaydedildi {0}" #: frontend/src/components/Assignment.vue:316 -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 #: frontend/src/components/BatchOverlay.vue:135 #: frontend/src/components/BatchStudents.vue:302 #: frontend/src/components/CourseCardOverlay.vue:165 From 05be628afb39447e1cfa3e19bc44662e553020c8 Mon Sep 17 00:00:00 2001 From: Jannat Patel <31363128+pateljannat@users.noreply.github.com> Date: Mon, 10 Feb 2025 21:39:10 +0530 Subject: [PATCH 10/16] chore: Chinese Simplified translations --- lms/locale/zh.po | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lms/locale/zh.po b/lms/locale/zh.po index 814e096d..766432a0 100644 --- a/lms/locale/zh.po +++ b/lms/locale/zh.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: frappe\n" "Report-Msgid-Bugs-To: jannat@frappe.io\n" -"POT-Creation-Date: 2025-01-24 16:04+0000\n" -"PO-Revision-Date: 2025-01-28 12:17\n" +"POT-Creation-Date: 2025-02-07 16:03+0000\n" +"PO-Revision-Date: 2025-02-10 16:09\n" "Last-Translator: jannat@frappe.io\n" "Language-Team: Chinese Simplified\n" "MIME-Version: 1.0\n" @@ -240,6 +240,11 @@ msgstr "" msgid "All questions should have the same marks if the limit is set." msgstr "" +#. Label of the allow_guest_access (Check) field in DocType 'LMS Settings' +#: lms/lms/doctype/lms_settings/lms_settings.json +msgid "Allow Guest Access" +msgstr "" + #. Label of the allow_posting (Check) field in DocType 'Job Settings' #: lms/job/doctype/job_settings/job_settings.json msgid "Allow Job Posting From Website" @@ -1214,6 +1219,7 @@ msgstr "" #. Name of a role #: frontend/src/pages/ProfileRoles.vue:16 +#: lms/lms/doctype/course_chapter/course_chapter.json #: lms/lms/doctype/lms_course/lms_course.json #: lms/lms/doctype/lms_program/lms_program.json #: lms/lms/doctype/lms_question/lms_question.json @@ -1340,7 +1346,7 @@ msgstr "" msgid "Courses Mentored" msgstr "" -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 msgid "Courses deleted successfully" msgstr "" @@ -4917,7 +4923,7 @@ msgid "Submitted {0}" msgstr "" #: frontend/src/components/Assignment.vue:316 -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 #: frontend/src/components/BatchOverlay.vue:135 #: frontend/src/components/BatchStudents.vue:302 #: frontend/src/components/CourseCardOverlay.vue:165 From 03c0c3c821b5c673cbc65809a26a618c8fc78db3 Mon Sep 17 00:00:00 2001 From: Jannat Patel <31363128+pateljannat@users.noreply.github.com> Date: Mon, 10 Feb 2025 21:39:12 +0530 Subject: [PATCH 11/16] chore: Persian translations --- lms/locale/fa.po | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lms/locale/fa.po b/lms/locale/fa.po index fb7cff7d..9eee167f 100644 --- a/lms/locale/fa.po +++ b/lms/locale/fa.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: frappe\n" "Report-Msgid-Bugs-To: jannat@frappe.io\n" -"POT-Creation-Date: 2025-01-24 16:04+0000\n" -"PO-Revision-Date: 2025-02-08 16:11\n" +"POT-Creation-Date: 2025-02-07 16:03+0000\n" +"PO-Revision-Date: 2025-02-10 16:09\n" "Last-Translator: jannat@frappe.io\n" "Language-Team: Persian\n" "MIME-Version: 1.0\n" @@ -240,6 +240,11 @@ msgstr "همه موارد ارسالی" msgid "All questions should have the same marks if the limit is set." msgstr "در صورت تعیین حد مجاز، همه سؤالات باید نمرات یکسانی داشته باشند." +#. Label of the allow_guest_access (Check) field in DocType 'LMS Settings' +#: lms/lms/doctype/lms_settings/lms_settings.json +msgid "Allow Guest Access" +msgstr "" + #. Label of the allow_posting (Check) field in DocType 'Job Settings' #: lms/job/doctype/job_settings/job_settings.json msgid "Allow Job Posting From Website" @@ -1214,6 +1219,7 @@ msgstr "محتوای دوره" #. Name of a role #: frontend/src/pages/ProfileRoles.vue:16 +#: lms/lms/doctype/course_chapter/course_chapter.json #: lms/lms/doctype/lms_course/lms_course.json #: lms/lms/doctype/lms_program/lms_program.json #: lms/lms/doctype/lms_question/lms_question.json @@ -1340,7 +1346,7 @@ msgstr "دوره‌های گذرانده شده" msgid "Courses Mentored" msgstr "" -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 msgid "Courses deleted successfully" msgstr "" @@ -4917,7 +4923,7 @@ msgid "Submitted {0}" msgstr "" #: frontend/src/components/Assignment.vue:316 -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 #: frontend/src/components/BatchOverlay.vue:135 #: frontend/src/components/BatchStudents.vue:302 #: frontend/src/components/CourseCardOverlay.vue:165 From 533d9545de558083f0748ff5e20fa87fb69c4589 Mon Sep 17 00:00:00 2001 From: Jannat Patel <31363128+pateljannat@users.noreply.github.com> Date: Mon, 10 Feb 2025 21:39:14 +0530 Subject: [PATCH 12/16] chore: Bosnian translations --- lms/locale/bs.po | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lms/locale/bs.po b/lms/locale/bs.po index ece8eeac..8f4a7a56 100644 --- a/lms/locale/bs.po +++ b/lms/locale/bs.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: frappe\n" "Report-Msgid-Bugs-To: jannat@frappe.io\n" -"POT-Creation-Date: 2025-01-24 16:04+0000\n" -"PO-Revision-Date: 2025-02-09 16:12\n" +"POT-Creation-Date: 2025-02-07 16:03+0000\n" +"PO-Revision-Date: 2025-02-10 16:09\n" "Last-Translator: jannat@frappe.io\n" "Language-Team: Bosnian\n" "MIME-Version: 1.0\n" @@ -240,6 +240,11 @@ msgstr "Svi podnesci" msgid "All questions should have the same marks if the limit is set." msgstr "" +#. Label of the allow_guest_access (Check) field in DocType 'LMS Settings' +#: lms/lms/doctype/lms_settings/lms_settings.json +msgid "Allow Guest Access" +msgstr "" + #. Label of the allow_posting (Check) field in DocType 'Job Settings' #: lms/job/doctype/job_settings/job_settings.json msgid "Allow Job Posting From Website" @@ -1214,6 +1219,7 @@ msgstr "" #. Name of a role #: frontend/src/pages/ProfileRoles.vue:16 +#: lms/lms/doctype/course_chapter/course_chapter.json #: lms/lms/doctype/lms_course/lms_course.json #: lms/lms/doctype/lms_program/lms_program.json #: lms/lms/doctype/lms_question/lms_question.json @@ -1340,7 +1346,7 @@ msgstr "" msgid "Courses Mentored" msgstr "" -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 msgid "Courses deleted successfully" msgstr "Kursevi su uspješno izbrisani" @@ -4917,7 +4923,7 @@ msgid "Submitted {0}" msgstr "" #: frontend/src/components/Assignment.vue:316 -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 #: frontend/src/components/BatchOverlay.vue:135 #: frontend/src/components/BatchStudents.vue:302 #: frontend/src/components/CourseCardOverlay.vue:165 @@ -5193,7 +5199,7 @@ msgstr "" #: lms/lms/doctype/evaluator_schedule/evaluator_schedule.json #: lms/lms/doctype/lms_certificate_request/lms_certificate_request.json msgid "Thursday" -msgstr "" +msgstr "Četvrtak" #. Label of the time (Time) field in DocType 'LMS Live Class' #: frontend/src/components/Modals/Event.vue:48 From e24d22c3487b7bcddce8c0eb31734706cc09b4da Mon Sep 17 00:00:00 2001 From: Jannat Patel <31363128+pateljannat@users.noreply.github.com> Date: Mon, 10 Feb 2025 21:39:15 +0530 Subject: [PATCH 13/16] chore: Esperanto translations --- lms/locale/eo.po | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lms/locale/eo.po b/lms/locale/eo.po index 9524d5b0..ed735b93 100644 --- a/lms/locale/eo.po +++ b/lms/locale/eo.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: frappe\n" "Report-Msgid-Bugs-To: jannat@frappe.io\n" -"POT-Creation-Date: 2025-01-24 16:04+0000\n" -"PO-Revision-Date: 2025-01-28 12:17\n" +"POT-Creation-Date: 2025-02-07 16:03+0000\n" +"PO-Revision-Date: 2025-02-10 16:09\n" "Last-Translator: jannat@frappe.io\n" "Language-Team: Esperanto\n" "MIME-Version: 1.0\n" @@ -240,6 +240,11 @@ msgstr "crwdns149254:0crwdne149254:0" msgid "All questions should have the same marks if the limit is set." msgstr "crwdns149256:0crwdne149256:0" +#. Label of the allow_guest_access (Check) field in DocType 'LMS Settings' +#: lms/lms/doctype/lms_settings/lms_settings.json +msgid "Allow Guest Access" +msgstr "crwdns152392:0crwdne152392:0" + #. Label of the allow_posting (Check) field in DocType 'Job Settings' #: lms/job/doctype/job_settings/job_settings.json msgid "Allow Job Posting From Website" @@ -1214,6 +1219,7 @@ msgstr "crwdns149562:0crwdne149562:0" #. Name of a role #: frontend/src/pages/ProfileRoles.vue:16 +#: lms/lms/doctype/course_chapter/course_chapter.json #: lms/lms/doctype/lms_course/lms_course.json #: lms/lms/doctype/lms_program/lms_program.json #: lms/lms/doctype/lms_question/lms_question.json @@ -1340,7 +1346,7 @@ msgstr "crwdns149600:0crwdne149600:0" msgid "Courses Mentored" msgstr "crwdns149602:0crwdne149602:0" -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 msgid "Courses deleted successfully" msgstr "crwdns149604:0crwdne149604:0" @@ -4917,7 +4923,7 @@ msgid "Submitted {0}" msgstr "crwdns150766:0{0}crwdne150766:0" #: frontend/src/components/Assignment.vue:316 -#: frontend/src/components/BatchCourses.vue:150 +#: frontend/src/components/BatchCourses.vue:151 #: frontend/src/components/BatchOverlay.vue:135 #: frontend/src/components/BatchStudents.vue:302 #: frontend/src/components/CourseCardOverlay.vue:165 From f43331967cfabf4038921dd7c65125684c809a48 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Tue, 11 Feb 2025 13:28:49 +0530 Subject: [PATCH 14/16] fix: misc batch enrollment issues --- frontend/src/components/BatchStudents.vue | 2 +- frontend/src/components/Quiz.vue | 3 + frontend/src/pages/ProfileCertificates.vue | 2 +- lms/hooks.py | 5 +- lms/lms/doctype/batch_student/__init__.py | 0 .../doctype/batch_student/batch_student.js | 7 -- .../doctype/batch_student/batch_student.json | 83 -------------- .../doctype/batch_student/batch_student.py | 9 -- .../batch_student/test_batch_student.py | 9 -- .../lms_batch_enrollment.js | 22 +++- .../lms_batch_enrollment.py | 103 ++++++++++-------- lms/lms/doctype/lms_payment/lms_payment.py | 71 +++++++++++- .../doctype/lms_settings/lms_settings.json | 11 +- .../payment_completion_reminder/__init__.py | 0 .../payment_completion_reminder.html | 11 -- .../payment_completion_reminder.json | 35 ------ .../payment_completion_reminder.md | 1 - .../payment_completion_reminder.py | 6 - .../payment_completion_reminder.txt | 11 -- lms/lms/utils.py | 34 ++++-- lms/patches.txt | 3 +- .../v2_0/delete_old_enrollment_doctypes.py | 6 + lms/templates/emails/payment_reminder.html | 19 ++++ 23 files changed, 214 insertions(+), 239 deletions(-) delete mode 100644 lms/lms/doctype/batch_student/__init__.py delete mode 100644 lms/lms/doctype/batch_student/batch_student.js delete mode 100644 lms/lms/doctype/batch_student/batch_student.json delete mode 100644 lms/lms/doctype/batch_student/batch_student.py delete mode 100644 lms/lms/doctype/batch_student/test_batch_student.py delete mode 100644 lms/lms/notification/payment_completion_reminder/__init__.py delete mode 100644 lms/lms/notification/payment_completion_reminder/payment_completion_reminder.html delete mode 100644 lms/lms/notification/payment_completion_reminder/payment_completion_reminder.json delete mode 100644 lms/lms/notification/payment_completion_reminder/payment_completion_reminder.md delete mode 100644 lms/lms/notification/payment_completion_reminder/payment_completion_reminder.py delete mode 100644 lms/lms/notification/payment_completion_reminder/payment_completion_reminder.txt create mode 100644 lms/patches/v2_0/delete_old_enrollment_doctypes.py create mode 100644 lms/templates/emails/payment_reminder.html diff --git a/frontend/src/components/BatchStudents.vue b/frontend/src/components/BatchStudents.vue index 18a1ed92..c061c7cd 100644 --- a/frontend/src/components/BatchStudents.vue +++ b/frontend/src/components/BatchStudents.vue @@ -333,7 +333,7 @@ const getChartData = () => { }) Object.keys(student.assessments).forEach((assessment) => { - if (student.assessments[assessment] === 100) { + if (student.assessments[assessment].result === 'Passed') { categories[assessment].value += 1 } }) diff --git a/frontend/src/components/Quiz.vue b/frontend/src/components/Quiz.vue index b8a4b743..62f0bdf7 100644 --- a/frontend/src/components/Quiz.vue +++ b/frontend/src/components/Quiz.vue @@ -316,6 +316,9 @@ const quiz = createResource({ }, cache: ['quiz', props.quizName], auto: true, + transform(data) { + data.duration = parseInt(data.duration) + }, onSuccess(data) { populateQuestions() setupTimer() diff --git a/frontend/src/pages/ProfileCertificates.vue b/frontend/src/pages/ProfileCertificates.vue index a8863fd2..3213f70e 100644 --- a/frontend/src/pages/ProfileCertificates.vue +++ b/frontend/src/pages/ProfileCertificates.vue @@ -44,7 +44,7 @@ const certificates = createListResource({ filters: { member: props.profile.data?.name, }, - fields: ['name', 'course_title', 'batch_title', 'issue_date'], + fields: ['name', 'course_title', 'batch_title', 'issue_date', 'template'], cache: ['certificates', props.profile.data?.name], }) diff --git a/lms/hooks.py b/lms/hooks.py index b00d4b93..e1ec5c55 100644 --- a/lms/hooks.py +++ b/lms/hooks.py @@ -113,7 +113,10 @@ scheduler_events = { "lms.lms.doctype.lms_certificate_request.lms_certificate_request.schedule_evals", "lms.lms.api.update_course_statistics", ], - "daily": ["lms.job.doctype.job_opportunity.job_opportunity.update_job_openings"], + "daily": [ + "lms.job.doctype.job_opportunity.job_opportunity.update_job_openings", + "lms.lms.doctype.lms_payment.lms_payment.send_payment_reminder", + ], } fixtures = ["Custom Field", "Function", "Industry", "LMS Category"] diff --git a/lms/lms/doctype/batch_student/__init__.py b/lms/lms/doctype/batch_student/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/lms/lms/doctype/batch_student/batch_student.js b/lms/lms/doctype/batch_student/batch_student.js deleted file mode 100644 index 680bc334..00000000 --- a/lms/lms/doctype/batch_student/batch_student.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) 2022, Frappe and contributors -// For license information, please see license.txt - -frappe.ui.form.on("Batch Student", { - // refresh: function(frm) { - // } -}); diff --git a/lms/lms/doctype/batch_student/batch_student.json b/lms/lms/doctype/batch_student/batch_student.json deleted file mode 100644 index bdd5338e..00000000 --- a/lms/lms/doctype/batch_student/batch_student.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2022-11-09 16:20:44.602545", - "default_view": "List", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "student_details_section", - "student", - "student_name", - "username", - "column_break_oduu", - "payment", - "source", - "confirmation_email_sent" - ], - "fields": [ - { - "fieldname": "student", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Student", - "options": "User", - "reqd": 1 - }, - { - "fetch_from": "student.full_name", - "fieldname": "student_name", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Student Name", - "read_only": 1 - }, - { - "fetch_from": "student.username", - "fieldname": "username", - "fieldtype": "Data", - "label": "Username", - "read_only": 1 - }, - { - "fieldname": "student_details_section", - "fieldtype": "Section Break", - "label": "Student Details" - }, - { - "fieldname": "column_break_oduu", - "fieldtype": "Column Break" - }, - { - "fieldname": "payment", - "fieldtype": "Link", - "label": "Payment", - "options": "LMS Payment" - }, - { - "default": "0", - "fieldname": "confirmation_email_sent", - "fieldtype": "Check", - "label": "Confirmation Email Sent" - }, - { - "fieldname": "source", - "fieldtype": "Link", - "label": "Source", - "options": "LMS Source" - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2023-10-26 16:52:04.266694", - "modified_by": "Administrator", - "module": "LMS", - "name": "Batch Student", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/lms/lms/doctype/batch_student/batch_student.py b/lms/lms/doctype/batch_student/batch_student.py deleted file mode 100644 index 002a6f61..00000000 --- a/lms/lms/doctype/batch_student/batch_student.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2022, Frappe and contributors -# For license information, please see license.txt - -import frappe -from frappe.model.document import Document - - -class BatchStudent(Document): - pass diff --git a/lms/lms/doctype/batch_student/test_batch_student.py b/lms/lms/doctype/batch_student/test_batch_student.py deleted file mode 100644 index 8a5e8bb1..00000000 --- a/lms/lms/doctype/batch_student/test_batch_student.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2022, Frappe and Contributors -# See license.txt - -# import frappe -from frappe.tests import UnitTestCase - - -class TestBatchStudent(UnitTestCase): - pass diff --git a/lms/lms/doctype/lms_batch_enrollment/lms_batch_enrollment.js b/lms/lms/doctype/lms_batch_enrollment/lms_batch_enrollment.js index eca910fc..fb8d174e 100644 --- a/lms/lms/doctype/lms_batch_enrollment/lms_batch_enrollment.js +++ b/lms/lms/doctype/lms_batch_enrollment/lms_batch_enrollment.js @@ -1,8 +1,20 @@ // Copyright (c) 2025, Frappe and contributors // For license information, please see license.txt -// frappe.ui.form.on("LMS Batch Enrollment", { -// refresh(frm) { - -// }, -// }); +frappe.ui.form.on("LMS Batch Enrollment", { + refresh(frm) { + if (!frm.doc.confirmation_email_sent) { + frm.add_custom_button(__("Send Confirmation Email"), function () { + frappe.call({ + method: "lms.lms.doctype.lms_batch_enrollment.lms_batch_enrollment.send_confirmation_email", + args: { + doc: frm.doc, + }, + callback: function (r) { + frm.refresh(); + }, + }); + }); + } + }, +}); diff --git a/lms/lms/doctype/lms_batch_enrollment/lms_batch_enrollment.py b/lms/lms/doctype/lms_batch_enrollment/lms_batch_enrollment.py index 2ca34f9f..7049a104 100644 --- a/lms/lms/doctype/lms_batch_enrollment/lms_batch_enrollment.py +++ b/lms/lms/doctype/lms_batch_enrollment/lms_batch_enrollment.py @@ -2,6 +2,7 @@ # For license information, please see license.txt import frappe +import json from frappe import _ from frappe.model.document import Document from frappe.email.doctype.email_template.email_template import get_email_template @@ -9,7 +10,7 @@ from frappe.email.doctype.email_template.email_template import get_email_templat class LMSBatchEnrollment(Document): def after_insert(self): - self.send_confirmation_email() + send_confirmation_email(self) self.add_member_to_live_class() def validate(self): @@ -37,53 +38,6 @@ class LMSBatchEnrollment(Document): enrollment.member = self.member enrollment.save() - def send_confirmation_email(self): - if not self.confirmation_email_sent: - outgoing_email_account = frappe.get_cached_value( - "Email Account", {"default_outgoing": 1, "enable_outgoing": 1}, "name" - ) - if not self.confirmation_email_sent and ( - outgoing_email_account or frappe.conf.get("mail_login") - ): - self.send_mail() - self.db_set("confirmation_email_sent", 1) - - def send_mail(self): - subject = _("Enrollment Confirmation for the Next Training Batch") - template = "batch_confirmation" - custom_template = frappe.db.get_single_value( - "LMS Settings", "batch_confirmation_template" - ) - batch = frappe.db.get_value( - "LMS Batch", - self.batch, - ["name", "title", "start_date", "start_time", "medium"], - as_dict=1, - ) - args = { - "title": batch.title, - "student_name": self.member_name, - "start_time": batch.start_time, - "start_date": batch.start_date, - "medium": batch.medium, - "name": batch.name, - } - - if custom_template: - email_template = get_email_template(custom_template, args) - subject = email_template.get("subject") - content = email_template.get("message") - - frappe.sendmail( - recipients=self.member, - subject=subject, - template=template if not custom_template else None, - content=content if custom_template else None, - args=args, - header=[subject, "green"], - retry=3, - ) - def add_member_to_live_class(self): live_classes = frappe.get_all( "LMS Live Class", {"batch_name": self.batch}, ["name", "event"] @@ -102,3 +56,56 @@ class LMSBatchEnrollment(Document): "parentfield": "event_participants", } ).save() + + +@frappe.whitelist() +def send_confirmation_email(doc): + if isinstance(doc, str): + doc = frappe._dict(json.loads(doc)) + + if not doc.confirmation_email_sent: + outgoing_email_account = frappe.get_cached_value( + "Email Account", {"default_outgoing": 1, "enable_outgoing": 1}, "name" + ) + if not doc.confirmation_email_sent and ( + outgoing_email_account or frappe.conf.get("mail_login") + ): + doc.send_mail() + doc.db_set("confirmation_email_sent", 1) + + +def send_mail(doc): + subject = _("Enrollment Confirmation for the Next Training Batch") + template = "batch_confirmation" + custom_template = frappe.db.get_single_value( + "LMS Settings", "batch_confirmation_template" + ) + batch = frappe.db.get_value( + "LMS Batch", + doc.batch, + ["name", "title", "start_date", "start_time", "medium"], + as_dict=1, + ) + args = { + "title": batch.title, + "student_name": doc.member_name, + "start_time": batch.start_time, + "start_date": batch.start_date, + "medium": batch.medium, + "name": batch.name, + } + + if custom_template: + email_template = get_email_template(custom_template, args) + subject = email_template.get("subject") + content = email_template.get("message") + + frappe.sendmail( + recipients=doc.member, + subject=subject, + template=template if not custom_template else None, + content=content if custom_template else None, + args=args, + header=[subject, "green"], + retry=3, + ) diff --git a/lms/lms/doctype/lms_payment/lms_payment.py b/lms/lms/doctype/lms_payment/lms_payment.py index a250fd99..d8e25f77 100644 --- a/lms/lms/doctype/lms_payment/lms_payment.py +++ b/lms/lms/doctype/lms_payment/lms_payment.py @@ -1,9 +1,78 @@ # Copyright (c) 2023, Frappe and contributors # For license information, please see license.txt -# import frappe +import frappe +from frappe import _ +from frappe.utils import add_days, nowdate +from frappe.email.doctype.email_template.email_template import get_email_template from frappe.model.document import Document class LMSPayment(Document): pass + + +def send_payment_reminder(): + outgoing_email_account = frappe.get_cached_value( + "Email Account", {"default_outgoing": 1, "enable_outgoing": 1}, "name" + ) + + if not (outgoing_email_account or frappe.conf.get("mail_login")): + return + + incomplete_payments = frappe.get_all( + "LMS Payment", + {"payment_received": 0, "creation": [">", add_days(nowdate(), -1)]}, + fields=[ + "name", + "member", + "payment_for_document", + "payment_for_document_type", + "billing_name", + ], + ) + + for payment in incomplete_payments: + send_mail(payment) + + +def send_mail(payment): + subject = _(" Complete Your Enrollment - Don't miss out!") + template = "payment_reminder" + custom_template = frappe.db.get_single_value( + "LMS Settings", "payment_reminder_template" + ) + + args = { + "billing_name": payment.billing_name, + "type": payment.payment_for_document_type.split(" ")[-1].lower(), + "title": frappe.db.get_value( + payment.payment_for_document_type, payment.payment_for_document, "title" + ), + "link": f"/lms/billing/{ payment.payment_for_document_type.split(' ')[-1].lower() }/{ payment.payment_for_document }", + } + + if custom_template: + email_template = get_email_template(custom_template, args) + subject = email_template.get("subject") + content = email_template.get("message") + + instructors = frappe.get_all( + "Course Instructor", + { + "parenttype": payment.payment_for_document_type, + "parent": payment.payment_for_document, + }, + pluck="instructor", + ) + + frappe.sendmail( + recipients=payment.member, + cc=instructors, + subject=subject, + template=template if not custom_template else None, + content=content if custom_template else None, + args=args, + header=[subject, "green"], + retry=3, + ) diff --git a/lms/lms/doctype/lms_settings/lms_settings.json b/lms/lms/doctype/lms_settings/lms_settings.json index 86252fa1..8f7d3be2 100644 --- a/lms/lms/doctype/lms_settings/lms_settings.json +++ b/lms/lms/doctype/lms_settings/lms_settings.json @@ -58,7 +58,8 @@ "certification_template", "batch_confirmation_template", "column_break_uwsp", - "assignment_submission_template" + "assignment_submission_template", + "payment_reminder_template" ], "fields": [ { @@ -358,12 +359,18 @@ "fieldname": "allow_guest_access", "fieldtype": "Check", "label": "Allow Guest Access" + }, + { + "fieldname": "payment_reminder_template", + "fieldtype": "Link", + "label": "Payment Reminder Template", + "options": "Email Template" } ], "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2025-02-06 11:42:29.803207", + "modified": "2025-02-11 11:29:43.412897", "modified_by": "Administrator", "module": "LMS", "name": "LMS Settings", diff --git a/lms/lms/notification/payment_completion_reminder/__init__.py b/lms/lms/notification/payment_completion_reminder/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/lms/lms/notification/payment_completion_reminder/payment_completion_reminder.html b/lms/lms/notification/payment_completion_reminder/payment_completion_reminder.html deleted file mode 100644 index 179e4856..00000000 --- a/lms/lms/notification/payment_completion_reminder/payment_completion_reminder.html +++ /dev/null @@ -1,11 +0,0 @@ -
-

Hi {{ doc.member_name }},

-

We noticed that you started enrolling in the {{ doc.payment_for_document_type.split(" ")[-1] }} {{ frappe.db.get_value(doc.payment_for_document_type, doc.payment_for_document, "title") }} but didn’t complete your payment.

-

We have a limited number of seats, and they won't be available for long!

-

Don’t miss this opportunity to enhance your skills. Click below to complete your enrollment:

-

- 👉 Complete Your Enrollment -

-

If you have any questions or need assistance, feel free to reach out to our support team.

-

Looking forward to seeing you enrolled!

-
\ No newline at end of file diff --git a/lms/lms/notification/payment_completion_reminder/payment_completion_reminder.json b/lms/lms/notification/payment_completion_reminder/payment_completion_reminder.json deleted file mode 100644 index 26860544..00000000 --- a/lms/lms/notification/payment_completion_reminder/payment_completion_reminder.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "attach_print": 0, - "channel": "Email", - "condition": "doc.payment_received == 0", - "creation": "2025-02-03 15:52:32.508093", - "date_changed": "creation", - "days_in_advance": 1, - "docstatus": 0, - "doctype": "Notification", - "document_type": "LMS Payment", - "enabled": 1, - "event": "Days After", - "idx": 0, - "is_standard": 1, - "message": "
\n

Hi {{ doc.member_name }},

\n

We noticed that you started enrolling in the {{ doc.payment_for_document_type.split(\" \")[-1] }} {{ frappe.db.get_value(doc.payment_for_document_type, doc.payment_for_document, \"title\") }} but didn\u2019t complete your payment.

\n

We have a limited number of seats, and they won't be available for long!

\n

Don\u2019t miss this opportunity to enhance your skills. Click below to complete your enrollment:

\n

\n \ud83d\udc49 Complete Your Enrollment\n

\n

If you have any questions or need assistance, feel free to reach out to our support team.

\n

Looking forward to seeing you enrolled!

\n
", - "message_type": "HTML", - "minutes_offset": 0, - "modified": "2025-02-03 16:14:24.568958", - "modified_by": "sayali@frappe.io", - "module": "LMS", - "name": "Payment Completion Reminder", - "owner": "sayali@frappe.io", - "recipients": [ - { - "receiver_by_document_field": "member" - }, - { - "cc": "", - "receiver_by_role": "Moderator" - } - ], - "send_system_notification": 0, - "send_to_all_assignees": 0, - "subject": " Complete Your Enrollment - Don't miss out!" -} \ No newline at end of file diff --git a/lms/lms/notification/payment_completion_reminder/payment_completion_reminder.md b/lms/lms/notification/payment_completion_reminder/payment_completion_reminder.md deleted file mode 100644 index f96f7f9a..00000000 --- a/lms/lms/notification/payment_completion_reminder/payment_completion_reminder.md +++ /dev/null @@ -1 +0,0 @@ -

Add your message here

diff --git a/lms/lms/notification/payment_completion_reminder/payment_completion_reminder.py b/lms/lms/notification/payment_completion_reminder/payment_completion_reminder.py deleted file mode 100644 index 80b7b873..00000000 --- a/lms/lms/notification/payment_completion_reminder/payment_completion_reminder.py +++ /dev/null @@ -1,6 +0,0 @@ -import frappe - - -def get_context(context): - # do your magic here - pass diff --git a/lms/lms/notification/payment_completion_reminder/payment_completion_reminder.txt b/lms/lms/notification/payment_completion_reminder/payment_completion_reminder.txt deleted file mode 100644 index 28e1c47e..00000000 --- a/lms/lms/notification/payment_completion_reminder/payment_completion_reminder.txt +++ /dev/null @@ -1,11 +0,0 @@ -Hi {{ doc.member_name }}, - -We noticed that you started enrolling in the {{ doc.payment_for_document_type.split(" ")[-1] }} {{ frappe.db.get_value(doc.payment_for_document_type, doc.payment_for_document, "title") }} but didn’t complete your payment. We have limited number of seats and they won't be empty for long. - -Don’t miss this opportunity to enhance your skills. Click below to complete your enrollment now: - -[👉 Complete Your Enrollment](/lms/billing/{{ doc.payment_for_document_type.split(" ")[-1].lower()/doc.payment_for_document }}) - -If you have any questions or need assistance, feel free to reach out to our support team. - -Looking forward to seeing you enrolled! diff --git a/lms/lms/utils.py b/lms/lms/utils.py index b8b1d5a9..c7a82860 100644 --- a/lms/lms/utils.py +++ b/lms/lms/utils.py @@ -1434,7 +1434,7 @@ def get_batch_students(batch): """ Iterate through courses and track their progress """ for course in batch_courses: progress = frappe.db.get_value( - "LMS Enrollment", {"course": course.course, "member": student.student}, "progress" + "LMS Enrollment", {"course": course.course, "member": student.member}, "progress" ) detail.courses[course.title] = progress if progress == 100: @@ -1445,11 +1445,12 @@ def get_batch_students(batch): title = frappe.db.get_value( assessment.assessment_type, assessment.assessment_name, "title" ) - status = has_submitted_assessment( - assessment.assessment_name, assessment.assessment_type, student.student + assessment_info = has_submitted_assessment( + assessment.assessment_name, assessment.assessment_type, student.member ) - detail.assessments[title] = status - if status not in ["Not Attempted", 0]: + detail.assessments[title] = assessment_info + + if assessment_info.result == "Passed": assessments_completed += 1 detail.courses_completed = courses_completed @@ -1493,9 +1494,28 @@ def has_submitted_assessment(assessment, assessment_type, member=None): attempt = frappe.db.exists(doctype, filters) if attempt: attempt_details = frappe.db.get_value(doctype, filters, fields) - return attempt_details + if assessment_type == "LMS Quiz": + result = "Failed" + passing_percentage = frappe.db.get_value( + "LMS Quiz", assessment, "passing_percentage" + ) + if attempt_details >= passing_percentage: + result = "Passed" + else: + result = attempt_details + return frappe._dict( + { + "status": attempt_details, + "result": result, + } + ) else: - return not_attempted + return frappe._dict( + { + "status": not_attempted, + "result": "Failed", + } + ) @frappe.whitelist() diff --git a/lms/patches.txt b/lms/patches.txt index d3f6ba5b..2fd46b79 100644 --- a/lms/patches.txt +++ b/lms/patches.txt @@ -98,4 +98,5 @@ lms.patches.v2_0.update_desk_access_for_lms_roles lms.patches.v2_0.update_quiz_submission_data lms.patches.v2_0.convert_quiz_duration_to_minutes lms.patches.v2_0.allow_guest_access #05-02-2025 -lms.patches.v2_0.migrate_batch_student_data #10-02-2025 \ No newline at end of file +lms.patches.v2_0.migrate_batch_student_data #10-02-2025 +lms.patches.v2_0.delete_old_enrollment_doctypes \ No newline at end of file diff --git a/lms/patches/v2_0/delete_old_enrollment_doctypes.py b/lms/patches/v2_0/delete_old_enrollment_doctypes.py new file mode 100644 index 00000000..8d694a90 --- /dev/null +++ b/lms/patches/v2_0/delete_old_enrollment_doctypes.py @@ -0,0 +1,6 @@ +import frappe + + +def execute(): + frappe.delete_doc("DocType", "Batch Student") + frappe.delete_doc("Notification", "Payment Completion Reminder") diff --git a/lms/templates/emails/payment_reminder.html b/lms/templates/emails/payment_reminder.html new file mode 100644 index 00000000..dd2847be --- /dev/null +++ b/lms/templates/emails/payment_reminder.html @@ -0,0 +1,19 @@ +
+

{{ _('Hi') }} {{ billing_name }},

+

{{ _('We noticed that you started enrolling in the') }} {{ type }} {{ title }} {{ _('but didn’t complete your payment') }}.

+

+ {{ _("We have a limited number of seats, and they won't be available for long!")}} +

+

+ {{ _("Don’t miss this opportunity to enhance your skills. Click below to complete your enrollment") }}: +

+

+ 👉 Complete Your Enrollment +

+

+ {{ _("If you have any questions or need assistance, feel free to reach out to our support team.") }} +

+

+ {{ __("Looking forward to seeing you enrolled!") }} +

+
\ No newline at end of file From 2ea73888f02ea555d083c4b055d77552076e254e Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Tue, 11 Feb 2025 14:49:04 +0530 Subject: [PATCH 15/16] fix: changed naming for LMS Payment --- lms/lms/doctype/lms_payment/lms_payment.json | 8 +++----- lms/lms/doctype/lms_payment/lms_payment.py | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lms/lms/doctype/lms_payment/lms_payment.json b/lms/lms/doctype/lms_payment/lms_payment.json index 786f3909..cdb3d751 100644 --- a/lms/lms/doctype/lms_payment/lms_payment.json +++ b/lms/lms/doctype/lms_payment/lms_payment.json @@ -1,19 +1,18 @@ { "actions": [], "allow_rename": 1, - "autoname": "format:PAY-{#####}", "creation": "2023-08-24 17:46:52.065763", "default_view": "List", "doctype": "DocType", "editable_grid": 1, "engine": "InnoDB", "field_order": [ - "payment_for_document_type", "member", + "billing_name", "source", "column_break_rqkd", + "payment_for_document_type", "payment_for_document", - "billing_name", "payment_received", "payment_details_section", "currency", @@ -141,11 +140,10 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2024-10-31 15:33:39.420366", + "modified": "2025-02-11 14:48:27.801895", "modified_by": "Administrator", "module": "LMS", "name": "LMS Payment", - "naming_rule": "Expression", "owner": "Administrator", "permissions": [ { diff --git a/lms/lms/doctype/lms_payment/lms_payment.py b/lms/lms/doctype/lms_payment/lms_payment.py index d8e25f77..5173a653 100644 --- a/lms/lms/doctype/lms_payment/lms_payment.py +++ b/lms/lms/doctype/lms_payment/lms_payment.py @@ -37,7 +37,7 @@ def send_payment_reminder(): def send_mail(payment): - subject = _(" Complete Your Enrollment - Don't miss out!") + subject = _("Complete Your Enrollment - Don't miss out!") template = "payment_reminder" custom_template = frappe.db.get_single_value( "LMS Settings", "payment_reminder_template" From b6cfcd797bb828b384ee0f16562c0703d3f8daf6 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Tue, 11 Feb 2025 14:55:44 +0530 Subject: [PATCH 16/16] fix: pluck only member for to validate batch course membership --- lms/lms/doctype/lms_batch/lms_batch.py | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/lms/lms/doctype/lms_batch/lms_batch.py b/lms/lms/doctype/lms_batch/lms_batch.py index 328ebdcd..22a0c2f6 100644 --- a/lms/lms/doctype/lms_batch/lms_batch.py +++ b/lms/lms/doctype/lms_batch/lms_batch.py @@ -41,16 +41,6 @@ class LMSBatch(Document): if self.end_date < self.start_date: frappe.throw(_("Batch end date cannot be before the batch start date")) - def validate_duplicate_students(self): - students = [row.student for row in self.students] - duplicates = {student for student in students if students.count(student) > 1} - if len(duplicates): - frappe.throw( - _("Student {0} has already been added to this batch.").format( - frappe.bold(next(iter(duplicates))) - ) - ) - def validate_duplicate_courses(self): courses = [row.course for row in self.courses] duplicates = {course for course in courses if courses.count(course) > 1} @@ -88,9 +78,7 @@ class LMSBatch(Document): frappe.throw(_("Evaluation end date cannot be less than the batch end date.")) def validate_membership(self): - members = frappe.get_all( - "LMS Batch Enrollment", filters={"batch": self.name}, pluck=["member"] - ) + members = frappe.get_all("LMS Batch Enrollment", {"batch": self.name}, pluck="member") for course in self.courses: for member in members: if not frappe.db.exists( @@ -102,7 +90,8 @@ class LMSBatch(Document): enrollment.save() def validate_seats_left(self): - if cint(self.seat_count) < len(self.students): + students = frappe.db.count("LMS Batch Enrollment", {"batch": self.name}) + if cint(self.seat_count) < students: frappe.throw(_("There are no seats available in this batch.")) def validate_timetable(self):