From 8defd664c5cd5a843d4eeb7d1baeed5c26bf42ef Mon Sep 17 00:00:00 2001 From: Sai Phanindra <29685411+ph4ni@users.noreply.github.com> Date: Sun, 24 Dec 2023 00:06:56 +0530 Subject: [PATCH 1/5] Added batch start and end date validation --- lms/lms/doctype/lms_batch/lms_batch.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lms/lms/doctype/lms_batch/lms_batch.py b/lms/lms/doctype/lms_batch/lms_batch.py index eb0065ab..3ca5c3fa 100644 --- a/lms/lms/doctype/lms_batch/lms_batch.py +++ b/lms/lms/doctype/lms_batch/lms_batch.py @@ -23,6 +23,7 @@ class LMSBatch(Document): def validate(self): if self.seat_count: self.validate_seats_left() + self.validate_batch_end_date(): self.validate_duplicate_courses() self.validate_duplicate_students() self.validate_duplicate_assessments() @@ -31,6 +32,10 @@ class LMSBatch(Document): self.send_confirmation_mail() self.validate_evaluation_end_date() + def validate_batch_end_date(self): + if(self.end_date 1} From 7389d080b6c0dc0b2a128afe09b33c1ffbfed416 Mon Sep 17 00:00:00 2001 From: Sai Phanindra <29685411+ph4ni@users.noreply.github.com> Date: Wed, 27 Dec 2023 11:28:48 +0530 Subject: [PATCH 2/5] Update lms_batch.py --- lms/lms/doctype/lms_batch/lms_batch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/lms/doctype/lms_batch/lms_batch.py b/lms/lms/doctype/lms_batch/lms_batch.py index 3ca5c3fa..fca3d52b 100644 --- a/lms/lms/doctype/lms_batch/lms_batch.py +++ b/lms/lms/doctype/lms_batch/lms_batch.py @@ -23,7 +23,7 @@ class LMSBatch(Document): def validate(self): if self.seat_count: self.validate_seats_left() - self.validate_batch_end_date(): + self.validate_batch_end_date() self.validate_duplicate_courses() self.validate_duplicate_students() self.validate_duplicate_assessments() From cbd5ae99691083789e4cf0d680244a8f0fe66a7d Mon Sep 17 00:00:00 2001 From: Sai Phanindra <29685411+ph4ni@users.noreply.github.com> Date: Wed, 27 Dec 2023 11:29:51 +0530 Subject: [PATCH 3/5] Update lms_batch.py --- lms/lms/doctype/lms_batch/lms_batch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/lms/doctype/lms_batch/lms_batch.py b/lms/lms/doctype/lms_batch/lms_batch.py index fca3d52b..679276a3 100644 --- a/lms/lms/doctype/lms_batch/lms_batch.py +++ b/lms/lms/doctype/lms_batch/lms_batch.py @@ -33,7 +33,7 @@ class LMSBatch(Document): self.validate_evaluation_end_date() def validate_batch_end_date(self): - if(self.end_date Date: Wed, 27 Dec 2023 11:31:17 +0530 Subject: [PATCH 4/5] Update lms_batch.py --- lms/lms/doctype/lms_batch/lms_batch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/lms/doctype/lms_batch/lms_batch.py b/lms/lms/doctype/lms_batch/lms_batch.py index 679276a3..293b3334 100644 --- a/lms/lms/doctype/lms_batch/lms_batch.py +++ b/lms/lms/doctype/lms_batch/lms_batch.py @@ -34,7 +34,7 @@ class LMSBatch(Document): def validate_batch_end_date(self): if(self.end_date < self.start_date): - frappe.throw("Batch end date cannot be before the batch 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] From 4f1f7c3fc0dca30a9b1fdcdc24713ec48a43471a Mon Sep 17 00:00:00 2001 From: ahmadRagheb Date: Thu, 8 Feb 2024 00:46:54 +0200 Subject: [PATCH 5/5] Update edit.html fix typo --- lms/www/batch/edit.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/www/batch/edit.html b/lms/www/batch/edit.html index b75ddbe1..941b3ab6 100644 --- a/lms/www/batch/edit.html +++ b/lms/www/batch/edit.html @@ -90,7 +90,7 @@ {{ _("Instructor Notes") }}
- {{ _("These notes will only be visible to the Course Creator, Course Evaluaor and Moderator.") }} + {{ _("These notes will only be visible to the Course Creator, Course Evaluator and Moderator.") }}