Redesign Assessment Module

This commit is contained in:
Neil Trini Lasrado 2016-12-14 17:49:47 +05:30
parent 6e9d2a3c1f
commit 06ed74dc7c
36 changed files with 1886 additions and 465 deletions

View File

@ -120,7 +120,15 @@ def get_data():
}, },
{ {
"type": "doctype", "type": "doctype",
"name": "Grading Structure" "name": "Assessment Result"
},
{
"type": "doctype",
"name": "Grading Scale"
},
{
"type": "doctype",
"name": "Evaluation Criteria"
} }
] ]
}, },

View File

@ -163,3 +163,41 @@ def get_course_schedule_events(start, end, filters=None):
}, as_dict=True, update={"allDay": 0}) }, as_dict=True, update={"allDay": 0})
return data return data
@frappe.whitelist()
def get_evaluation_criterias(course):
"""Returns Evaluation Criterias and their Weightage from Course Master.
:param Course: Course
"""
return frappe.get_list("Course Evaluation Criteria", \
fields=["evaluation_criteria", "weightage"], filters={"parent": course}, order_by= "idx")
@frappe.whitelist()
def get_assessment_details(assessment):
"""Returns Evaluation Criteria and Maximum Score from Assessment Master.
:param Assessment: Assessment
"""
return frappe.get_list("Assessment Evaluation Criteria", \
fields=["evaluation_criteria", "maximum_score"], filters={"parent": assessment}, order_by= "idx")
@frappe.whitelist()
def get_grade(grading_scale, percentage):
"""Returns Grade based on the Grading Scale and Score.
:param Grading Scale: Grading Scale
:param Percentage: Score Percentage Percentage
"""
grading_scale_intervals = {}
for d in frappe.get_all("Grading Scale Interval", fields=["grade_code", "min_score"], filters={"parent": grading_scale}):
grading_scale_intervals.update({d.min_score:d.grade_code})
intervals = sorted(grading_scale_intervals.keys(), key=float, reverse=True)
for interval in intervals:
if flt(percentage) >= interval:
grade = grading_scale_intervals.get(interval)
break
else:
grade = "Unsuccessful"
return grade

View File

@ -4,48 +4,32 @@
cur_frm.add_fetch("student_group", "course", "course"); cur_frm.add_fetch("student_group", "course", "course");
cur_frm.add_fetch("examiner", "instructor_name", "examiner_name"); cur_frm.add_fetch("examiner", "instructor_name", "examiner_name");
cur_frm.add_fetch("supervisor", "instructor_name", "supervisor_name"); cur_frm.add_fetch("supervisor", "instructor_name", "supervisor_name");
cur_frm.add_fetch("student", "title", "student_name");
frappe.ui.form.on("Assessment", { frappe.ui.form.on("Assessment", {
student_group: function(frm) { course: function(frm) {
frm.set_value("results", ""); if (frm.doc.course && frm.doc.maximum_assessment_score) {
if (frm.doc.student_group) {
frappe.call({ frappe.call({
method: "erpnext.schools.api.get_student_group_students", method: "erpnext.schools.api.get_evaluation_criterias",
args: { args: {
"student_group": frm.doc.student_group course: frm.doc.course
}, },
callback: function(r) { callback: function(r) {
if (r.message) { if (r.message) {
frm.doc.evaluation_criterias = [];
$.each(r.message, function(i, d) { $.each(r.message, function(i, d) {
var row = frappe.model.add_child(cur_frm.doc, "Assessment Result", "results"); var row = frappe.model.add_child(frm.doc, "Assessment Evaluation Criteria", "evaluation_criterias");
row.student = d.student; row.evaluation_criteria = d.evaluation_criteria;
row.student_name = d.student_name; row.maximum_score = d.weightage / 100 * frm.doc.maximum_assessment_score;
}); });
} }
refresh_field("results"); refresh_field("evaluation_criterias");
}
});
}
}
});
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);
}
} }
}); });
} }
},
maximum_assessment_score: function(frm) {
frm.trigger("course");
} }
}); });

View File

