commit
ed94aa4798
@ -128,7 +128,11 @@ def get_data():
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Evaluation Criteria"
|
"name": "Assessment Criteria"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "Assessment Criteria Group"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
|
|||||||
@ -369,4 +369,5 @@ erpnext.patches.v7_2.mark_students_active
|
|||||||
erpnext.patches.v7_2.set_null_value_to_fields
|
erpnext.patches.v7_2.set_null_value_to_fields
|
||||||
erpnext.patches.v7_2.update_guardian_name_in_student_master
|
erpnext.patches.v7_2.update_guardian_name_in_student_master
|
||||||
erpnext.patches.v7_2.update_abbr_in_salary_slips
|
erpnext.patches.v7_2.update_abbr_in_salary_slips
|
||||||
|
erpnext.patches.v7_2.rename_evaluation_criteria
|
||||||
erpnext.patches.v7_2.update_party_type
|
erpnext.patches.v7_2.update_party_type
|
||||||
24
erpnext/patches/v7_2/rename_evaluation_criteria.py
Normal file
24
erpnext/patches/v7_2/rename_evaluation_criteria.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import frappe
|
||||||
|
from frappe.model.utils.rename_field import rename_field
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
frappe.rename_doc("DocType", "Evaluation Criteria", "Assessment Criteria", force=True)
|
||||||
|
frappe.reload_doc("schools", "doctype", "assessment_criteria")
|
||||||
|
rename_field("Assessment Criteria", "evaluation_criteria", "assessment_criteria")
|
||||||
|
|
||||||
|
frappe.rename_doc("DocType", "Assessment Evaluation Criteria", "Assessment Plan Criteria", force=True)
|
||||||
|
frappe.reload_doc("schools", "doctype", "assessment_plan_criteria")
|
||||||
|
rename_field("Assessment Plan Criteria", "evaluation_criteria", "assessment_criteria")
|
||||||
|
|
||||||
|
frappe.reload_doc("schools", "doctype", "assessment_plan")
|
||||||
|
rename_field("Assessment Plan", "evaluation_criterias", "assessment_criteria")
|
||||||
|
|
||||||
|
frappe.reload_doc("schools", "doctype", "assessment_result_detail")
|
||||||
|
rename_field("Assessment Result Detail", "evaluation_criteria", "assessment_criteria")
|
||||||
|
|
||||||
|
frappe.rename_doc("DocType", "Course Evaluation Criteria", "Course Assessment Criteria", force=True)
|
||||||
|
frappe.reload_doc("schools", "doctype", "course_assessment_criteria")
|
||||||
|
rename_field("Course Assessment Criteria", "evaluation_criteria", "assessment_criteria")
|
||||||
|
|
||||||
|
frappe.reload_doc("schools", "doctype", "course")
|
||||||
|
rename_field("Course", "evaluation_criterias", "assessment_criteria")
|
||||||
@ -17,7 +17,7 @@ def execute():
|
|||||||
|
|
||||||
frappe.reload_doc("schools", "doctype", "assessment_result")
|
frappe.reload_doc("schools", "doctype", "assessment_result")
|
||||||
frappe.reload_doc("schools", "doctype", "assessment_result_detail")
|
frappe.reload_doc("schools", "doctype", "assessment_result_detail")
|
||||||
frappe.reload_doc("schools", "doctype", "evaluation_criteria")
|
frappe.reload_doc("schools", "doctype", "assessment_criteria")
|
||||||
|
|
||||||
|
|
||||||
for assessment in frappe.get_all("Assessment Plan", fields=["name", "grading_scale"], filters = [["docstatus", "!=", 2 ]]):
|
for assessment in frappe.get_all("Assessment Plan", fields=["name", "grading_scale"], filters = [["docstatus", "!=", 2 ]]):
|
||||||
|
|||||||
@ -3,14 +3,14 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th style="width: 100px" rowspan="2">Student</th>
|
<th style="width: 100px" rowspan="2">Student</th>
|
||||||
<th style="width: 200px" rowspan="2">Student Name</th>
|
<th style="width: 200px" rowspan="2">Student Name</th>
|
||||||
{% for c in criterias %}
|
{% for c in criteria %}
|
||||||
<th class="score" style="width: 100px">{{ c.evaluation_criteria }}</th>
|
<th class="score" style="width: 100px">{{ c.assessment_criteria }}</th>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<th class="score" style="width: 100px">Total Marks</th>
|
<th class="score" style="width: 100px">Total Marks</th>
|
||||||
<!--criteria-->
|
<!--criteria-->
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
{% for c in criterias %}
|
{% for c in criteria %}
|
||||||
<th class="score" style="width: 100px">{{ c.maximum_score }}</th>
|
<th class="score" style="width: 100px">{{ c.maximum_score }}</th>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<th class="score" style="width: 100px">{{max_total_score}}</th>
|
<th class="score" style="width: 100px">{{max_total_score}}</th>
|
||||||
@ -23,15 +23,15 @@
|
|||||||
data-student="{{s.student}}">
|
data-student="{{s.student}}">
|
||||||
<td>{{ s.student }}</td>
|
<td>{{ s.student }}</td>
|
||||||
<td>{{ s.student_name }}</td>
|
<td>{{ s.student_name }}</td>
|
||||||
{% for c in criterias %}
|
{% for c in criteria %}
|
||||||
<td>
|
<td>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
data-max-score="{{c.maximum_score}}"
|
data-max-score="{{c.maximum_score}}"
|
||||||
data-criteria="{{c.evaluation_criteria}}"
|
data-criteria="{{c.assessment_criteria}}"
|
||||||
data-student="{{s.student}}"
|
data-student="{{s.student}}"
|
||||||
{% if(s.assessment_details) { %}
|
{% if(s.assessment_details) { %}
|
||||||
disabled
|
disabled
|
||||||
value="{{s.assessment_details[c.evaluation_criteria]}}"
|
value="{{s.assessment_details[c.assessment_criteria]}}"
|
||||||
{% } %}/>
|
{% } %}/>
|
||||||
</td>
|
</td>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@ -167,13 +167,13 @@ def get_course_schedule_events(start, end, filters=None):
|
|||||||
return data
|
return data
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_evaluation_criterias(course):
|
def get_assessment_criteria(course):
|
||||||
"""Returns Evaluation Criterias and their Weightage from Course Master.
|
"""Returns Assessmemt Criteria and their Weightage from Course Master.
|
||||||
|
|
||||||
:param Course: Course
|
:param Course: Course
|
||||||
"""
|
"""
|
||||||
return frappe.get_list("Course Evaluation Criteria", \
|
return frappe.get_list("Course Assessment Criteria", \
|
||||||
fields=["evaluation_criteria", "weightage"], filters={"parent": course}, order_by= "idx")
|
fields=["assessment_criteria", "weightage"], filters={"parent": course}, order_by= "idx")
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_assessment_students(assessment_plan, student_group=None, student_batch=None):
|
def get_assessment_students(assessment_plan, student_group=None, student_batch=None):
|
||||||
@ -187,7 +187,7 @@ def get_assessment_students(assessment_plan, student_group=None, student_batch=N
|
|||||||
if result:
|
if result:
|
||||||
student_result = {}
|
student_result = {}
|
||||||
for d in result.details:
|
for d in result.details:
|
||||||
student_result.update({d.evaluation_criteria: cstr(d.score) + " ("+ d.grade + ")"})
|
student_result.update({d.assessment_criteria: cstr(d.score) + " ("+ d.grade + ")"})
|
||||||
student_result.update({"total_score": cstr(result.total_score) + " (" + result.grade + ")"})
|
student_result.update({"total_score": cstr(result.total_score) + " (" + result.grade + ")"})
|
||||||
student.update({'assessment_details': student_result})
|
student.update({'assessment_details': student_result})
|
||||||
else:
|
else:
|
||||||
@ -196,12 +196,12 @@ def get_assessment_students(assessment_plan, student_group=None, student_batch=N
|
|||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_assessment_details(assessment_plan):
|
def get_assessment_details(assessment_plan):
|
||||||
"""Returns Evaluation Criteria and Maximum Score from Assessment Plan Master.
|
"""Returns Assessment Criteria and Maximum Score from Assessment Plan Master.
|
||||||
|
|
||||||
:param Assessment Plan: Assessment Plan
|
:param Assessment Plan: Assessment Plan
|
||||||
"""
|
"""
|
||||||
return frappe.get_list("Assessment Evaluation Criteria", \
|
return frappe.get_list("Assessment Plan Criteria", \
|
||||||
fields=["evaluation_criteria", "maximum_score"], filters={"parent": assessment_plan}, order_by= "idx")
|
fields=["assessment_criteria", "maximum_score"], filters={"parent": assessment_plan}, order_by= "idx")
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_result(student, assessment_plan):
|
def get_result(student, assessment_plan):
|
||||||
@ -241,7 +241,7 @@ def mark_assessment_result(student, assessment_plan, scores):
|
|||||||
details = []
|
details = []
|
||||||
for s in student_score.keys():
|
for s in student_score.keys():
|
||||||
details.append({
|
details.append({
|
||||||
"evaluation_criteria": s,
|
"assessment_criteria": s,
|
||||||
"score": flt(student_score[s])
|
"score": flt(student_score[s])
|
||||||
})
|
})
|
||||||
assessment_result = frappe.new_doc("Assessment Result")
|
assessment_result = frappe.new_doc("Assessment Result")
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
|
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('Evaluation Criteria', {
|
frappe.ui.form.on('Assessment Criteria', {
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -0,0 +1,118 @@
|
|||||||
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
|
"allow_import": 1,
|
||||||
|
"allow_rename": 0,
|
||||||
|
"autoname": "field:assessment_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": "assessment_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": "Assessment 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
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "assessment_criteria_group",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Assessment Criteria Group",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Assessment Criteria Group",
|
||||||
|
"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,
|
||||||
|
"modified": "2017-02-01 17:41:48.994388",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Schools",
|
||||||
|
"name": "Assessment 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,
|
||||||
|
"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_changes": 0,
|
||||||
|
"track_seen": 0
|
||||||
|
}
|
||||||
@ -6,5 +6,5 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class EvaluationCriteria(Document):
|
class AssessmentCriteria(Document):
|
||||||
pass
|
pass
|
||||||
@ -6,7 +6,7 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
# test_records = frappe.get_test_records('Evaluation Criteria')
|
# test_records = frappe.get_test_records('Assessment Criteria')
|
||||||
|
|
||||||
class TestEvaluationCriteria(unittest.TestCase):
|
class TestAssessmentCriteria(unittest.TestCase):
|
||||||
pass
|
pass
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"assessment_criteria": "_Test Assessment Criteria"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"assessment_criteria": "_Test Assessment Criteria 1"
|
||||||
|
}
|
||||||
|
]
|
||||||
@ -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 Criteria Group', {
|
||||||
|
refresh: function(frm) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 0,
|
"allow_rename": 1,
|
||||||
"autoname": "field:evaluation_criteria",
|
"autoname": "field:assessment_criteria_group",
|
||||||
"beta": 0,
|
"beta": 0,
|
||||||
"creation": "2016-12-14 16:40:15.144115",
|
"creation": "2017-01-27 15:17:38.855910",
|
||||||
"custom": 0,
|
"custom": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
@ -17,7 +17,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"fieldname": "evaluation_criteria",
|
"fieldname": "assessment_criteria_group",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
@ -25,7 +25,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Evaluation Criteria",
|
"label": "Assessment Criteria Group",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@ -51,10 +51,10 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-12-14 16:40:36.351183",
|
"modified": "2017-02-01 17:39:12.453618",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Evaluation Criteria",
|
"name": "Assessment Criteria Group",
|
||||||
"name_case": "",
|
"name_case": "",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
@ -68,7 +68,6 @@
|
|||||||
"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,
|
||||||
@ -85,5 +84,6 @@
|
|||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 0,
|
||||||
"track_seen": 0
|
"track_seen": 0
|
||||||
}
|
}
|
||||||
@ -6,5 +6,5 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class CourseEvaluationCriteria(Document):
|
class AssessmentCriteriaGroup(Document):
|
||||||
pass
|
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 Criteria Group')
|
||||||
|
|
||||||
|
class TestAssessmentCriteriaGroup(unittest.TestCase):
|
||||||
|
pass
|
||||||
@ -21,20 +21,20 @@ frappe.ui.form.on("Assessment Plan", {
|
|||||||
course: function(frm) {
|
course: function(frm) {
|
||||||
if (frm.doc.course && frm.doc.maximum_assessment_score) {
|
if (frm.doc.course && frm.doc.maximum_assessment_score) {
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "erpnext.schools.api.get_evaluation_criterias",
|
method: "erpnext.schools.api.get_assessment_criteria",
|
||||||
args: {
|
args: {
|
||||||
course: frm.doc.course
|
course: frm.doc.course
|
||||||
},
|
},
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if (r.message) {
|
if (r.message) {
|
||||||
frm.doc.evaluation_criterias = [];
|
frm.doc.assessment_criteria = [];
|
||||||
$.each(r.message, function(i, d) {
|
$.each(r.message, function(i, d) {
|
||||||
var row = frappe.model.add_child(frm.doc, "Assessment Evaluation Criteria", "evaluation_criterias");
|
var row = frappe.model.add_child(frm.doc, "Assessment Plan Criteria", "assessment_criteria");
|
||||||
row.evaluation_criteria = d.evaluation_criteria;
|
row.assessment_criteria = d.assessment_criteria;
|
||||||
row.maximum_score = d.weightage / 100 * frm.doc.maximum_assessment_score;
|
row.maximum_score = d.weightage / 100 * frm.doc.maximum_assessment_score;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
refresh_field("evaluation_criterias");
|
refresh_field("assessment_criteria");
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -639,7 +639,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"fieldname": "evaluation_criterias",
|
"fieldname": "assessment_criteria",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
@ -647,10 +647,10 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Evaluation Criterias",
|
"label": "Assessment Criteria",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Assessment Evaluation Criteria",
|
"options": "Assessment Plan Criteria",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@ -703,7 +703,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2017-01-05 12:15:33.183100",
|
"modified": "2017-02-01 17:22:11.816270",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Assessment Plan",
|
"name": "Assessment Plan",
|
||||||
@ -720,7 +720,6 @@
|
|||||||
"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,
|
||||||
|
|||||||
@ -46,7 +46,7 @@ class AssessmentPlan(Document):
|
|||||||
|
|
||||||
def validate_max_score(self):
|
def validate_max_score(self):
|
||||||
max_score = 0
|
max_score = 0
|
||||||
for d in self.evaluation_criterias:
|
for d in self.assessment_criteria:
|
||||||
max_score += d.maximum_score
|
max_score += d.maximum_score
|
||||||
if self.maximum_assessment_score != max_score:
|
if self.maximum_assessment_score != max_score:
|
||||||
frappe.throw(_("Sum of Scores of Evaluation Criterias needs to be {0}.".format(self.maximum_assessment_score)))
|
frappe.throw(_("Sum of Scores of Assessment Criteria needs to be {0}.".format(self.maximum_assessment_score)))
|
||||||
@ -17,7 +17,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"fieldname": "evaluation_criteria",
|
"fieldname": "assessment_criteria",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
@ -25,10 +25,10 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Evaluation Criteria",
|
"label": "Assessment Criteria",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Evaluation Criteria",
|
"options": "Assessment Criteria",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@ -108,10 +108,10 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-12-14 17:31:11.950549",
|
"modified": "2017-02-01 17:11:47.164623",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Assessment Evaluation Criteria",
|
"name": "Assessment Plan Criteria",
|
||||||
"name_case": "",
|
"name_case": "",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [],
|
"permissions": [],
|
||||||
@ -120,5 +120,6 @@
|
|||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 0,
|
||||||
"track_seen": 0
|
"track_seen": 0
|
||||||
}
|
}
|
||||||
@ -6,5 +6,5 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class AssessmentEvaluationCriteria(Document):
|
class AssessmentPlanCriteria(Document):
|
||||||
pass
|
pass
|
||||||
@ -17,7 +17,7 @@ frappe.ui.form.on("Assessment Result", {
|
|||||||
frm.doc.details = [];
|
frm.doc.details = [];
|
||||||
$.each(r.message, function(i, d) {
|
$.each(r.message, function(i, d) {
|
||||||
var row = frappe.model.add_child(frm.doc, "Assessment Result Detail", "details");
|
var row = frappe.model.add_child(frm.doc, "Assessment Result Detail", "details");
|
||||||
row.evaluation_criteria = d.evaluation_criteria;
|
row.assessment_criteria = d.assessment_criteria;
|
||||||
row.maximum_score = d.maximum_score;
|
row.maximum_score = d.maximum_score;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,10 +21,10 @@ class AssessmentResult(Document):
|
|||||||
assessment_details = get_assessment_details(self.assessment_plan)
|
assessment_details = get_assessment_details(self.assessment_plan)
|
||||||
max_scores = {}
|
max_scores = {}
|
||||||
for d in assessment_details:
|
for d in assessment_details:
|
||||||
max_scores.update({d.evaluation_criteria: d.maximum_score})
|
max_scores.update({d.assessment_criteria: d.maximum_score})
|
||||||
|
|
||||||
for d in self.details:
|
for d in self.details:
|
||||||
d.maximum_score = max_scores.get(d.evaluation_criteria)
|
d.maximum_score = max_scores.get(d.assessment_criteria)
|
||||||
if d.score > d.maximum_score:
|
if d.score > d.maximum_score:
|
||||||
frappe.throw(_("Score cannot be greater than Maximum Score"))
|
frappe.throw(_("Score cannot be greater than Maximum Score"))
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 4,
|
"columns": 4,
|
||||||
"fieldname": "evaluation_criteria",
|
"fieldname": "assessment_criteria",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
@ -25,10 +25,10 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Evaluation Criteria",
|
"label": "Assessment Criteria",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Evaluation Criteria",
|
"options": "Assessment Criteria",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@ -164,7 +164,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-12-27 16:18:12.022257",
|
"modified": "2017-02-01 18:33:06.006040",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Assessment Result Detail",
|
"name": "Assessment Result Detail",
|
||||||
@ -176,5 +176,6 @@
|
|||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 0,
|
||||||
"track_seen": 0
|
"track_seen": 0
|
||||||
}
|
}
|
||||||
@ -39,15 +39,15 @@ frappe.ui.form.on('Assessment Result Tool', {
|
|||||||
assessment_plan: assessment_plan
|
assessment_plan: assessment_plan
|
||||||
},
|
},
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
var criterias = r.message;
|
var criteria_list = r.message;
|
||||||
var max_total_score = 0;
|
var max_total_score = 0;
|
||||||
criterias.forEach(function(c) {
|
criteria_list.forEach(function(c) {
|
||||||
max_total_score += c.maximum_score
|
max_total_score += c.maximum_score
|
||||||
});
|
});
|
||||||
var result_table = $(frappe.render_template('assessment_result_tool', {
|
var result_table = $(frappe.render_template('assessment_result_tool', {
|
||||||
frm: frm,
|
frm: frm,
|
||||||
students: students,
|
students: students,
|
||||||
criterias: criterias,
|
criteria: criteria_list,
|
||||||
max_total_score: max_total_score
|
max_total_score: max_total_score
|
||||||
}));
|
}));
|
||||||
result_table.appendTo(frm.fields_dict.result_html.wrapper)
|
result_table.appendTo(frm.fields_dict.result_html.wrapper)
|
||||||
@ -67,7 +67,8 @@ frappe.ui.form.on('Assessment Result Tool', {
|
|||||||
value = max_score;
|
value = max_score;
|
||||||
}
|
}
|
||||||
student_scores[student][criteria] = value;
|
student_scores[student][criteria] = value;
|
||||||
if(Object.keys(student_scores[student]).length == criterias.length) {
|
if(Object.keys(student_scores[student]).length == criteria_list.length) {
|
||||||
|
console.log("ok");
|
||||||
frappe.call(({
|
frappe.call(({
|
||||||
method: "erpnext.schools.api.mark_assessment_result",
|
method: "erpnext.schools.api.mark_assessment_result",
|
||||||
args: {
|
args: {
|
||||||
@ -87,7 +88,7 @@ frappe.ui.form.on('Assessment Result Tool', {
|
|||||||
var criteria = $input.data().criteria;
|
var criteria = $input.data().criteria;
|
||||||
var value = $input.val();
|
var value = $input.val();
|
||||||
var grade = details.find(function(d) {
|
var grade = details.find(function(d) {
|
||||||
return d.evaluation_criteria === criteria;
|
return d.assessment_criteria === criteria;
|
||||||
}).grade;
|
}).grade;
|
||||||
$input.val(`${value} (${grade})`);
|
$input.val(`${value} (${grade})`);
|
||||||
$input.attr('disabled', true);
|
$input.attr('disabled', true);
|
||||||
|
|||||||
@ -11,7 +11,8 @@
|
|||||||
"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,
|
||||||
@ -268,7 +269,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"fieldname": "evaluation_criterias",
|
"fieldname": "assessment_criteria",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
@ -276,10 +277,10 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Evaluation Criterias",
|
"label": "Assessment Criteria",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Course Evaluation Criteria",
|
"options": "Course Assessment Criteria",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@ -304,13 +305,14 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2016-12-14 16:48:16.642813",
|
"modified": "2017-02-01 17:24:52.874364",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Course",
|
"name": "Course",
|
||||||
"name_case": "",
|
"name_case": "",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [{
|
"permissions": [
|
||||||
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
"apply_user_permissions": 0,
|
"apply_user_permissions": 0,
|
||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
@ -320,7 +322,6 @@
|
|||||||
"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,
|
||||||
@ -358,5 +359,6 @@
|
|||||||
"search_fields": "department",
|
"search_fields": "department",
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 0,
|
||||||
"track_seen": 0
|
"track_seen": 0
|
||||||
}
|
}
|
||||||
@ -9,12 +9,12 @@ from frappe import _
|
|||||||
|
|
||||||
class Course(Document):
|
class Course(Document):
|
||||||
def validate(self):
|
def validate(self):
|
||||||
self.validate_evaluation_criterias()
|
self.validate_assessment_criteria()
|
||||||
|
|
||||||
def validate_evaluation_criterias(self):
|
def validate_assessment_criteria(self):
|
||||||
if self.evaluation_criterias:
|
if self.assessment_criteria:
|
||||||
total_weightage = 0
|
total_weightage = 0
|
||||||
for criteria in self.evaluation_criterias:
|
for criteria in self.assessment_criteria:
|
||||||
total_weightage += criteria.weightage
|
total_weightage += criteria.weightage
|
||||||
if total_weightage != 100:
|
if total_weightage != 100:
|
||||||
frappe.throw(_("Total Weightage of all Evaluation Criterias must be 100%"))
|
frappe.throw(_("Total Weightage of all Assessment Criteria must be 100%"))
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"fieldname": "evaluation_criteria",
|
"fieldname": "assessment_criteria",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
@ -25,10 +25,10 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Evaluation Criteria",
|
"label": "Assessment Criteria",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Evaluation Criteria",
|
"options": "Assessment Criteria",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@ -108,10 +108,10 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-12-14 16:59:17.353023",
|
"modified": "2017-02-01 18:01:40.682674",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Course Evaluation Criteria",
|
"name": "Course Assessment Criteria",
|
||||||
"name_case": "",
|
"name_case": "",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [],
|
"permissions": [],
|
||||||
@ -120,5 +120,6 @@
|
|||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 0,
|
||||||
"track_seen": 0
|
"track_seen": 0
|
||||||
}
|
}
|
||||||
@ -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 CourseAssessmentCriteria(Document):
|
||||||
|
pass
|
||||||
@ -1,8 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"evaluation_criteria": "_Test Evaluation Criteria"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"evaluation_criteria": "_Test Evaluation Criteria 1"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
Loading…
x
Reference in New Issue
Block a user