Suggested Changes to School (#6223)
* Linkage of academic term to academic year * School improvements. Modifications to Academic Term, Assessment, Fees, Student Batch, Student Group. Addition of Grading System. * Removed Grading System from Assessment and put it on Program * Removed the field Grading System from Program and added it back to Assessment. Added some validations for dates in controller of Academic Term and Academic Year * Added validation comparing term start dates with academic year start dates and term end dates with academic year end dates where both are available. * Renamed Grading System to Grading Structure. Implemented the code in Assessment.js to derive the Grade Code from the result entered for the student. Assumes that result is always a number. Will rename the field result in Results to score. * Added validation to check if any grade intervals were overlapping when a Grading Structure is being saved. * Corrections to error in autonaming for Academic Term * Correction in white_list method get_grade in Assessment. Solves problem with grades not being derived when the score is at the boundaries of a grade interval * Correction to setup_wizard.py to make sure that creation of academic terms in create_academic_term includes the academic_year which is now mandatory * Corrections to test_records.json for doctype Academic Term * Correction of test_records.json in doctype Student Groups * Correction of test_records.json for doctype Student Group 2 * Correction to test_course_schedule.py in doctype Course Schedule * More corrections to test_course_schedule.py in doctype Course Schedule * Corrections to test_course_schedule.py * Updates to Student DocType. Enrollment date, Nationality * Linkage of academic term to academic year * School improvements. Modifications to Academic Term, Assessment, Fees, Student Batch, Student Group. Addition of Grading System. * Removed Grading System from Assessment and put it on Program * Removed the field Grading System from Program and added it back to Assessment. Added some validations for dates in controller of Academic Term and Academic Year * Added validation comparing term start dates with academic year start dates and term end dates with academic year end dates where both are available. * Renamed Grading System to Grading Structure. Implemented the code in Assessment.js to derive the Grade Code from the result entered for the student. Assumes that result is always a number. Will rename the field result in Results to score. * Added validation to check if any grade intervals were overlapping when a Grading Structure is being saved. * Corrections to error in autonaming for Academic Term
This commit is contained in:
parent
23d79b7059
commit
b2b238323b
@ -120,6 +120,10 @@ def get_data():
|
|||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Course"
|
"name": "Course"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "Grading Structure"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Program"
|
"name": "Program"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "field:term_name",
|
"autoname": "field:title",
|
||||||
"beta": 0,
|
"beta": 0,
|
||||||
"creation": "2015-09-08 17:19:19.158228",
|
"creation": "2015-09-08 17:19:19.158228",
|
||||||
"custom": 0,
|
"custom": 0,
|
||||||
@ -11,6 +11,32 @@
|
|||||||
"document_type": "Setup",
|
"document_type": "Setup",
|
||||||
"editable_grid": 0,
|
"editable_grid": 0,
|
||||||
"fields": [
|
"fields": [
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "academic_year",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Academic Year",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Academic Year",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
@ -31,6 +57,81 @@
|
|||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "term_start_date",
|
||||||
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Term Start Date",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 1,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "term_end_date",
|
||||||
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Term End Date",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 1,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "title",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 1,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Title",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
@ -47,7 +148,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-07-25 05:24:23.032319",
|
"modified": "2016-08-27 23:02:03.565866",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Academic Term",
|
"name": "Academic Term",
|
||||||
@ -78,7 +179,8 @@
|
|||||||
"quick_entry": 1,
|
"quick_entry": 1,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
"sort_field": "modified",
|
"sort_field": "name",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
|
"title_field": "title",
|
||||||
"track_seen": 0
|
"track_seen": 0
|
||||||
}
|
}
|
@ -4,7 +4,35 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
from frappe import msgprint, _
|
||||||
|
from frappe.utils import get_datetime, get_datetime_str
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class AcademicTerm(Document):
|
class AcademicTerm(Document):
|
||||||
pass
|
def autoname(self):
|
||||||
|
self.name = self.academic_year + " ({})".format(self.term_name) if self.term_name else ""
|
||||||
|
|
||||||
|
def validate(self):
|
||||||
|
#Check if entry with same academic_year and the term_name already exists
|
||||||
|
validate_duplication(self)
|
||||||
|
self.title = self.academic_year + " ({})".format(self.term_name) if self.term_name else ""
|
||||||
|
|
||||||
|
#Check that start of academic year is earlier than end of academic year
|
||||||
|
if self.term_start_date and self.term_end_date and self.term_start_date > self.term_end_date:
|
||||||
|
frappe.throw(_("The Term End Date cannot be earlier than the Term Start Date. Please correct the dates and try again."))
|
||||||
|
|
||||||
|
"""Check that the start of the term is not before the start of the academic year and end of term is not after
|
||||||
|
the end of the academic year"""
|
||||||
|
year = frappe.get_doc("Academic Year",self.academic_year)
|
||||||
|
if self.term_start_date and get_datetime_str(year.year_start_date) and (self.term_start_date < get_datetime_str(year.year_start_date)):
|
||||||
|
frappe.throw(_("The Term Start Date cannot be earlier than the Year Start Date of the Academic Year to which the term is linked (Academic Year {}). Please correct the dates and try again.").format(self.academic_year))
|
||||||
|
|
||||||
|
if self.term_end_date and get_datetime_str(year.year_end_date) and (self.term_end_date > get_datetime_str(year.year_end_date)):
|
||||||
|
frappe.throw(_("The Term End Date cannot be later than the Year End Date of the Academic Year to which the term is linked (Academic Year {}). Please correct the dates and try again.").format(self.academic_year))
|
||||||
|
|
||||||
|
|
||||||
|
def validate_duplication(self):
|
||||||
|
term = frappe.db.sql("""select name from `tabAcademic Term` where academic_year= %s and term_name= %s
|
||||||
|
and docstatus<2 and name != %s""", (self.academic_year, self.term_name, self.name))
|
||||||
|
if term:
|
||||||
|
frappe.throw(_("An academic term with this 'Academic Year' {0} and 'Term Name' {1} already exists. Please modify these entries and try again.").format(self.academic_year,self.term_name))
|
||||||
|
@ -1,11 +1,17 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
"doctype": "Academic Term",
|
||||||
|
"academic_year": "2014-2015",
|
||||||
"term_name": "_Test Academic Term"
|
"term_name": "_Test Academic Term"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"doctype": "Academic Term",
|
||||||
|
"academic_year": "2014-2015",
|
||||||
"term_name": "_Test Academic Term 1"
|
"term_name": "_Test Academic Term 1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"doctype": "Academic Term",
|
||||||
|
"academic_year": "2014-2015",
|
||||||
"term_name": "_Test Academic Term 2"
|
"term_name": "_Test Academic Term 2"
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -4,7 +4,11 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
from frappe import msgprint, _
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class AcademicYear(Document):
|
class AcademicYear(Document):
|
||||||
pass
|
def validate(self):
|
||||||
|
#Check that start of academic year is earlier than end of academic year
|
||||||
|
if self.year_start_date and self.year_end_date and self.year_start_date > self.year_end_date:
|
||||||
|
frappe.throw(_("The Year End Date cannot be earlier than the Year Start Date. Please correct the dates and try again."))
|
||||||
|
@ -29,3 +29,23 @@ frappe.ui.form.on("Assessment" ,{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
frappe.ui.form.on("Assessment Result" ,{
|
||||||
|
result : function(frm, cdt, cdn) {
|
||||||
|
if(frm.doc.grading_structure){
|
||||||
|
var assessment_result = locals[cdt][cdn];
|
||||||
|
frappe.call({
|
||||||
|
method:"erpnext.schools.doctype.assessment.assessment.get_grade",
|
||||||
|
args:{
|
||||||
|
grading_structure: frm.doc.grading_structure,
|
||||||
|
result: assessment_result.result
|
||||||
|
},
|
||||||
|
callback: function(r){
|
||||||
|
if(r.message){
|
||||||
|
frappe.model.set_value(cdt, cdn, 'grade', r.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
@ -87,6 +87,32 @@
|
|||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "grading_structure",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Grading Structure",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Grading Structure",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
@ -506,7 +532,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2016-08-05 04:57:41.018614",
|
"modified": "2016-08-27 14:18:51.852078",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Assessment",
|
"name": "Assessment",
|
||||||
|
@ -44,3 +44,20 @@ def get_list_context(context=None):
|
|||||||
"get_list": get_assessment_list,
|
"get_list": get_assessment_list,
|
||||||
"row_template": "templates/includes/assessment/assessment_row.html"
|
"row_template": "templates/includes/assessment/assessment_row.html"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@frappe.whitelist()
|
||||||
|
def get_grade(grading_structure, result):
|
||||||
|
grade = frappe.db.sql("""select gi.from_score, gi.to_score, gi.grade_code, gi.grade_description
|
||||||
|
from `tabGrading Structure` as gs, `tabGrade Interval` as gi
|
||||||
|
where gs.name = gi.parent and gs.name = %(grading_structure)s and gi.from_score <= %(result)s
|
||||||
|
and gi.to_score >= %(result)s""".format(),
|
||||||
|
{
|
||||||
|
"grading_structure":grading_structure,
|
||||||
|
"result": result
|
||||||
|
},
|
||||||
|
as_dict=True)
|
||||||
|
|
||||||
|
return grade[0].grade_code if grade else ""
|
||||||
|
|
||||||
|
def validate_grade(score, grade):
|
||||||
|
pass
|
@ -109,6 +109,31 @@
|
|||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "grade",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Grade",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
@ -121,7 +146,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-08-01 10:37:23.571679",
|
"modified": "2016-08-27 12:15:01.923000",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Assessment Result",
|
"name": "Assessment Result",
|
||||||
|
@ -24,27 +24,27 @@ class TestCourseSchedule(unittest.TestCase):
|
|||||||
cs1 = make_course_schedule_test_record(simulate= True)
|
cs1 = make_course_schedule_test_record(simulate= True)
|
||||||
|
|
||||||
cs2 = make_course_schedule_test_record(from_time= cs1.from_time, to_time= cs1.to_time,
|
cs2 = make_course_schedule_test_record(from_time= cs1.from_time, to_time= cs1.to_time,
|
||||||
student_group="TC2-TP-2014-2015-_Test Academic Term", room="RM0002", do_not_save= 1)
|
student_group="TC2-TP-2014-2015-2014-2015 (_Test Academic Term)", room="RM0002", do_not_save= 1)
|
||||||
self.assertRaises(OverlapError, cs2.save)
|
self.assertRaises(OverlapError, cs2.save)
|
||||||
|
|
||||||
def test_room_conflict(self):
|
def test_room_conflict(self):
|
||||||
cs1 = make_course_schedule_test_record(simulate= True)
|
cs1 = make_course_schedule_test_record(simulate= True)
|
||||||
|
|
||||||
cs2 = make_course_schedule_test_record(from_time= cs1.from_time, to_time= cs1.to_time,
|
cs2 = make_course_schedule_test_record(from_time= cs1.from_time, to_time= cs1.to_time,
|
||||||
student_group="TC2-TP-2014-2015-_Test Academic Term", instructor="_T-Instructor-00002", do_not_save= 1)
|
student_group="TC2-TP-2014-2015-2014-2015 (_Test Academic Term)", instructor="_T-Instructor-00002", do_not_save= 1)
|
||||||
self.assertRaises(OverlapError, cs2.save)
|
self.assertRaises(OverlapError, cs2.save)
|
||||||
|
|
||||||
def test_no_conflict(self):
|
def test_no_conflict(self):
|
||||||
cs1 = make_course_schedule_test_record(simulate= True)
|
cs1 = make_course_schedule_test_record(simulate= True)
|
||||||
|
|
||||||
make_course_schedule_test_record(from_time= cs1.from_time, to_time= cs1.to_time,
|
make_course_schedule_test_record(from_time= cs1.from_time, to_time= cs1.to_time,
|
||||||
student_group="TC2-TP-2014-2015-_Test Academic Term", instructor="_T-Instructor-00002", room="RM0002")
|
student_group="TC2-TP-2014-2015-2014-2015 (_Test Academic Term)", instructor="_T-Instructor-00002", room="RM0002")
|
||||||
|
|
||||||
def make_course_schedule_test_record(**args):
|
def make_course_schedule_test_record(**args):
|
||||||
args = frappe._dict(args)
|
args = frappe._dict(args)
|
||||||
|
|
||||||
course_schedule = frappe.new_doc("Course Schedule")
|
course_schedule = frappe.new_doc("Course Schedule")
|
||||||
course_schedule.student_group = args.student_group or "TC-TP-2014-2015-_Test Academic Term"
|
course_schedule.student_group = args.student_group or "TC-TP-2014-2015-2014-2015 (_Test Academic Term)"
|
||||||
course_schedule.course = args.course or "_Test Course"
|
course_schedule.course = args.course or "_Test Course"
|
||||||
course_schedule.instructor = args.instructor or "_T-Instructor-00001"
|
course_schedule.instructor = args.instructor or "_T-Instructor-00001"
|
||||||
course_schedule.room = args.room or "RM0001"
|
course_schedule.room = args.room or "RM0001"
|
||||||
|
@ -2,6 +2,25 @@
|
|||||||
cur_frm.add_fetch("student", "title", "student_name");
|
cur_frm.add_fetch("student", "title", "student_name");
|
||||||
|
|
||||||
frappe.ui.form.on("Fees", {
|
frappe.ui.form.on("Fees", {
|
||||||
|
|
||||||
|
onload: function(frm){
|
||||||
|
cur_frm.set_query("academic_term",function(){
|
||||||
|
return{
|
||||||
|
"filters":{
|
||||||
|
"academic_year": (frm.doc.academic_year)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
cur_frm.set_query("fee_structure",function(){
|
||||||
|
return{
|
||||||
|
"filters":{
|
||||||
|
"academic_term": (frm.doc.academic_term)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
if (frm.doc.docstatus === 1 && (frm.doc.total_amount > frm.doc.paid_amount)) {
|
if (frm.doc.docstatus === 1 && (frm.doc.total_amount > frm.doc.paid_amount)) {
|
||||||
frm.add_custom_button(__("Collect Fees"), function() {
|
frm.add_custom_button(__("Collect Fees"), function() {
|
||||||
|
@ -41,17 +41,17 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "academic_term",
|
"fieldname": "academic_year",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Academic Term",
|
"label": "Academic Year",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Academic Term",
|
"options": "Academic Year",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@ -67,17 +67,17 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "academic_year",
|
"fieldname": "academic_term",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Academic Year",
|
"label": "Academic Term",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Academic Year",
|
"options": "Academic Term",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@ -480,7 +480,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2016-07-27 03:52:28.509757",
|
"modified": "2016-08-26 02:28:48.877990",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Fees",
|
"name": "Fees",
|
||||||
|
0
erpnext/schools/doctype/grade_interval/__init__.py
Normal file
0
erpnext/schools/doctype/grade_interval/__init__.py
Normal file
137
erpnext/schools/doctype/grade_interval/grade_interval.json
Normal file
137
erpnext/schools/doctype/grade_interval/grade_interval.json
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
|
"allow_import": 0,
|
||||||
|
"allow_rename": 0,
|
||||||
|
"beta": 0,
|
||||||
|
"creation": "2016-08-26 03:11:09.591049",
|
||||||
|
"custom": 0,
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "DocType",
|
||||||
|
"document_type": "",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "grade_code",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Grade Code",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "from_score",
|
||||||
|
"fieldtype": "Float",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "From Score",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "1",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "to_score",
|
||||||
|
"fieldtype": "Float",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "To Score",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "1",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "grade_description",
|
||||||
|
"fieldtype": "Small Text",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Grade Description",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
|
"idx": 0,
|
||||||
|
"image_view": 0,
|
||||||
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
|
"istable": 1,
|
||||||
|
"max_attachments": 0,
|
||||||
|
"modified": "2016-08-27 15:45:04.657328",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Schools",
|
||||||
|
"name": "Grade Interval",
|
||||||
|
"name_case": "",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [],
|
||||||
|
"quick_entry": 1,
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0,
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"track_seen": 0
|
||||||
|
}
|
11
erpnext/schools/doctype/grade_interval/grade_interval.py
Normal file
11
erpnext/schools/doctype/grade_interval/grade_interval.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class GradeInterval(Document):
|
||||||
|
def validate(self):
|
||||||
|
pass
|
@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Grading Structure', {
|
||||||
|
refresh: function(frm) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
185
erpnext/schools/doctype/grading_structure/grading_structure.json
Normal file
185
erpnext/schools/doctype/grading_structure/grading_structure.json
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
|
"allow_import": 0,
|
||||||
|
"allow_rename": 1,
|
||||||
|
"autoname": "field:grading_system_name",
|
||||||
|
"beta": 0,
|
||||||
|
"creation": "2016-08-26 03:06:53.922972",
|
||||||
|
"custom": 0,
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "DocType",
|
||||||
|
"document_type": "",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "grading_system_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Grading System Name",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "description",
|
||||||
|
"fieldtype": "Text",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Description",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "column_break_3",
|
||||||
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "grading_intervals_section",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Grading Intervals",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "grade_intervals",
|
||||||
|
"fieldtype": "Table",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Grade Intervals",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Grade Interval",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
|
"idx": 0,
|
||||||
|
"image_view": 0,
|
||||||
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
|
"istable": 0,
|
||||||
|
"max_attachments": 0,
|
||||||
|
"modified": "2016-08-27 14:20:50.709823",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Schools",
|
||||||
|
"name": "Grading Structure",
|
||||||
|
"name_case": "",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [
|
||||||
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "Academics User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 1,
|
||||||
|
"submit": 0,
|
||||||
|
"write": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"quick_entry": 1,
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0,
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"title_field": "grading_system_name",
|
||||||
|
"track_seen": 0
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
from frappe import _
|
||||||
|
from frappe.utils import cstr
|
||||||
|
|
||||||
|
class GradingStructure(Document):
|
||||||
|
def validate(self):
|
||||||
|
grade_intervals = self.get("grade_intervals")
|
||||||
|
check_overlap(grade_intervals, self)
|
||||||
|
|
||||||
|
#Check if any of the grade intervals for this grading structure overlap
|
||||||
|
def check_overlap(grade_intervals, parent_doc):
|
||||||
|
for interval1 in grade_intervals:
|
||||||
|
for interval2 in grade_intervals:
|
||||||
|
if interval1.name == interval2.name:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
if (interval1.from_score <= interval2.from_score and interval1.to_score >= interval2.from_score) or (interval1.from_score <= interval2.to_score and interval1.to_score >= interval2.to_score):
|
||||||
|
frappe.throw(_("""The intervals for Grade Code {0} overlaps with the grade intervals for other grades.
|
||||||
|
Please check intervals {0} and {1} and try again""".format(interval1.grade_code, interval2.grade_code)))
|
@ -0,0 +1,12 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
# test_records = frappe.get_test_records('Grading Structure')
|
||||||
|
|
||||||
|
class TestGradingStructure(unittest.TestCase):
|
||||||
|
pass
|
@ -250,7 +250,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2016-07-25 01:33:56.912243",
|
"modified": "2016-08-27 03:21:35.806511",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Program",
|
"name": "Program",
|
||||||
|
@ -18,5 +18,23 @@ frappe.ui.form.on("Program Enrollment", {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onload: function(frm, cdt, cdn){
|
||||||
|
cur_frm.set_query("academic_term", "fees", function(){
|
||||||
|
return{
|
||||||
|
"filters":{
|
||||||
|
"academic_year": (frm.doc.academic_year)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
cur_frm.fields_dict['fees'].grid.get_field('fee_structure').get_query = function(doc, cdt, cdn) {
|
||||||
|
var d = locals[cdt][cdn];
|
||||||
|
return {
|
||||||
|
filters: {'academic_term': d.academic_term}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -165,7 +165,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"default": "Today",
|
"default": "",
|
||||||
"fieldname": "joining_date",
|
"fieldname": "joining_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -180,7 +180,7 @@
|
|||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
@ -371,7 +371,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "nationality",
|
"fieldname": "nationality",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
@ -380,6 +380,7 @@
|
|||||||
"label": "Nationality",
|
"label": "Nationality",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
|
"options": "Country",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@ -456,7 +457,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2016-07-25 07:22:57.581638",
|
"modified": "2016-08-21 05:41:34.091353",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Student",
|
"name": "Student",
|
||||||
|
@ -525,7 +525,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "nationality",
|
"fieldname": "nationality",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
@ -534,6 +534,7 @@
|
|||||||
"label": "Nationality",
|
"label": "Nationality",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
|
"options": "Country",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@ -633,7 +634,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2016-07-25 01:24:27.384647",
|
"modified": "2016-08-26 01:01:45.669665",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Student Applicant",
|
"name": "Student Applicant",
|
||||||
|
@ -4,7 +4,18 @@
|
|||||||
frappe.ui.form.on('Student Batch', {
|
frappe.ui.form.on('Student Batch', {
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
onload: function(frm){
|
||||||
|
cur_frm.set_query("academic_term",function(){
|
||||||
|
return{
|
||||||
|
"filters":{
|
||||||
|
"academic_year": (frm.doc.academic_year)
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
cur_frm.add_fetch("student", "title", "student_name");
|
cur_frm.add_fetch("student", "title", "student_name");
|
||||||
|
@ -199,7 +199,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-07-22 09:19:51.141234",
|
"modified": "2016-08-24 05:32:00.585277",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Student Batch",
|
"name": "Student Batch",
|
||||||
|
@ -17,3 +17,18 @@ frappe.ui.form.on("Student Group", "refresh", function(frm) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
frappe.ui.form.on("Student Group", "onload", function(frm){
|
||||||
|
cur_frm.set_query("academic_term",function(){
|
||||||
|
return{
|
||||||
|
"filters":{
|
||||||
|
"academic_year": (frm.doc.academic_year)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//If Student Batch is entered, deduce program, academic_year and academic term from it
|
||||||
|
cur_frm.add_fetch("student_batch", "program", "program");
|
||||||
|
cur_frm.add_fetch("student_batch", "academic_term", "academic_term");
|
||||||
|
cur_frm.add_fetch("student_batch", "academic_year", "academic_year");
|
||||||
|
@ -41,17 +41,17 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "academic_term",
|
"fieldname": "academic_year",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Academic Term",
|
"label": "Academic Year",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Academic Term",
|
"options": "Academic Year",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@ -67,17 +67,17 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "academic_year",
|
"fieldname": "academic_term",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Academic Year",
|
"label": "Academic Term",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Academic Year",
|
"options": "Academic Term",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@ -280,7 +280,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2016-07-25 06:23:43.903111",
|
"modified": "2016-08-24 05:21:05.058875",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Student Group",
|
"name": "Student Group",
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
"program": "_Test Program",
|
"program": "_Test Program",
|
||||||
"course": "_Test Course",
|
"course": "_Test Course",
|
||||||
"academic_year": "2014-2015",
|
"academic_year": "2014-2015",
|
||||||
"academic_term": "_Test Academic Term"
|
"academic_term": "2014-2015 (_Test Academic Term)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"program": "_Test Program",
|
"program": "_Test Program",
|
||||||
"course": "_Test Course 2",
|
"course": "_Test Course 2",
|
||||||
"academic_year": "2014-2015",
|
"academic_year": "2014-2015",
|
||||||
"academic_term": "_Test Academic Term"
|
"academic_term": "2014-2015 (_Test Academic Term)"
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -21,3 +21,13 @@ frappe.ui.form.on("Student Group Creation Tool", "get_courses", function(frm) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
frappe.ui.form.on("Student Group Creation Tool", "onload", function(frm){
|
||||||
|
cur_frm.set_query("academic_term",function(){
|
||||||
|
return{
|
||||||
|
"filters":{
|
||||||
|
"academic_year": (frm.doc.academic_year)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
});
|
@ -34,8 +34,8 @@ def setup_complete(args=None):
|
|||||||
create_suppliers(args)
|
create_suppliers(args)
|
||||||
|
|
||||||
if args.domain.lower() == 'education':
|
if args.domain.lower() == 'education':
|
||||||
create_academic_term()
|
|
||||||
create_academic_year()
|
create_academic_year()
|
||||||
|
create_academic_term()
|
||||||
create_program(args)
|
create_program(args)
|
||||||
create_course(args)
|
create_course(args)
|
||||||
create_instructor(args)
|
create_instructor(args)
|
||||||
@ -508,9 +508,12 @@ def create_users(args):
|
|||||||
|
|
||||||
def create_academic_term():
|
def create_academic_term():
|
||||||
at = ["Semester 1", "Semester 2", "Semester 3"]
|
at = ["Semester 1", "Semester 2", "Semester 3"]
|
||||||
for d in at:
|
ay = ["2013-14", "2014-15", "2015-16", "2016-17", "2017-18"]
|
||||||
|
for y in ay:
|
||||||
|
for t in at:
|
||||||
academic_term = frappe.new_doc("Academic Term")
|
academic_term = frappe.new_doc("Academic Term")
|
||||||
academic_term.term_name = d
|
academic_term.academic_year = y
|
||||||
|
academic_term.term_name = t
|
||||||
academic_term.save()
|
academic_term.save()
|
||||||
|
|
||||||
def create_academic_year():
|
def create_academic_year():
|
||||||
|
1
patches.txt
Normal file
1
patches.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
bench.patches.v3.deprecate_old_config
|
Loading…
Reference in New Issue
Block a user