feat: Education dashboard charts and number cards

This commit is contained in:
Rucha Mahabal 2020-07-27 18:50:04 +05:30
parent 49140ccbfd
commit 6c11f26a11
17 changed files with 657 additions and 1311 deletions

View File

@ -0,0 +1,31 @@
{
"based_on": "",
"chart_name": "Course wise Enrollment",
"chart_type": "Group By",
"creation": "2020-07-23 18:24:38.214220",
"docstatus": 0,
"doctype": "Dashboard Chart",
"document_type": "Course Enrollment",
"dynamic_filters_json": "[]",
"filters_json": "[[\"Course Enrollment\",\"enrollment_date\",\"Timespan\",\"this year\",false]]",
"group_by_based_on": "course",
"group_by_type": "Count",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"last_synced_on": "2020-07-27 17:50:32.490587",
"modified": "2020-07-27 17:54:09.829206",
"modified_by": "Administrator",
"module": "Education",
"name": "Course wise Enrollment",
"number_of_groups": 0,
"owner": "Administrator",
"source": "",
"time_interval": "Yearly",
"timeseries": 0,
"timespan": "Last Year",
"type": "Percentage",
"use_report_chart": 0,
"value_based_on": "",
"y_axis": []
}

View File

@ -0,0 +1,31 @@
{
"based_on": "",
"chart_name": "Course wise Student Count",
"chart_type": "Group By",
"creation": "2020-07-27 17:24:39.136163",
"docstatus": 0,
"doctype": "Dashboard Chart",
"document_type": "Course Enrollment",
"dynamic_filters_json": "[]",
"filters_json": "[[\"Course Enrollment\",\"enrollment_date\",\"Timespan\",\"this year\",false]]",
"group_by_based_on": "course",
"group_by_type": "Count",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"last_synced_on": "2020-07-27 17:24:56.184236",
"modified": "2020-07-27 17:25:46.232846",
"modified_by": "Administrator",
"module": "Education",
"name": "Course wise Student Count",
"number_of_groups": 0,
"owner": "Administrator",
"source": "",
"time_interval": "Yearly",
"timeseries": 0,
"timespan": "Last Year",
"type": "Donut",
"use_report_chart": 0,
"value_based_on": "",
"y_axis": []
}

View File

@ -0,0 +1,31 @@
{
"based_on": "",
"chart_name": "Instructor Gender Diversity Ratio",
"chart_type": "Group By",
"creation": "2020-07-23 18:35:02.544019",
"docstatus": 0,
"doctype": "Dashboard Chart",
"document_type": "Instructor",
"dynamic_filters_json": "[]",
"filters_json": "[[\"Instructor\",\"status\",\"=\",\"Active\",false]]",
"group_by_based_on": "gender",
"group_by_type": "Count",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"last_synced_on": "2020-07-27 17:50:32.783820",
"modified": "2020-07-27 17:55:41.595260",
"modified_by": "Administrator",
"module": "Education",
"name": "Instructor Gender Diversity Ratio",
"number_of_groups": 0,
"owner": "Administrator",
"source": "",
"time_interval": "Yearly",
"timeseries": 0,
"timespan": "Last Year",
"type": "Donut",
"use_report_chart": 0,
"value_based_on": "",
"y_axis": []
}

View File

@ -0,0 +1,30 @@
{
"based_on": "enrollment_date",
"chart_name": "Program Enrollments",
"chart_type": "Count",
"creation": "2020-07-23 18:27:53.641616",
"docstatus": 0,
"doctype": "Dashboard Chart",
"document_type": "Program Enrollment",
"dynamic_filters_json": "[]",
"filters_json": "[[\"Program Enrollment\",\"docstatus\",\"=\",\"1\",false]]",
"group_by_type": "Count",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"last_synced_on": "2020-07-27 17:50:32.203069",
"modified": "2020-07-27 17:51:59.022909",
"modified_by": "Administrator",
"module": "Education",
"name": "Program Enrollments",
"number_of_groups": 0,
"owner": "Administrator",
"source": "",
"time_interval": "Daily",
"timeseries": 1,
"timespan": "Last Month",
"type": "Line",
"use_report_chart": 0,
"value_based_on": "",
"y_axis": []
}

