Additional fields in the instructor doctype for the academics log and minor permission changes (#12204)

diff --git a/erpnext/docs/assets/img/education/setup/instructor.png b/erpnext/docs/assets/img/education/setup/instructor.png
index 8ea86bb..d69f194 100644
--- a/erpnext/docs/assets/img/education/setup/instructor.png
+++ b/erpnext/docs/assets/img/education/setup/instructor.png
Binary files differ
diff --git a/erpnext/docs/user/manual/en/education/setup/instructor.md b/erpnext/docs/user/manual/en/education/setup/instructor.md
index 2b53ce1..219413d 100644
--- a/erpnext/docs/user/manual/en/education/setup/instructor.md
+++ b/erpnext/docs/user/manual/en/education/setup/instructor.md
@@ -1,18 +1,20 @@
 # Instructor
 
-An instructoe is a teacher, or professor, of a specialised subject that involves skill. 
+An Instructor can be a teacher, tutor, coach, or professor, of a specialised subject that involves any skill.
 
-You can create an Instructor and link it to the Employee master and a Departmemt.
+To create new Instructor go to:
+
+> Education > Instructor > New
 
 <img class="screenshot" alt="Instructor" src="/docs/assets/img/education/setup/instructor.png">
 
-An **Instructor** is further linked to a **Course Schedule**, where you can define the schedule for a **Course** for a give date and **Room no**.
+An **Instructor** can also be linked to a **Course Schedule**, where you can define the schedule for a **Course** for a give date and **Room no**.
 
-<img class="screenshot" alt="Instructor" src="/docs/assets/img/education/setup/instructor.gif">
-It is also linked to **Student group** where an **Instructor** is assigned to the Student group.
+It is also linked to **Student group** where an **Instructor** is assigned to the Student Group.
 
-<img class="screenshot" alt="Instructor" src="/docs/assets/img/education/setup/student-group-instructor.gif">
+While creating the **Assessment Plan** for a Student Group, **Instructor** can be linked as the Examiner or the Supervisor for that assessment.
 
-An **Instructor** is also linked to an **Assesment Plan** for a Student group. The Instructor can be an Examiner or the supervisor for the assesment. 
+Further, the log for the Instructor can be entered in the Instructor Log table which can be used for keeping the records of subjects taught by that Instructor.
+
 
 {next}
\ No newline at end of file
diff --git a/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.json b/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.json
index 1ea5062..ddef100 100644
--- a/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.json
+++ b/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.json
@@ -175,7 +175,7 @@
  "issingle": 1, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2017-11-10 18:55:54.438981", 
+ "modified": "2017-12-27 09:36:37.155890", 
  "modified_by": "Administrator", 
  "module": "Education", 
  "name": "Assessment Result Tool", 
@@ -201,6 +201,26 @@
    "share": 0, 
    "submit": 0, 
    "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "apply_user_permissions": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 0, 
+   "export": 0, 
+   "if_owner": 0, 
+   "import": 0, 
+   "permlevel": 0, 
+   "print": 0, 
+   "read": 1, 
+   "report": 0, 
+   "role": "Instructor", 
+   "set_user_permissions": 0, 
+   "share": 0, 
+   "submit": 0, 
+   "write": 1
   }
  ], 
  "quick_entry": 1, 
diff --git a/erpnext/education/doctype/instructor/instructor.js b/erpnext/education/doctype/instructor/instructor.js
index 51d2886..62d73b3 100644
--- a/erpnext/education/doctype/instructor/instructor.js
+++ b/erpnext/education/doctype/instructor/instructor.js
@@ -3,11 +3,29 @@
 
 frappe.ui.form.on("Instructor", "refresh", function(frm) {
 	if(!frm.doc.__islocal) {
+		frm.add_custom_button(__("Student Group"), function() {
+			frappe.route_options = {
+				instructor: frm.doc.name
+			}
+			frappe.set_route("List", "Student Group");
+		});
 		frm.add_custom_button(__("Course Schedule"), function() {
 			frappe.route_options = {
 				instructor: frm.doc.name
 			}
 			frappe.set_route("List", "Course Schedule");
 		});
+		frm.add_custom_button(__("As Examiner"), function() {
+			frappe.route_options = {
+				examiner: frm.doc.name
+			}
+			frappe.set_route("List", "Assessment Plan");
+		}, __("Assessment Plan"));
+		frm.add_custom_button(__("As Supervisor"), function() {
+			frappe.route_options = {
+				supervisor: frm.doc.name
+			}
+			frappe.set_route("List", "Assessment Plan");
+		}, __("Assessment Plan"));
 	}
 });
diff --git a/erpnext/education/doctype/instructor/instructor.json b/erpnext/education/doctype/instructor/instructor.json
index 865e07c..0aeedb6 100644
--- a/erpnext/education/doctype/instructor/instructor.json
+++ b/erpnext/education/doctype/instructor/instructor.json
@@ -194,6 +194,67 @@
    "search_index": 0, 
    "set_only_once": 0, 
    "unique": 0
+  }, 
+  {
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "log_details", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Instructor Log", 
+   "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_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "instructor_log", 
+   "fieldtype": "Table", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Instructor Log", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Instructor Log", 
+   "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
   }
  ], 
  "has_web_view": 0, 
@@ -208,7 +269,7 @@
  "istable": 0, 
  "max_attachments": 0, 
  "menu_index": 0, 
- "modified": "2017-11-10 19:00:20.354954", 
+ "modified": "2017-12-27 09:23:46.973763", 
  "modified_by": "Administrator", 
  "module": "Education", 
  "name": "Instructor", 