@ -131,18 +131,18 @@
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"columns": 0, "columns": 0,
"fieldname": "grading_structure", "fieldname": "examiner",
"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,
"in_standard_filter": 1, "in_standard_filter": 0,
"label": "Grading Structure", "label": "Examiner",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
"options": "Grading Structure", "options": "Instructor",
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
"print_hide": 0, "print_hide": 0,
@ -160,18 +160,17 @@
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"columns": 0, "columns": 0,
"fieldname": "course", "fieldname": "examiner_name",
"fieldtype": "Link", "fieldtype": "Data",
"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,
"in_standard_filter": 1, "in_standard_filter": 0,
"label": "Course", "label": "Examiner Name",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
"options": "Course",
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
"print_hide": 0, "print_hide": 0,
@ -179,7 +178,7 @@
"read_only": 1, "read_only": 1,
"remember_last_selected_value": 0, "remember_last_selected_value": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 1, "reqd": 0,
"search_index": 0, "search_index": 0,
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
@ -211,6 +210,35 @@
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
}, },
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "course",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Course",
"length": 0,
"no_copy": 0,
"options": "Course",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 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,
@ -240,6 +268,63 @@
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
}, },
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "maximum_assessment_score",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Maximum Assessment Score",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "grading_scale",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Grading Scale",
"length": 0,
"no_copy": 0,
"options": "Grading Scale",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 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,
@ -301,63 +386,6 @@
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"columns": 0,
"fieldname": "examiner",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Examiner",
"length": 0,
"no_copy": 0,
"options": "Instructor",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "examiner_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Examiner Name",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "", "collapsible_depends_on": "",
"columns": 0, "columns": 0,
"depends_on": "", "depends_on": "",
@ -528,9 +556,9 @@
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 1, "collapsible": 0,
"columns": 0, "columns": 0,
"fieldname": "section_break_11", "fieldname": "section_break_20",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
@ -538,7 +566,6 @@
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"in_standard_filter": 0, "in_standard_filter": 0,
"label": "Results",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
@ -558,7 +585,7 @@
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"columns": 0, "columns": 0,
"fieldname": "results", "fieldname": "evaluation_criterias",
"fieldtype": "Table", "fieldtype": "Table",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
@ -566,10 +593,10 @@
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"in_standard_filter": 0, "in_standard_filter": 0,
"label": "results", "label": "Evaluation Criterias",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
"options": "Assessment Result", "options": "Assessment Evaluation Criteria",
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
"print_hide": 0, "print_hide": 0,
@ -577,7 +604,7 @@
"read_only": 0, "read_only": 0,
"remember_last_selected_value": 0, "remember_last_selected_value": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 1,
"search_index": 0, "search_index": 0,
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
@ -622,7 +649,7 @@
"istable": 0, "istable": 0,
"max_attachments": 0, "max_attachments": 0,
"menu_index": 0, "menu_index": 0,
"modified": "2016-11-16 13:05:54.953750", "modified": "2016-12-15 14:35:50.780052",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Schools", "module": "Schools",
"name": "Assessment", "name": "Assessment",

View File

@ -34,7 +34,7 @@ class Assessment(Document):
validate_overlap_for(self, "Assessment", "student_group") validate_overlap_for(self, "Assessment", "student_group")
validate_overlap_for(self, "Assessment", "room") validate_overlap_for(self, "Assessment", "room")
validate_overlap_for(self, "Assessment", "supervisor", self.instructor) validate_overlap_for(self, "Assessment", "supervisor", self.supervisor)
def get_assessment_list(doctype, txt, filters, limit_start, limit_page_length=20): def get_assessment_list(doctype, txt, filters, limit_start, limit_page_length=20):
@ -53,21 +53,4 @@ def get_list_context(context=None):
"title": _("Assessment Schedule"), "title": _("Assessment Schedule"),
"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

View File

@ -0,0 +1,124 @@
{
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "",
"beta": 0,
"creation": "2016-12-14 17:20:27.738226",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "evaluation_criteria",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Evaluation Criteria",
"length": 0,
"no_copy": 0,
"options": "Evaluation Criteria",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_2",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "maximum_score",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Maximum Score",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 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": 1,
"max_attachments": 0,
"modified": "2016-12-14 17:31:11.950549",
"modified_by": "Administrator",
"module": "Schools",
"name": "Assessment Evaluation Criteria",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_seen": 0
}

View File

@ -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 AssessmentEvaluationCriteria(Document):
pass

View File

