diff --git a/erpnext/education/doctype/student_course_activity/__init__.py b/erpnext/education/doctype/course_activity/__init__.py similarity index 100% rename from erpnext/education/doctype/student_course_activity/__init__.py rename to erpnext/education/doctype/course_activity/__init__.py diff --git a/erpnext/education/doctype/student_course_activity/student_course_activity.js b/erpnext/education/doctype/course_activity/course_activity.js similarity index 76% rename from erpnext/education/doctype/student_course_activity/student_course_activity.js rename to erpnext/education/doctype/course_activity/course_activity.js index 101abeff2d..5115fc415e 100644 --- a/erpnext/education/doctype/student_course_activity/student_course_activity.js +++ b/erpnext/education/doctype/course_activity/course_activity.js @@ -1,7 +1,7 @@ // Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -frappe.ui.form.on('Student Course Activity', { +frappe.ui.form.on('Course Activity', { refresh: function(frm) { } diff --git a/erpnext/education/doctype/student_course_activity/student_course_activity.json b/erpnext/education/doctype/course_activity/course_activity.json similarity index 87% rename from erpnext/education/doctype/student_course_activity/student_course_activity.json rename to erpnext/education/doctype/course_activity/course_activity.json index c957be7a01..0f7fcb7c31 100644 --- a/erpnext/education/doctype/student_course_activity/student_course_activity.json +++ b/erpnext/education/doctype/course_activity/course_activity.json @@ -1,9 +1,10 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, - "autoname": "format:{student_id}-{program_name}", + "autoname": "field:enrollment", "beta": 0, "creation": "2018-10-01 17:35:54.391413", "custom": 0, @@ -20,40 +21,7 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "student_id", - "fieldtype": "Data", - "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 ID", - "length": 0, - "no_copy": 0, - "options": "Student", - "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": 1, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "program_name", + "fieldname": "enrollment", "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, @@ -62,10 +30,43 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Program Name", + "label": "Enrollment", "length": 0, "no_copy": 0, - "options": "Program", + "options": "Course Enrollment", + "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": 1, + "translatable": 0, + "unique": 1 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "content", + "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": "Content", + "length": 0, + "no_copy": 0, + "options": "Content", "permlevel": 0, "precision": "", "print_hide": 0, @@ -86,8 +87,8 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "lms_activity", - "fieldtype": "Table", + "fieldname": "activity_date", + "fieldtype": "Datetime", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, @@ -95,10 +96,9 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "LMS Activity", + "label": "Activity Date", "length": 0, "no_copy": 0, - "options": "LMS Activity", "permlevel": 0, "precision": "", "print_hide": 0, @@ -123,10 +123,10 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-10-12 13:51:08.729074", + "modified": "2018-10-15 15:47:11.824446", "modified_by": "Administrator", "module": "Education", - "name": "Student Course Activity", + "name": "Course Activity", "name_case": "", "owner": "Administrator", "permissions": [ diff --git a/erpnext/education/doctype/student_course_activity/student_course_activity.py b/erpnext/education/doctype/course_activity/course_activity.py similarity index 96% rename from erpnext/education/doctype/student_course_activity/student_course_activity.py rename to erpnext/education/doctype/course_activity/course_activity.py index 478e309122..c890fade3e 100644 --- a/erpnext/education/doctype/student_course_activity/student_course_activity.py +++ b/erpnext/education/doctype/course_activity/course_activity.py @@ -6,7 +6,7 @@ from __future__ import unicode_literals import frappe from frappe.model.document import Document -class StudentCourseActivity(Document): +class CourseActivity(Document): def validate(self): self.check_if_enrolled() # self.check_if_course_present() diff --git a/erpnext/education/doctype/student_course_activity/test_student_course_activity.js b/erpnext/education/doctype/course_activity/test_course_activity.js similarity index 67% rename from erpnext/education/doctype/student_course_activity/test_student_course_activity.js rename to erpnext/education/doctype/course_activity/test_course_activity.js index df6ce3745e..c89c89e5d3 100644 --- a/erpnext/education/doctype/student_course_activity/test_student_course_activity.js +++ b/erpnext/education/doctype/course_activity/test_course_activity.js @@ -2,15 +2,15 @@ // rename this file from _test_[name] to test_[name] to activate // and remove above this line -QUnit.test("test: Student Course Activity", function (assert) { +QUnit.test("test: Course Activity", function (assert) { let done = assert.async(); // number of asserts assert.expect(1); frappe.run_serially([ - // insert a new Student Course Activity - () => frappe.tests.make('Student Course Activity', [ + // insert a new Course Activity + () => frappe.tests.make('Course Activity', [ // values to be set {key: 'value'} ]), diff --git a/erpnext/education/doctype/student_course_activity/test_student_course_activity.py b/erpnext/education/doctype/course_activity/test_course_activity.py similarity index 78% rename from erpnext/education/doctype/student_course_activity/test_student_course_activity.py rename to erpnext/education/doctype/course_activity/test_course_activity.py index 9045a9ce9b..f014b16441 100644 --- a/erpnext/education/doctype/student_course_activity/test_student_course_activity.py +++ b/erpnext/education/doctype/course_activity/test_course_activity.py @@ -6,5 +6,5 @@ from __future__ import unicode_literals import frappe import unittest -class TestStudentCourseActivity(unittest.TestCase): +class TestCourseActivity(unittest.TestCase): pass