feat: notes in lesson

This commit is contained in:
Jannat Patel
2025-08-05 20:00:09 +05:30
parent 2271eb270e
commit 77ecb02a17
18 changed files with 1237 additions and 1789 deletions

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2025, Frappe and contributors
// For license information, please see license.txt
// frappe.ui.form.on("LMS Lesson Note", {
// refresh(frm) {
// },
// });

View File

@@ -0,0 +1,140 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "hash",
"creation": "2025-08-04 13:17:19.497483",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"lesson",
"course",
"column_break_qgrb",
"member",
"color",
"section_break_smzm",
"highlighted_text",
"column_break_zvrs",
"note"
],
"fields": [
{
"fieldname": "lesson",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Lesson",
"options": "Course Lesson",
"reqd": 1
},
{
"fetch_from": "lesson.course",
"fieldname": "course",
"fieldtype": "Link",
"label": "Course",
"options": "LMS Course"
},
{
"fieldname": "column_break_qgrb",
"fieldtype": "Column Break"
},
{
"fieldname": "member",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Member",
"options": "User",
"reqd": 1
},
{
"fieldname": "color",
"fieldtype": "Select",
"label": "Color",
"options": "Red\nBlue\nGreen\nYellow\nPurple",
"reqd": 1
},
{
"fieldname": "section_break_smzm",
"fieldtype": "Section Break"
},
{
"fieldname": "highlighted_text",
"fieldtype": "Small Text",
"label": "Highlighted Text"
},
{
"fieldname": "column_break_zvrs",
"fieldtype": "Column Break"
},
{
"fieldname": "note",
"fieldtype": "Text Editor",
"label": "Note"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2025-08-05 19:08:47.858172",
"modified_by": "Administrator",
"module": "LMS",
"name": "LMS Lesson Note",
"naming_rule": "Random",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Moderator",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "LMS Student",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Course Creator",
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"title_field": "member"
}

View File

@@ -0,0 +1,9 @@
# Copyright (c) 2025, Frappe and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class LMSLessonNote(Document):
pass

View File

@@ -0,0 +1,21 @@
# Copyright (c) 2025, Frappe and Contributors
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase
# On IntegrationTestCase, the doctype test records and all
# link-field test record dependencies are recursively loaded
# Use these module variables to add/remove to/from that list
EXTRA_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"]
IGNORE_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"]
class IntegrationTestLMSLessonNote(IntegrationTestCase):
"""
Integration tests for LMSLessonNote.
Use this class for testing interactions between multiple components.
"""
pass