@ -0,0 +1,51 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
cur_frm.add_fetch("student", "title", "student_name");
cur_frm.add_fetch("assessment", "grading_scale", "grading_scale");
cur_frm.add_fetch("assessment", "maximum_assessment_score", "maximum_score");
frappe.ui.form.on("Assessment Result", {
assessment: function(frm) {
frappe.call({
method: "erpnext.schools.api.get_assessment_details",
args: {
assessment: frm.doc.assessment
},
callback: function(r) {
if (r.message) {
frm.doc.details = [];
$.each(r.message, function(i, d) {
var row = frappe.model.add_child(frm.doc, "Assessment Result Detail", "details");
row.evaluation_criteria = d.evaluation_criteria;
row.maximum_score = d.maximum_score;
});
}
refresh_field("details");
}
});
}
});
frappe.ui.form.on("Assessment Result Detail", {
score: function(frm, cdt, cdn) {
var d = locals[cdt][cdn];
if (d.score >= d.maximum_score) {
frappe.throw(_("Score cannot be greater than Maximum Score"));
}
else {
frappe.call({
method: "erpnext.schools.api.get_grade",
args: {
grading_scale: frm.doc.grading_scale,
percentage: ((d.score/d.maximum_score) * 100)
},
callback: function(r) {
if (r.message) {
frappe.model.set_value(cdt, cdn, "grade", r.message);
}
}
});
}
}
});

View File

@ -2,6 +2,7 @@
"allow_copy": 0, "allow_copy": 0,
"allow_import": 0, "allow_import": 0,
"allow_rename": 0, "allow_rename": 0,
"autoname": "RES.######",
"beta": 0, "beta": 0,
"creation": "2015-11-13 17:18:06.468332", "creation": "2015-11-13 17:18:06.468332",
"custom": 0, "custom": 0,
@ -9,18 +10,21 @@
"doctype": "DocType", "doctype": "DocType",
"document_type": "", "document_type": "",
"editable_grid": 1, "editable_grid": 1,
"engine": "InnoDB",
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"columns": 0,
"fieldname": "student", "fieldname": "student",
"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": 0,
"in_standard_filter": 0,
"label": "Student", "label": "Student",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
@ -30,6 +34,7 @@
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0, "print_hide_if_no_value": 0,
"read_only": 0, "read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 1, "reqd": 1,
"search_index": 0, "search_index": 0,
@ -40,6 +45,7 @@
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"columns": 0,
"fieldname": "student_name", "fieldname": "student_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@ -47,6 +53,7 @@
"ignore_xss_filter": 0, "ignore_xss_filter": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"in_standard_filter": 0,
"label": "Student Name", "label": "Student Name",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
@ -55,6 +62,7 @@
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0, "print_hide_if_no_value": 0,
"read_only": 1, "read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
@ -65,6 +73,7 @@
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"columns": 0,
"fieldname": "column_break_3", "fieldname": "column_break_3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@ -72,6 +81,7 @@
"ignore_xss_filter": 0, "ignore_xss_filter": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"in_standard_filter": 0,
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
@ -79,6 +89,7 @@
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0, "print_hide_if_no_value": 0,
"read_only": 0, "read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
@ -89,21 +100,54 @@
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"fieldname": "result", "columns": 0,
"fieldtype": "Data", "fieldname": "assessment",
"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": "Result", "in_standard_filter": 0,
"label": "Assessment",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
"options": "Assessment",
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0, "print_hide_if_no_value": 0,
"read_only": 0, "read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "grading_scale",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Grading Scale",
"length": 0,
"no_copy": 0,
"options": "Grading Scale",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
@ -114,6 +158,174 @@
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"columns": 0,
"fieldname": "section_break_5",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fieldname": "details",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Details",
"length": 0,
"no_copy": 0,
"options": "Assessment Result Detail",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "section_break_8",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "maximum_score",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Maximum Score",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "total_score",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Total Score",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_11",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "grade", "fieldname": "grade",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@ -121,6 +333,7 @@
"ignore_xss_filter": 0, "ignore_xss_filter": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"in_standard_filter": 0,
"label": "Grade", "label": "Grade",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
@ -129,6 +342,35 @@
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0, "print_hide_if_no_value": 0,
"read_only": 1, "read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"options": "Assessment Result",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
@ -142,21 +384,44 @@
"image_view": 0, "image_view": 0,
"in_create": 0, "in_create": 0,
"in_dialog": 0, "in_dialog": 0,
"is_submittable": 0, "is_submittable": 1,
"issingle": 0, "issingle": 0,
"istable": 1, "istable": 0,
"max_attachments": 0, "max_attachments": 0,
"modified": "2016-08-27 12:15:01.923000", "modified": "2016-12-27 17:05:36.436123",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Schools", "module": "Schools",
"name": "Assessment Result", "name": "Assessment Result",
"name_case": "", "name_case": "",
"owner": "Administrator", "owner": "Administrator",
"permissions": [], "permissions": [
{
"amend": 1,
"apply_user_permissions": 0,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Academics User",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"write": 1
}
],
"quick_entry": 0, "quick_entry": 0,
"read_only": 0, "read_only": 0,
"read_only_onload": 0, "read_only_onload": 0,
"sort_field": "modified", "sort_field": "modified",
"sort_order": "DESC", "sort_order": "DESC",
"title_field": "student_name",
"track_seen": 0 "track_seen": 0
} }

