Renamed fields in Examination Doctype, Renamed examination doctype to Assessment, Added Assessment Group, added patch
This commit is contained in:
parent
efe1ab742f
commit
50b2278eda
@ -229,12 +229,12 @@ def get_data():
|
||||
"type": "list"
|
||||
},
|
||||
{
|
||||
"module_name": "Examination",
|
||||
"module_name": "Assessment",
|
||||
"color": "#8a70be",
|
||||
"icon": "icon-file-text-alt",
|
||||
"label": _("Examination"),
|
||||
"link": "List/Examination",
|
||||
"_doctype": "Examination",
|
||||
"label": _("Assessment"),
|
||||
"link": "List/Assessment",
|
||||
"_doctype": "Assessment",
|
||||
"type": "list"
|
||||
},
|
||||
{
|
||||
@ -261,7 +261,7 @@ def get_data():
|
||||
"icon": "icon-map-marker",
|
||||
"label": _("Room"),
|
||||
"link": "List/Room",
|
||||
"_doctype": "Examination",
|
||||
"_doctype": "Room",
|
||||
"type": "list"
|
||||
},
|
||||
{
|
||||
|
@ -61,7 +61,11 @@ def get_data():
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Examination"
|
||||
"name": "Assessment"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Assessment Group"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
|
@ -101,7 +101,7 @@ portal_menu_items = [
|
||||
{"title": _("Addresses"), "route": "/addresses", "reference_doctype": "Address"},
|
||||
{"title": _("Announcements"), "route": "/announcement", "reference_doctype": "Announcement"},
|
||||
{"title": _("Courses"), "route": "/course", "reference_doctype": "Course"},
|
||||
{"title": _("Examination Schedule"), "route": "/examination", "reference_doctype": "Examination"},
|
||||
{"title": _("Assessment Schedule"), "route": "/Assessment", "reference_doctype": "Assessment"},
|
||||
{"title": _("Fees"), "route": "/fees", "reference_doctype": "Fees"}
|
||||
]
|
||||
|
||||
|
@ -307,4 +307,5 @@ erpnext.patches.v7_0.fix_nonwarehouse_ledger_gl_entries_for_transactions
|
||||
erpnext.patches.v7_0.remove_old_earning_deduction_doctypes
|
||||
erpnext.patches.v7_0.make_guardian
|
||||
erpnext.patches.v7_0.update_refdoc_in_landed_cost_voucher
|
||||
erpnext.patches.v7_0.set_material_request_type_in_item
|
||||
erpnext.patches.v7_0.set_material_request_type_in_item
|
||||
erpnext.patches.v7_0.rename_examination_to_assessment
|
15
erpnext/patches/v7_0/rename_examination_to_assessment.py
Normal file
15
erpnext/patches/v7_0/rename_examination_to_assessment.py
Normal file
@ -0,0 +1,15 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
from frappe.model.utils.rename_field import rename_field
|
||||
|
||||
def execute():
|
||||
if frappe.db.exists("DocType", "Examination"):
|
||||
frappe.rename_doc("DocType", "Examination", "Assessment")
|
||||
frappe.reload_doctype("Assessment")
|
||||
rename_field("Assessment", "exam_name", "assessment_name")
|
||||
rename_field("Assessment", "exam_code", "assessment_code")
|
||||
|
@ -1,9 +1,12 @@
|
||||
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
cur_frm.add_fetch("student_group", "course", "course");
|
||||
cur_frm.add_fetch("examiner", "instructor_name", "examiner_name");
|
||||
cur_frm.add_fetch("supervisor", "instructor_name", "supervisor_name");
|
||||
cur_frm.add_fetch("student", "title", "student_name");
|
||||
|
||||
frappe.ui.form.on("Examination" ,{
|
||||
frappe.ui.form.on("Assessment" ,{
|
||||
student_group : function(frm) {
|
||||
frm.set_value("results" ,"");
|
||||
if (frm.doc.student_group) {
|
||||
@ -15,7 +18,7 @@ frappe.ui.form.on("Examination" ,{
|
||||
callback: function(r) {
|
||||
if (r.message) {
|
||||
$.each(r.message, function(i, d) {
|
||||
var row = frappe.model.add_child(cur_frm.doc, "Examination Result", "results");
|
||||
var row = frappe.model.add_child(cur_frm.doc, "Assessment Result", "results");
|
||||
row.student = d.student;
|
||||
row.student_name = d.student_name;
|
||||
});
|
@ -2,7 +2,7 @@
|
||||
"allow_copy": 0,
|
||||
"allow_import": 1,
|
||||
"allow_rename": 0,
|
||||
"autoname": "field:exam_name",
|
||||
"autoname": "field:assessment_name",
|
||||
"beta": 0,
|
||||
"creation": "2015-11-12 16:34:34.658092",
|
||||
"custom": 0,
|
||||
@ -15,14 +15,14 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "exam_name",
|
||||
"fieldname": "assessment_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Exam Name",
|
||||
"label": "Assessment Name",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
@ -40,14 +40,14 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "exam_code",
|
||||
"fieldname": "assessment_code",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Exam Code",
|
||||
"label": "Assessment Code",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
@ -137,6 +137,32 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "assessment_group",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Assessment Group",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Assessment Group",
|
||||
"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,
|
||||
@ -431,7 +457,7 @@
|
||||
"label": "results",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Examination Result",
|
||||
"options": "Assessment Result",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
@ -457,7 +483,7 @@
|
||||
"label": "Amended From",
|
||||
"length": 0,
|
||||
"no_copy": 1,
|
||||
"options": "Examination",
|
||||
"options": "Assessment",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
@ -480,10 +506,10 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2016-07-25 06:24:11.126911",
|
||||
"modified": "2016-08-05 04:57:41.018614",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Schools",
|
||||
"name": "Examination",
|
||||
"name": "Assessment",
|
||||
"name_case": "",
|
||||
"owner": "Administrator",
|
||||
"permissions": [
|
@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2015, Frappe Technologies and contributors
|
||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
@ -7,7 +7,7 @@ from frappe.model.document import Document
|
||||
import frappe
|
||||
from frappe import _
|
||||
|
||||
class Examination(Document):
|
||||
class Assessment(Document):
|
||||
def validate(self):
|
||||
self.validate_overlap()
|
||||
|
||||
@ -16,31 +16,31 @@ class Examination(Document):
|
||||
|
||||
from erpnext.schools.utils import validate_overlap_for
|
||||
|
||||
validate_overlap_for(self, "Examination", "student_group")
|
||||
validate_overlap_for(self, "Assessment", "student_group")
|
||||
validate_overlap_for(self, "Course Schedule", "student_group" )
|
||||
|
||||
if self.room:
|
||||
validate_overlap_for(self, "Examination", "room")
|
||||
validate_overlap_for(self, "Assessment", "room")
|
||||
validate_overlap_for(self, "Course Schedule", "room")
|
||||
|
||||
if self.supervisor:
|
||||
validate_overlap_for(self, "Examination", "supervisor")
|
||||
validate_overlap_for(self, "Assessment", "supervisor")
|
||||
validate_overlap_for(self, "Course Schedule", "instructor", self.supervisor)
|
||||
|
||||
def get_examination_list(doctype, txt, filters, limit_start, limit_page_length=20):
|
||||
def get_assessment_list(doctype, txt, filters, limit_start, limit_page_length=20):
|
||||
user = frappe.session.user
|
||||
student = frappe.db.sql("select name from `tabStudent` where student_email_id= %s", user)
|
||||
if student:
|
||||
return frappe. db.sql('''select course, schedule_date, from_time, to_time, sgs.name from `tabExamination` as exam,
|
||||
`tabStudent Group Student` as sgs where exam.student_group = sgs.parent and sgs.student = %s and exam.docstatus=1
|
||||
order by exam.name asc limit {0} , {1}'''
|
||||
return frappe. db.sql('''select course, schedule_date, from_time, to_time, sgs.name from `tabAssessment` as assessment,
|
||||
`tabStudent Group Student` as sgs where assessment.student_group = sgs.parent and sgs.student = %s and assessment.docstatus=1
|
||||
order by assessment.name asc limit {0} , {1}'''
|
||||
.format(limit_start, limit_page_length), student, as_dict = True)
|
||||
|
||||
def get_list_context(context=None):
|
||||
return {
|
||||
"show_sidebar": True,
|
||||
'no_breadcrumbs': True,
|
||||
"title": _("Examination Schedule"),
|
||||
"get_list": get_examination_list,
|
||||
"row_template": "templates/includes/examination/examination_row.html"
|
||||
"title": _("Assessment Schedule"),
|
||||
"get_list": get_assessment_list,
|
||||
"row_template": "templates/includes/assessment/assessment_row.html"
|
||||
}
|
12
erpnext/schools/doctype/assessment/test_assessment.py
Normal file
12
erpnext/schools/doctype/assessment/test_assessment.py
Normal file
@ -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('Assessment')
|
||||
|
||||
class TestAssessment(unittest.TestCase):
|
||||
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('Assessment Group', {
|
||||
refresh: function(frm) {
|
||||
|
||||
}
|
||||
});
|
109
erpnext/schools/doctype/assessment_group/assessment_group.json
Normal file
109
erpnext/schools/doctype/assessment_group/assessment_group.json
Normal file
@ -0,0 +1,109 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:assessment_group_name",
|
||||
"beta": 0,
|
||||
"creation": "2016-08-04 04:42:48.319388",
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "",
|
||||
"editable_grid": 1,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "assessment_group_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Assessment Group 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": "assessment_group_code",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Assessment Group 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
|
||||
}
|
||||
],
|
||||
"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-05 04:55:21.429710",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Schools",
|
||||
"name": "Assessment Group",
|
||||
"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",
|
||||
"track_seen": 0
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2015, Frappe Technologies and contributors
|
||||
# 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 ExaminationResult(Document):
|
||||
class AssessmentGroup(Document):
|
||||
pass
|
@ -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('Assessment Group')
|
||||
|
||||
class TestAssessmentGroup(unittest.TestCase):
|
||||
pass
|
@ -121,10 +121,10 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-07-21 12:27:02.405667",
|
||||
"modified": "2016-08-01 10:37:23.571679",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Schools",
|
||||
"name": "Examination Result",
|
||||
"name": "Assessment Result",
|
||||
"name_case": "",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
@ -0,0 +1,10 @@
|
||||
# -*- 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 AssessmentResult(Document):
|
||||
pass
|
@ -21,11 +21,11 @@ frappe.ui.form.on("Course", "refresh", function(frm) {
|
||||
frappe.set_route("List", "Course Schedule");
|
||||
});
|
||||
|
||||
frm.add_custom_button(__("Examination"), function() {
|
||||
frm.add_custom_button(__("Assessment"), function() {
|
||||
frappe.route_options = {
|
||||
course: frm.doc.name
|
||||
}
|
||||
frappe.set_route("List", "Examination");
|
||||
frappe.set_route("List", "Assessment");
|
||||
});
|
||||
}
|
||||
});
|
@ -31,7 +31,7 @@ class CourseSchedule(Document):
|
||||
validate_overlap_for(self, "Course Schedule", "instructor")
|
||||
validate_overlap_for(self, "Course Schedule", "room")
|
||||
|
||||
validate_overlap_for(self, "Examination", "student_group")
|
||||
validate_overlap_for(self, "Examination", "room")
|
||||
validate_overlap_for(self, "Examination", "supervisor", self.instructor)
|
||||
validate_overlap_for(self, "Assessment", "student_group")
|
||||
validate_overlap_for(self, "Assessment", "room")
|
||||
validate_overlap_for(self, "Assessment", "supervisor", self.instructor)
|
||||
|
||||
|
@ -1,12 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2015, Frappe Technologies and Contributors
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
# test_records = frappe.get_test_records('Examination')
|
||||
|
||||
class TestExamination(unittest.TestCase):
|
||||
pass
|
@ -9,7 +9,7 @@ data = {
|
||||
'items': ['Student Log', 'Student Group', 'Student Attendance']
|
||||
},
|
||||
{
|
||||
'items': ['Program Enrollment', 'Fees', 'Examination', 'Guardian']
|
||||
'items': ['Program Enrollment', 'Fees', 'Assessment', 'Guardian']
|
||||
}
|
||||
]
|
||||
}
|
@ -9,11 +9,11 @@ frappe.ui.form.on("Student Group", "refresh", function(frm) {
|
||||
frappe.set_route("List", "Course Schedule");
|
||||
});
|
||||
|
||||
frm.add_custom_button(__("Examination"), function() {
|
||||
frm.add_custom_button(__("Assessment"), function() {
|
||||
frappe.route_options = {
|
||||
student_group: frm.doc.name
|
||||
}
|
||||
frappe.set_route("List", "Examination");
|
||||
frappe.set_route("List", "Assessment");
|
||||
});
|
||||
}
|
||||
});
|
@ -18,7 +18,7 @@ def get_domain(domain):
|
||||
'set_value': [
|
||||
['Stock Settings', None, 'show_barcode_field', 1]
|
||||
],
|
||||
'remove_sidebar_items': ['/announcement', '/course', '/examination', '/fees']
|
||||
'remove_sidebar_items': ['/announcement', '/course', '/assessment', '/fees']
|
||||
},
|
||||
|
||||
'Retail': {
|
||||
@ -32,7 +32,7 @@ def get_domain(domain):
|
||||
'set_value': [
|
||||
['Stock Settings', None, 'show_barcode_field', 1]
|
||||
],
|
||||
'remove_sidebar_items': ['/announcement', '/course', '/examination', '/fees']
|
||||
'remove_sidebar_items': ['/announcement', '/course', '/assessment', '/fees']
|
||||
},
|
||||
|
||||
'Distribution': {
|
||||
@ -45,7 +45,7 @@ def get_domain(domain):
|
||||
'set_value': [
|
||||
['Stock Settings', None, 'show_barcode_field', 1]
|
||||
],
|
||||
'remove_sidebar_items': ['/announcement', '/course', '/examination', '/fees']
|
||||
'remove_sidebar_items': ['/announcement', '/course', '/assessment', '/fees']
|
||||
},
|
||||
|
||||
'Services': {
|
||||
@ -58,13 +58,13 @@ def get_domain(domain):
|
||||
'set_value': [
|
||||
['Stock Settings', None, 'show_barcode_field', 0]
|
||||
],
|
||||
'remove_sidebar_items': ['/announcement', '/course', '/examination', '/fees']
|
||||
'remove_sidebar_items': ['/announcement', '/course', '/assessment', '/fees']
|
||||
},
|
||||
'Education': {
|
||||
'desktop_icons': ['Student', 'Program', 'Course', 'Student Group', 'Instructor',
|
||||
'Fees', 'ToDo', 'Schools'],
|
||||
'allow_roles': ['Academics User', 'Accounts User', 'Accounts Manager', 'Website Manager'],
|
||||
'allow_sidebar_items': ['/announcement', '/course', '/examination', '/fees']
|
||||
'allow_sidebar_items': ['/announcement', '/course', '/assessment', '/fees']
|
||||
},
|
||||
}
|
||||
if not domain in data:
|
||||
|
Loading…
x
Reference in New Issue
Block a user