View File

@ -0,0 +1,31 @@
{
"based_on": "",
"chart_name": "Program wise Enrollment",
"chart_type": "Group By",
"creation": "2020-07-23 18:23:45.192748",
"docstatus": 0,
"doctype": "Dashboard Chart",
"document_type": "Program Enrollment",
"dynamic_filters_json": "[]",
"filters_json": "[[\"Program Enrollment\",\"docstatus\",\"=\",\"1\",false],[\"Program Enrollment\",\"enrollment_date\",\"Timespan\",\"this year\",false]]",
"group_by_based_on": "program",
"group_by_type": "Count",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"last_synced_on": "2020-07-27 17:50:32.629321",
"modified": "2020-07-27 17:53:36.269098",
"modified_by": "Administrator",
"module": "Education",
"name": "Program wise Enrollment",
"number_of_groups": 0,
"owner": "Administrator",
"source": "",
"time_interval": "Yearly",
"timeseries": 0,
"timespan": "Last Year",
"type": "Percentage",
"use_report_chart": 0,
"value_based_on": "",
"y_axis": []
}

View File

@ -0,0 +1,31 @@
{
"chart_name": "Program wise Fee Collection",
"chart_type": "Report",
"creation": "2020-07-27 16:19:03.077317",
"docstatus": 0,
"doctype": "Dashboard Chart",
"dynamic_filters_json": "{}",
"filters_json": "{}",
"group_by_type": "Count",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"modified": "2020-07-27 16:19:11.333532",
"modified_by": "Administrator",
"module": "Education",
"name": "Program wise Fee Collection",
"number_of_groups": 0,
"owner": "Administrator",
"report_name": "Program wise Fee Collection",
"time_interval": "Yearly",
"timeseries": 0,
"timespan": "Last Year",
"type": "Bar",
"use_report_chart": 0,
"x_field": "Program",
"y_axis": [
{
"y_field": "Fees Collected"
}
]
}

View File

@ -0,0 +1,31 @@
{
"based_on": "",
"chart_name": "Student Category wise Program Enrollments",
"chart_type": "Group By",
"creation": "2020-07-27 17:37:47.116446",
"docstatus": 0,
"doctype": "Dashboard Chart",
"document_type": "Program Enrollment",
"dynamic_filters_json": "[]",
"filters_json": "[[\"Program Enrollment\",\"enrollment_date\",\"Timespan\",\"this year\",false],[\"Program Enrollment\",\"docstatus\",\"=\",\"1\",false]]",
"group_by_based_on": "student_category",
"group_by_type": "Count",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"last_synced_on": "2020-07-27 17:46:54.901911",
"modified": "2020-07-27 17:47:21.370866",
"modified_by": "Administrator",
"module": "Education",
"name": "Student Category wise Program Enrollments",
"number_of_groups": 0,
"owner": "Administrator",
"source": "",
"time_interval": "Yearly",
"timeseries": 0,
"timespan": "Last Year",
"type": "Donut",
"use_report_chart": 0,
"value_based_on": "",
"y_axis": []
}

View File

@ -0,0 +1,30 @@
{
"based_on": "",
"chart_name": "Student Gender Diversity Ratio",
"chart_type": "Group By",
"creation": "2020-07-23 18:12:15.972123",
"docstatus": 0,
"doctype": "Dashboard Chart",
"document_type": "Student",
"dynamic_filters_json": "[]",
"filters_json": "[[\"Student\",\"enabled\",\"=\",1,false]]",
"group_by_based_on": "gender",
"group_by_type": "Count",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"modified": "2020-07-23 18:12:21.606772",
"modified_by": "Administrator",
"module": "Education",
"name": "Student Gender Diversity Ratio",
"number_of_groups": 0,
"owner": "Administrator",
"source": "",
"time_interval": "Yearly",
"timeseries": 0,
"timespan": "Last Year",
"type": "Donut",
"use_report_chart": 0,
"value_based_on": "",
"y_axis": []
}