View File

@ -4,7 +4,22 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import frappe import frappe
from frappe.utils import flt
from frappe.model.document import Document from frappe.model.document import Document
from erpnext.schools.api import get_grade
class AssessmentResult(Document): class AssessmentResult(Document):
pass def validate(self):
self.maximum_score = frappe.db.get_value("Assessment", self.assessment, "maximum_assessment_score")
self.validate_grade()
def validate_grade(self):
self.total_score = 0.0
for d in self.details:
if d.score > d.maximum_score:
frappe.throw(_("Score cannot be greater than Maximum Score"))
else:
d.grade = get_grade(self.grading_scale, (flt(d.score)/d.maximum_score)*100)
self.total_score += d.score
self.grade = get_grade(self.grading_scale, (self.total_score/self.maximum_score)*100)

View 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 Result')
class TestAssessmentResult(unittest.TestCase):
pass

View File

@ -0,0 +1,180 @@
{
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "",
"beta": 0,
"creation": "2016-12-14 17:44:35.583123",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 4,
"fieldname": "evaluation_criteria",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Evaluation Criteria",
"length": 0,
"no_copy": 0,
"options": "Evaluation Criteria",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 2,
"fieldname": "maximum_score",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Maximum Score",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_2",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 2,
"fieldname": "score",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Score",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 2,
"fieldname": "grade",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Grade",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 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-12-27 16:18:12.022257",
"modified_by": "Administrator",
"module": "Schools",
"name": "Assessment Result Detail",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_seen": 0
}

View File

@ -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 AssessmentResultDetail(Document):
pass

View File

