From a98e936d2691e84dfe266ecd9efd361cbc7b4798 Mon Sep 17 00:00:00 2001 From: scmmishra Date: Thu, 14 Mar 2019 15:24:26 +0530 Subject: [PATCH] chore: Removed LMS Activity Doctype --- .../course_activity/test_course_activity.py | 92 +----- .../doctype/lms_activity/__init__.py | 0 .../doctype/lms_activity/lms_activity.json | 307 ------------------ .../doctype/lms_activity/lms_activity.py | 10 - 4 files changed, 1 insertion(+), 408 deletions(-) delete mode 100644 erpnext/education/doctype/lms_activity/__init__.py delete mode 100644 erpnext/education/doctype/lms_activity/lms_activity.json delete mode 100644 erpnext/education/doctype/lms_activity/lms_activity.py diff --git a/erpnext/education/doctype/course_activity/test_course_activity.py b/erpnext/education/doctype/course_activity/test_course_activity.py index 0c59c17a5d..6745a4f533 100644 --- a/erpnext/education/doctype/course_activity/test_course_activity.py +++ b/erpnext/education/doctype/course_activity/test_course_activity.py @@ -6,96 +6,6 @@ from __future__ import unicode_literals import frappe import unittest -from erpnext.education.doctype.topic.test_topic import make_topic_and_linked_content -from erpnext.education.doctype.course.test_course import make_course_and_linked_topic -from erpnext.education.doctype.program.test_program import make_program_and_linked_courses - - -test_program = frappe._dict({ - "program_name": "_Test Program", - "course": [{ - "course_name": "_Test Course 1", - "topic": [ - { - "topic_name": "_Test Topic 1-1", - "content": [{ - "type": "Article", - "name": "_Test Article 1-1" - },{ - "type": "Article", - "name": "_Test Article 1-2" - } - ] - }, - { - "topic_name": "_Test Topic 1-2", - "content": [{ - "type": "Article", - "name": "_Test Article 1-3" - },{ - "type": "Article", - "name": "_Test Article 1-4" - } - ] - } - ] - }, - { - "course_name": "_Test Course 2", - "topic": [ - { - "topic_name": "_Test Topic 2-1", - "content": [{ - "type": "Article", - "name": "_Test Article 2-1" - },{ - "type": "Article", - "name": "_Test Article 2-2" - } - ] - }, - { - "topic_name": "_Test Topic 2-2", - "content": [{ - "type": "Article", - "name": "_Test Article 2-3" - },{ - "type": "Article", - "name": "_Test Article 2-4" - } - ] - } - ] - }] -}) - class TestCourseActivity(unittest.TestCase): - def setUp(self): - pass + pass -def make_course_activity(enrollment, content_type, content): - activity = frappe.get_all("Course Activity", filters={'enrollment': enrollment, 'content_type': content_type, 'content': content}) - try: - activity = frappe.get_doc("Course Activity", activity[0]['name']) - except (IndexError, frappe.DoesNotExistError): - activity = frappe.get_doc({ - "doctype": "Course Activity", - "enrollment": enrollment, - "content_type": content_type, - "content": content, - "activity_date": frappe.utils.datetime.datetime.now() - }).insert() - return activity - -def setup_program(): - topic_list = [course['topic'] for course in test_program['course']] - for topic in topic_list[0]: - make_topic_and_linked_content(topic['topic_name'], topic['content']) - - all_courses_list = [{'course': course['course_name'], 'topic': [topic['topic_name'] for topic in course['topic']]} for course in test_program['course']] # returns [{'course': 'Applied Math', 'topic': ['Trignometry', 'Geometry']}] - for course in all_courses_list: - make_course_and_linked_topic(course['course'], course['topic']) - - course_list = [course['course_name'] for course in test_program['course']] - program = make_program_and_linked_courses(test_program.program_name, course_list) - return program diff --git a/erpnext/education/doctype/lms_activity/__init__.py b/erpnext/education/doctype/lms_activity/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/lms_activity/lms_activity.json b/erpnext/education/doctype/lms_activity/lms_activity.json deleted file mode 100644 index f120ad6b64..0000000000 --- a/erpnext/education/doctype/lms_activity/lms_activity.json +++ /dev/null @@ -1,307 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2018-10-08 10:59:58.325210", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "course_name", - "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 Name", - "length": 0, - "no_copy": 0, - "options": "Course", - "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, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "content_name.content_type", - "fieldname": "content_type", - "fieldtype": "Data", - "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": "Content Type", - "length": 0, - "no_copy": 0, - "options": "", - "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, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "", - "fieldname": "content_name", - "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": "Content Name", - "length": 0, - "no_copy": 0, - "options": "Content", - "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, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "status", - "fieldtype": "Select", - "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": "Status", - "length": 0, - "no_copy": 0, - "options": "\nCompleted\nPassed\nFailed", - "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, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": "", - "columns": 0, - "depends_on": "eval:doc.content_type == \"Quiz\"", - "fieldname": "quiz_section_section", - "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": "Quiz Section", - "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, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "quiz_score", - "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": "Quiz 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": 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": "selected_options", - "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": "Selected Options", - "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": 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": "result", - "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": "Result", - "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, - "translatable": 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": "2018-10-12 16:14:21.510581", - "modified_by": "Administrator", - "module": "Education", - "name": "LMS Activity", - "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, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/lms_activity/lms_activity.py b/erpnext/education/doctype/lms_activity/lms_activity.py deleted file mode 100644 index cff70cbd8b..0000000000 --- a/erpnext/education/doctype/lms_activity/lms_activity.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2018, 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 LMSActivity(Document): - pass