View File

@ -28,7 +28,7 @@
{
"hidden": 0,
"label": "Fees",
"links": "[\n {\n \"label\": \"Fee Structure\",\n \"name\": \"Fee Structure\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Fee Category\",\n \"name\": \"Fee Category\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Fee Schedule\",\n \"name\": \"Fee Schedule\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Fees\",\n \"name\": \"Fees\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Fees\"\n ],\n \"doctype\": \"Fees\",\n \"is_query_report\": true,\n \"label\": \"Student Fee Collection Report\",\n \"name\": \"Student Fee Collection\",\n \"type\": \"report\"\n }\n]"
"links": "[\n {\n \"label\": \"Fee Structure\",\n \"name\": \"Fee Structure\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Fee Category\",\n \"name\": \"Fee Category\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Fee Schedule\",\n \"name\": \"Fee Schedule\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Fees\",\n \"name\": \"Fees\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Fees\"\n ],\n \"doctype\": \"Fees\",\n \"is_query_report\": true,\n \"label\": \"Student Fee Collection Report\",\n \"name\": \"Student Fee Collection\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Fees\"\n ],\n \"doctype\": \"Fees\",\n \"is_query_report\": true,\n \"label\": \"Program wise Fee Collection Report\",\n \"name\": \"Program wise Fee Collection\",\n \"type\": \"report\"\n }\n]"
},
{
"hidden": 0,
@ -67,7 +67,12 @@
}
],
"category": "Domains",
"charts": [],
"charts": [
{
"chart_name": "Program Enrollments",
"label": "Program Enrollments"
}
],
"creation": "2020-03-02 17:22:57.066401",
"developer_mode_only": 0,
"disable_user_customization": 0,
@ -78,7 +83,7 @@
"idx": 0,
"is_standard": 1,
"label": "Education",
"modified": "2020-07-22 18:56:12.276117",
"modified": "2020-07-27 17:50:13.745212",
"modified_by": "Administrator",
"module": "Education",
"name": "Education",

View File