@ -1,278 +1,362 @@
{ {
"allow_copy": 0, "allow_copy": 0,
"allow_import": 1, "allow_import": 1,
"allow_rename": 1, "allow_rename": 1,
"autoname": "field:course_name", "autoname": "field:course_name",
"beta": 0, "beta": 0,
"creation": "2015-09-07 12:39:55.181893", "creation": "2015-09-07 12:39:55.181893",
"custom": 0, "custom": 0,
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"document_type": "", "document_type": "",
"editable_grid": 0, "editable_grid": 0,
"engine": "InnoDB", "engine": "InnoDB",
"fields": [ "fields": [{
{ "allow_on_submit": 0,
"allow_on_submit": 0, "bold": 0,
"bold": 0, "collapsible": 0,
"collapsible": 0, "columns": 0,
"columns": 0, "fieldname": "course_name",
"fieldname": "course_name", "fieldtype": "Data",
"fieldtype": "Data", "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, "in_standard_filter": 0,
"in_standard_filter": 0, "label": "Course Name",
"label": "Course Name", "length": 0,
"length": 0, "no_copy": 0,
"no_copy": 0, "permlevel": 0,
"permlevel": 0, "precision": "",
"precision": "", "print_hide": 0,
"print_hide": 0, "print_hide_if_no_value": 0,
"print_hide_if_no_value": 0, "read_only": 0,
"read_only": 0, "remember_last_selected_value": 0,
"remember_last_selected_value": 0, "report_hide": 0,
"report_hide": 0, "reqd": 1,
"reqd": 1, "search_index": 0,
"search_index": 0, "set_only_once": 0,
"set_only_once": 0, "unique": 0
"unique": 0 },
}, {
{ "allow_on_submit": 0,
"allow_on_submit": 0, "bold": 0,
"bold": 0, "collapsible": 0,
"collapsible": 0, "columns": 0,
"columns": 0, "fieldname": "course_code",
"fieldname": "course_code", "fieldtype": "Data",
"fieldtype": "Data", "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, "in_standard_filter": 0,
"in_standard_filter": 0, "label": "Course Code",
"label": "Course Code", "length": 0,
"length": 0, "no_copy": 0,
"no_copy": 0, "permlevel": 0,
"permlevel": 0, "precision": "",
"precision": "", "print_hide": 0,
"print_hide": 0, "print_hide_if_no_value": 0,
"print_hide_if_no_value": 0, "read_only": 0,
"read_only": 0, "remember_last_selected_value": 0,
"remember_last_selected_value": 0, "report_hide": 0,
"report_hide": 0, "reqd": 0,
"reqd": 0, "search_index": 0,
"search_index": 0, "set_only_once": 0,
"set_only_once": 0, "unique": 0
"unique": 0 },
}, {
{ "allow_on_submit": 0,
"allow_on_submit": 0, "bold": 0,
"bold": 0, "collapsible": 0,
"collapsible": 0, "columns": 0,
"columns": 0, "fieldname": "column_break_3",
"fieldname": "column_break_3", "fieldtype": "Column Break",
"fieldtype": "Column Break", "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, "in_standard_filter": 0,
"in_standard_filter": 0, "length": 0,
"length": 0, "no_copy": 0,
"no_copy": 0, "permlevel": 0,
"permlevel": 0, "precision": "",
"precision": "", "print_hide": 0,
"print_hide": 0, "print_hide_if_no_value": 0,
"print_hide_if_no_value": 0, "read_only": 0,
"read_only": 0, "remember_last_selected_value": 0,
"remember_last_selected_value": 0, "report_hide": 0,
"report_hide": 0, "reqd": 0,
"reqd": 0, "search_index": 0,
"search_index": 0, "set_only_once": 0,
"set_only_once": 0, "unique": 0
"unique": 0 },
}, {
{ "allow_on_submit": 0,
"allow_on_submit": 0, "bold": 0,
"bold": 0, "collapsible": 0,
"collapsible": 0, "columns": 0,
"columns": 0, "fieldname": "course_abbreviation",
"fieldname": "course_abbreviation", "fieldtype": "Data",
"fieldtype": "Data", "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, "in_standard_filter": 0,
"in_standard_filter": 0, "label": "Course Abbreviation",
"label": "Course Abbreviation", "length": 0,
"length": 0, "no_copy": 0,
"no_copy": 0, "permlevel": 0,
"permlevel": 0, "precision": "",
"precision": "", "print_hide": 0,
"print_hide": 0, "print_hide_if_no_value": 0,
"print_hide_if_no_value": 0, "read_only": 0,
"read_only": 0, "remember_last_selected_value": 0,
"remember_last_selected_value": 0, "report_hide": 0,
"report_hide": 0, "reqd": 0,
"reqd": 0, "search_index": 0,
"search_index": 0, "set_only_once": 0,
"set_only_once": 0, "unique": 0
"unique": 0 },
}, {
{ "allow_on_submit": 0,
"allow_on_submit": 0, "bold": 0,
"bold": 0, "collapsible": 0,
"collapsible": 0, "columns": 0,
"columns": 0, "fieldname": "department",
"fieldname": "department", "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, "in_standard_filter": 1,
"in_standard_filter": 1, "label": "Department",
"label": "Department", "length": 0,
"length": 0, "no_copy": 0,
"no_copy": 0, "options": "Department",
"options": "Department", "permlevel": 0,
"permlevel": 0, "precision": "",
"precision": "", "print_hide": 0,
"print_hide": 0, "print_hide_if_no_value": 0,
"print_hide_if_no_value": 0, "read_only": 0,
"read_only": 0, "remember_last_selected_value": 0,
"remember_last_selected_value": 0, "report_hide": 0,
"report_hide": 0, "reqd": 0,
"reqd": 0, "search_index": 0,
"search_index": 0, "set_only_once": 0,
"set_only_once": 0, "unique": 0
"unique": 0 },
}, {
{ "allow_on_submit": 0,
"allow_on_submit": 0, "bold": 0,
"bold": 0, "collapsible": 0,
"collapsible": 0, "columns": 0,
"columns": 0, "fieldname": "section_break_6",
"fieldname": "section_break_6", "fieldtype": "Section Break",
"fieldtype": "Section Break", "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, "in_standard_filter": 0,
"in_standard_filter": 0, "length": 0,
"length": 0, "no_copy": 0,
"no_copy": 0, "permlevel": 0,
"permlevel": 0, "precision": "",
"precision": "", "print_hide": 0,
"print_hide": 0, "print_hide_if_no_value": 0,
"print_hide_if_no_value": 0, "read_only": 0,
"read_only": 0, "remember_last_selected_value": 0,
"remember_last_selected_value": 0, "report_hide": 0,
"report_hide": 0, "reqd": 0,
"reqd": 0, "search_index": 0,
"search_index": 0, "set_only_once": 0,
"set_only_once": 0, "unique": 0
"unique": 0 },
}, {
{ "allow_on_submit": 0,
"allow_on_submit": 0, "bold": 0,
"bold": 0, "collapsible": 0,
"collapsible": 0, "columns": 0,
"columns": 0, "fieldname": "course_intro",
"fieldname": "course_intro", "fieldtype": "Text Editor",
"fieldtype": "Text Editor", "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, "in_standard_filter": 0,
"in_standard_filter": 0, "label": "Course Intro",
"label": "Course Intro", "length": 0,
"length": 0, "no_copy": 0,
"no_copy": 0, "permlevel": 0,
"permlevel": 0, "precision": "",
"precision": "", "print_hide": 0,
"print_hide": 0, "print_hide_if_no_value": 0,
"print_hide_if_no_value": 0, "read_only": 0,
"read_only": 0, "remember_last_selected_value": 0,
"remember_last_selected_value": 0, "report_hide": 0,
"report_hide": 0, "reqd": 0,
"reqd": 0, "search_index": 0,
"search_index": 0, "set_only_once": 0,
"set_only_once": 0, "unique": 0
"unique": 0 },
} {
], "allow_on_submit": 0,
"hide_heading": 0, "bold": 0,
"hide_toolbar": 0, "collapsible": 0,
"idx": 0, "columns": 0,
"image_view": 0, "fieldname": "assessment",
"in_create": 0, "fieldtype": "Section Break",
"in_dialog": 0, "hidden": 0,
"is_submittable": 0, "ignore_user_permissions": 0,
"issingle": 0, "ignore_xss_filter": 0,
"istable": 0, "in_filter": 0,
"max_attachments": 0, "in_list_view": 0,
"menu_index": 0, "in_standard_filter": 0,
"modified": "2016-08-08 05:26:26.442635", "label": "Assessment",
"modified_by": "Administrator", "length": 0,
"module": "Schools", "no_copy": 0,
"name": "Course", "permlevel": 0,
"name_case": "", "precision": "",
"owner": "Administrator", "print_hide": 0,
"permissions": [ "print_hide_if_no_value": 0,
{ "read_only": 0,
"amend": 0, "remember_last_selected_value": 0,
"apply_user_permissions": 0, "report_hide": 0,
"cancel": 0, "reqd": 0,
"create": 1, "search_index": 0,
"delete": 1, "set_only_once": 0,
"email": 1, "unique": 0
"export": 1, },
"if_owner": 0, {
"import": 0, "allow_on_submit": 0,
"is_custom": 0, "bold": 0,
"permlevel": 0, "collapsible": 0,
"print": 1, "columns": 0,
"read": 1, "fieldname": "default_grading_scale",
"report": 1, "fieldtype": "Link",
"role": "Academics User", "hidden": 0,
"set_user_permissions": 0, "ignore_user_permissions": 0,
"share": 1, "ignore_xss_filter": 0,
"submit": 0, "in_filter": 0,
"write": 1 "in_list_view": 0,
}, "in_standard_filter": 0,
{ "label": "Default Grading Scale",
"amend": 0, "length": 0,
"apply_user_permissions": 0, "no_copy": 0,
"cancel": 0, "options": "Grading Scale",
"create": 1, "permlevel": 0,
"delete": 1, "precision": "",
"email": 1, "print_hide": 0,
"export": 1, "print_hide_if_no_value": 0,
"if_owner": 0, "read_only": 0,
"import": 0, "remember_last_selected_value": 0,
"permlevel": 0, "report_hide": 0,
"print": 1, "reqd": 0,
"read": 1, "search_index": 0,
"report": 1, "set_only_once": 0,
"role": "HR Manager", "unique": 0
"set_user_permissions": 0, },
"share": 1, {
"submit": 0, "allow_on_submit": 0,
"write": 1 "bold": 0,
} "collapsible": 0,
], "columns": 0,
"quick_entry": 0, "fieldname": "evaluation_criterias",
"read_only": 0, "fieldtype": "Table",
"read_only_onload": 0, "hidden": 0,
"search_fields": "department", "ignore_user_permissions": 0,
"sort_field": "modified", "ignore_xss_filter": 0,
"sort_order": "DESC", "in_filter": 0,
"track_seen": 0 "in_list_view": 0,
"in_standard_filter": 0,
"label": "Evaluation Criterias",
"length": 0,
"no_copy": 0,
"options": "Course Evaluation Criteria",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 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": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2016-12-14 16:48:16.642813",
"modified_by": "Administrator",
"module": "Schools",
"name": "Course",
"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,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Academics User",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"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": "HR Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"search_fields": "department",
"sort_field": "modified",
"sort_order": "DESC",
"track_seen": 0
} }

View File

@ -8,7 +8,16 @@ from frappe.model.document import Document
from frappe import _ from frappe import _
class Course(Document): class Course(Document):
pass def validate(self):
self.validate_evaluation_criterias()
def validate_evaluation_criterias(self):
if self.evaluation_criterias:
total_weightage = 0
for criteria in self.evaluation_criterias:
total_weightage += criteria.weightage
if total_weightage != 100:
frappe.throw(_("Total Weightage of all Evaluation Criterias must be 100%"))
def get_sg_list(doctype, txt, filters, limit_start, limit_page_length=20): def get_sg_list(doctype, txt, filters, limit_start, limit_page_length=20):
user = frappe.session.user user = frappe.session.user

View File

@ -0,0 +1,124 @@
{
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "",
"beta": 0,
"creation": "2016-12-14 16:46:46.786353",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "evaluation_criteria",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Evaluation Criteria",
"length": 0,
"no_copy": 0,
"options": "Evaluation Criteria",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_2",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "weightage",
"fieldtype": "Percent",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Weightage",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 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-12-14 16:59:17.353023",
"modified_by": "Administrator",
"module": "Schools",
"name": "Course Evaluation Criteria",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_seen": 0
}

View File

@ -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 CourseEvaluationCriteria(Document):
pass

View File

@ -0,0 +1,8 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Evaluation Criteria', {
refresh: function(frm) {
}
});