@@ -219,6 +280,26 @@
    "amend": 0, 
    "apply_user_permissions": 0, 
    "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "export": 0, 
+   "if_owner": 0, 
+   "import": 0, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Instructor", 
+   "set_user_permissions": 0, 
+   "share": 0, 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "apply_user_permissions": 0, 
+   "cancel": 0, 
    "create": 1, 
    "delete": 1, 
    "email": 1, 
@@ -229,8 +310,8 @@
    "print": 1, 
    "read": 1, 
    "report": 1, 
-   "role": "Academics User", 
-   "set_user_permissions": 0, 
+   "role": "Education Manager", 
+   "set_user_permissions": 1, 
    "share": 1, 
    "submit": 0, 
    "write": 1
diff --git a/erpnext/education/doctype/instructor_log/__init__.py b/erpnext/education/doctype/instructor_log/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/education/doctype/instructor_log/__init__.py
diff --git a/erpnext/education/doctype/instructor_log/instructor_log.json b/erpnext/education/doctype/instructor_log/instructor_log.json
new file mode 100644
index 0000000..631bfc0
--- /dev/null
+++ b/erpnext/education/doctype/instructor_log/instructor_log.json
@@ -0,0 +1,315 @@
+{
+ "allow_copy": 0, 
+ "allow_guest_to_view": 0, 
+ "allow_import": 0, 
+ "allow_rename": 0, 
+ "beta": 0, 
+ "creation": "2017-12-27 08:55:52.680284", 
+ "custom": 0, 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "", 
+ "editable_grid": 1, 
+ "engine": "InnoDB", 
+ "fields": [
+  {
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "academic_year", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 1, 
+   "in_standard_filter": 0, 
+   "label": "Academic Year", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Academic Year", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "academic_term", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 1, 
+   "in_standard_filter": 0, 
+   "label": "Academic Term", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Academic Term", 
+   "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_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "department", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Department", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Department", 
+   "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_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "column_break_3", 
+   "fieldtype": "Column Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 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_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "program", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 1, 
+   "in_standard_filter": 0, 
+   "label": "Program", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Program", 
+   "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_bulk_edit": 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_global_search": 0, 
+   "in_list_view": 1, 
+   "in_standard_filter": 0, 
+   "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": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "student_group", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Student Group", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Student 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
+  }, 
+  {
+   "allow_bulk_edit": 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_global_search": 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_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "other_details", 
+   "fieldtype": "Small Text", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Other details", 
+   "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
+  }
+ ], 
+ "has_web_view": 0, 
+ "hide_heading": 0, 
+ "hide_toolbar": 0, 
+ "idx": 0, 
+ "image_view": 0, 
+ "in_create": 0, 
+ "is_submittable": 0, 
+ "issingle": 0, 
+ "istable": 1, 
+ "max_attachments": 0, 
+ "modified": "2017-12-27 10:05:22.307860", 
+ "modified_by": "Administrator", 
+ "module": "Education", 
+ "name": "Instructor Log", 
+ "name_case": "", 
+ "owner": "Administrator", 
+ "permissions": [], 
+ "quick_entry": 1, 
+ "read_only": 0, 
+ "read_only_onload": 0, 
+ "show_name_in_global_search": 0, 
+ "sort_field": "modified", 
+ "sort_order": "DESC", 
+ "track_changes": 1, 
+ "track_seen": 0
+}
\ No newline at end of file
diff --git a/erpnext/education/doctype/instructor_log/instructor_log.py b/erpnext/education/doctype/instructor_log/instructor_log.py
new file mode 100644
index 0000000..75217b2
--- /dev/null
+++ b/erpnext/education/doctype/instructor_log/instructor_log.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2017, 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 InstructorLog(Document):
+	pass
diff --git a/erpnext/education/doctype/program_enrollment_tool/program_enrollment_tool.json b/erpnext/education/doctype/program_enrollment_tool/program_enrollment_tool.json
index 2745366..71071cd 100644
--- a/erpnext/education/doctype/program_enrollment_tool/program_enrollment_tool.json
+++ b/erpnext/education/doctype/program_enrollment_tool/program_enrollment_tool.json
@@ -328,7 +328,7 @@
  "issingle": 1, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2017-11-10 19:39:54.858394", 
+ "modified": "2017-12-27 09:35:45.002469", 
  "modified_by": "Administrator", 
  "module": "Education", 
  "name": "Program Enrollment Tool", 
@@ -349,7 +349,7 @@
    "print": 0, 
    "read": 1, 
    "report": 0, 
-   "role": "Academics User", 
+   "role": "Education Manager", 
    "set_user_permissions": 0, 
    "share": 0, 
    "submit": 0, 
diff --git a/erpnext/education/doctype/student_group_creation_tool/student_group_creation_tool.json b/erpnext/education/doctype/student_group_creation_tool/student_group_creation_tool.json
index d759b91..fe7cbdb 100644
--- a/erpnext/education/doctype/student_group_creation_tool/student_group_creation_tool.json
+++ b/erpnext/education/doctype/student_group_creation_tool/student_group_creation_tool.json
@@ -269,7 +269,7 @@
  "issingle": 1, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2017-11-10 19:40:07.862203", 
+ "modified": "2017-12-27 09:35:30.211254", 
  "modified_by": "Administrator", 
  "module": "Education", 
  "name": "Student Group Creation Tool", 
@@ -290,7 +290,7 @@
    "print": 0, 
    "read": 1, 
    "report": 0, 
-   "role": "Academics User", 
+   "role": "Education Manager", 
    "set_user_permissions": 0, 
    "share": 0, 
    "submit": 0,