@ -9,6 +9,7 @@
"field_order": [
"instructor_name",
"employee",
"gender",
"column_break_5",
"status",
"naming_series",
@ -77,11 +78,19 @@
"in_standard_filter": 1,
"label": "Status",
"options": "Active\nLeft"
},
{
"fetch_from": "employee.gender",
"fieldname": "gender",
"fieldtype": "Link",
"label": "Gender",
"options": "Gender",
"read_only_depends_on": "employee"
}
],
"image_field": "image",
"links": [],
"modified": "2020-07-22 18:55:43.699989",
"modified": "2020-07-23 18:33:57.904398",
"modified_by": "Administrator",
"module": "Education",
"name": "Instructor",

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,50 @@
{
"cards": [],
"cards": [
{
"card": "Total Students"
},
{
"card": "Total Instructors"
},
{
"card": "Program Enrollments"
},
{
"card": "Student Applicants to Review"
}
],
"charts": [
{
"chart": "Program Enrollments",
"width": "Full"
},
{
"chart": "Program wise Enrollment",
"width": "Half"
},
{
"chart": "Course wise Enrollment",
"width": "Half"
},
{
"chart": "Course wise Student Count",
"width": "Half"
},
{
"chart": "Student Category wise Program Enrollments",
"width": "Half"
},
{
"chart": "Student Gender Diversity Ratio",
"width": "Half"
},
{
"chart": "Instructor Gender Diversity Ratio",
"width": "Half"
},
{
"chart": "Program wise Fee Collection",
"width": "Full"
}
],
"creation": "2020-07-22 18:51:02.195762",
@ -12,7 +54,7 @@
"idx": 0,
"is_default": 0,
"is_standard": 1,
"modified": "2020-07-22 18:51:02.195762",
"modified": "2020-07-27 18:42:42.872547",
"modified_by": "Administrator",
"module": "Education",
"name": "Education",

View File

@ -0,0 +1,23 @@
{
"aggregate_function_based_on": "",
"creation": "2020-07-27 18:26:27.005186",
"docstatus": 0,
"doctype": "Number Card",
"document_type": "Program Enrollment",
"dynamic_filters_json": "[]",
"filters_json": "[[\"Program Enrollment\",\"docstatus\",\"=\",\"1\",false],[\"Program Enrollment\",\"enrollment_date\",\"Timespan\",\"this year\",false]]",
"function": "Count",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"label": "Program Enrollments",
"modified": "2020-07-27 18:26:32.512624",
"modified_by": "Administrator",
"module": "Education",
"name": "Program Enrollments",
"owner": "Administrator",
"report_function": "Sum",
"show_percentage_stats": 1,
"stats_time_interval": "Yearly",
"type": "Document Type"
}

View File

@ -0,0 +1,23 @@
{
"aggregate_function_based_on": "",
"creation": "2020-07-27 18:42:33.366862",
"docstatus": 0,
"doctype": "Number Card",
"document_type": "Student Applicant",
"dynamic_filters_json": "[]",
"filters_json": "[[\"Student Applicant\",\"application_status\",\"=\",\"Applied\",false]]",
"function": "Count",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"label": "Student Applicants to Review",
"modified": "2020-07-27 18:42:42.739710",
"modified_by": "Administrator",
"module": "Education",
"name": "Student Applicants to Review",
"owner": "Administrator",
"report_function": "Sum",
"show_percentage_stats": 1,
"stats_time_interval": "Monthly",
"type": "Document Type"
}

View File

@ -0,0 +1,23 @@
{
"aggregate_function_based_on": "",
"creation": "2020-07-23 14:19:38.423190",
"docstatus": 0,
"doctype": "Number Card",
"document_type": "Instructor",
"dynamic_filters_json": "[]",
"filters_json": "[[\"Instructor\",\"status\",\"=\",\"Active\",false]]",
"function": "Count",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"label": "Total Instructors",
"modified": "2020-07-23 14:19:47.623306",
"modified_by": "Administrator",
"module": "Education",
"name": "Total Instructors",
"owner": "Administrator",
"report_function": "Sum",
"show_percentage_stats": 1,
"stats_time_interval": "Monthly",
"type": "Document Type"
}

View File

@ -0,0 +1,23 @@
{
"aggregate_function_based_on": "",
"creation": "2020-07-23 14:18:07.732298",
"docstatus": 0,
"doctype": "Number Card",
"document_type": "Student",
"dynamic_filters_json": "[]",
"filters_json": "[[\"Student\",\"enabled\",\"=\",1,false]]",
"function": "Count",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"label": "Total Students",
"modified": "2020-07-23 14:18:40.603947",
"modified_by": "Administrator",
"module": "Education",
"name": "Total Students",
"owner": "Administrator",
"report_function": "Sum",
"show_percentage_stats": 1,
"stats_time_interval": "Monthly",
"type": "Document Type"
}

View File

@ -42,7 +42,7 @@ def execute(filters=None):
# create the list of possible grades
if student_row[scrub_criteria] not in grades:
grades.append(student_row[scrub_criteria])
# create the dict of for gradewise analysis
if student_row[scrub_criteria] not in grade_wise_analysis[criteria]:
grade_wise_analysis[criteria][student_row[scrub_criteria]] = 1
@ -152,7 +152,7 @@ def get_formatted_result(args, get_assessment_criteria=False, get_course=False,
elif create_total_dict:
if get_all_assessment_groups:
formatted_assessment_result[result.student][result.course][result.assessment_group]\
[result.assessment_criteria] = assessment_criteria_details
[result.assessment_criteria] = assessment_criteria_details
if not formatted_assessment_result[result.student][result.course][args.assessment_group]:
formatted_assessment_result[result.student][result.course][args.assessment_group] = defaultdict(dict)
formatted_assessment_result[result.student][result.course][args.assessment_group]\