View File

@ -0,0 +1,89 @@
{
"allow_copy": 0,
"allow_import": 1,
"allow_rename": 0,
"autoname": "field:evaluation_criteria",
"beta": 0,
"creation": "2016-12-14 16:40:15.144115",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "evaluation_criteria",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Evaluation Criteria",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 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-12-14 16:40:36.351183",
"modified_by": "Administrator",
"module": "Schools",
"name": "Evaluation Criteria",
"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,
"is_custom": 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
}

View File

@ -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 EvaluationCriteria(Document):
pass

View 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('Evaluation Criteria')
class TestEvaluationCriteria(unittest.TestCase):
pass

View File

@ -9,11 +9,13 @@
"doctype": "DocType", "doctype": "DocType",
"document_type": "", "document_type": "",
"editable_grid": 1, "editable_grid": 1,
"engine": "InnoDB",
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"columns": 0,
"fieldname": "grade_code", "fieldname": "grade_code",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@ -21,6 +23,7 @@
"ignore_xss_filter": 0, "ignore_xss_filter": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"in_standard_filter": 0,
"label": "Grade Code", "label": "Grade Code",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
@ -29,6 +32,7 @@
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0, "print_hide_if_no_value": 0,
"read_only": 0, "read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 1, "reqd": 1,
"search_index": 0, "search_index": 0,
@ -39,39 +43,16 @@
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"fieldname": "from_score", "columns": 0,
"fieldtype": "Float", "fieldname": "min_score",
"fieldtype": "Percent",
"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": "From Score", "in_standard_filter": 0,
"length": 0, "label": "Min Score",
"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, "length": 0,
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
@ -79,6 +60,7 @@
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0, "print_hide_if_no_value": 0,
"read_only": 0, "read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 1, "reqd": 1,
"search_index": 0, "search_index": 0,
@ -89,6 +71,7 @@
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"columns": 0,
"fieldname": "grade_description", "fieldname": "grade_description",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 0, "hidden": 0,
@ -96,6 +79,7 @@
"ignore_xss_filter": 0, "ignore_xss_filter": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"in_standard_filter": 0,
"label": "Grade Description", "label": "Grade Description",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
@ -104,6 +88,7 @@
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0, "print_hide_if_no_value": 0,
"read_only": 0, "read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
@ -121,7 +106,7 @@
"issingle": 0, "issingle": 0,
"istable": 1, "istable": 1,
"max_attachments": 0, "max_attachments": 0,
"modified": "2016-08-27 15:45:04.657328", "modified": "2016-12-14 12:54:56.902465",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Schools", "module": "Schools",
"name": "Grade Interval", "name": "Grade Interval",

View File

@ -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 Scale', {
refresh: function(frm) {
}
});

View File

@ -0,0 +1,203 @@
{
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 1,
"autoname": "field:grading_scale_name",
"beta": 0,
"creation": "2016-08-26 03:06:53.922972",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "grading_scale_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Grading Scale Name",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "description",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 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,
"in_standard_filter": 0,
"label": "Grading Scale Intervals",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "intervals",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Intervals",
"length": 0,
"no_copy": 0,
"options": "Grading Scale Interval",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"options": "Grading Scale",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 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": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-12-14 14:35:22.907023",
"modified_by": "Administrator",
"module": "Schools",
"name": "Grading Scale",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Academics User",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"write": 1
}
],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "",
"track_seen": 0
}

View File

@ -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 GradingScale(Document):
pass

View 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('Grading Scale')
class TestGradingScale(unittest.TestCase):
pass

View File

@ -0,0 +1,123 @@
{
"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,
"engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "grade_code",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Grade Code",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "0",
"fieldname": "min_score",
"fieldtype": "Percent",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Min Score",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "1",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "grade_description",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Grade Description",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 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-12-14 14:32:52.892711",
"modified_by": "Administrator",
"module": "Schools",
"name": "Grading Scale 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
}

View File

@ -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 GradingScaleInterval(Document):
pass

View File

@ -10,11 +10,13 @@
"doctype": "DocType", "doctype": "DocType",
"document_type": "", "document_type": "",
"editable_grid": 1, "editable_grid": 1,
"engine": "InnoDB",
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"columns": 0,
"fieldname": "grading_system_name", "fieldname": "grading_system_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@ -22,6 +24,7 @@
"ignore_xss_filter": 0, "ignore_xss_filter": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"in_standard_filter": 0,
"label": "Grading System Name", "label": "Grading System Name",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
@ -30,6 +33,7 @@
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0, "print_hide_if_no_value": 0,
"read_only": 0, "read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 1, "reqd": 1,
"search_index": 0, "search_index": 0,
@ -40,6 +44,34 @@
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"columns": 0,
"fieldname": "column_break_2",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "description", "fieldname": "description",
"fieldtype": "Text", "fieldtype": "Text",
"hidden": 0, "hidden": 0,
@ -47,6 +79,7 @@
"ignore_xss_filter": 0, "ignore_xss_filter": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"in_standard_filter": 0,
"label": "Description", "label": "Description",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
@ -55,6 +88,7 @@
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0, "print_hide_if_no_value": 0,
"read_only": 0, "read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
@ -65,30 +99,7 @@
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"fieldname": "column_break_3", "columns": 0,
"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", "fieldname": "grading_intervals_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@ -96,6 +107,7 @@
"ignore_xss_filter": 0, "ignore_xss_filter": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"in_standard_filter": 0,
"label": "Grading Intervals", "label": "Grading Intervals",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
@ -104,6 +116,7 @@
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0, "print_hide_if_no_value": 0,
"read_only": 0, "read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
@ -114,6 +127,7 @@
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"columns": 0,
"fieldname": "grade_intervals", "fieldname": "grade_intervals",
"fieldtype": "Table", "fieldtype": "Table",
"hidden": 0, "hidden": 0,
@ -121,6 +135,7 @@
"ignore_xss_filter": 0, "ignore_xss_filter": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"in_standard_filter": 0,
"label": "Grade Intervals", "label": "Grade Intervals",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
@ -130,6 +145,7 @@
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0, "print_hide_if_no_value": 0,
"read_only": 0, "read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 1, "reqd": 1,
"search_index": 0, "search_index": 0,
@ -147,7 +163,7 @@
"issingle": 0, "issingle": 0,
"istable": 0, "istable": 0,
"max_attachments": 0, "max_attachments": 0,
"modified": "2016-08-27 14:20:50.709823", "modified": "2016-12-14 12:35:39.690256",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Schools", "module": "Schools",
"name": "Grading Structure", "name": "Grading Structure",
@ -164,6 +180,7 @@
"export": 1, "export": 1,
"if_owner": 0, "if_owner": 0,
"import": 0, "import": 0,
"is_custom": 0,
"permlevel": 0, "permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,

View File

@ -10,7 +10,7 @@ def get_data():
'items': ['Student Log', 'Student Batch', 'Student Group', 'Program Enrollment'] 'items': ['Student Log', 'Student Batch', 'Student Group', 'Program Enrollment']
}, },
{ {
'items': ['Fees', 'Assessment', 'Student Attendance', 'Student Leave Application'] 'items': ['Fees', 'Assessment Result', 'Student Attendance', 'Student Leave Application']
} }
] ]
} }