Skip to content

Commit

Permalink
Merge pull request #31 from atrab-ahmed/LMS
Browse files Browse the repository at this point in the history
feat(LMS):  Adding "LMS" Module with Associated Doctypes
  • Loading branch information
BakrAldubai authored Feb 14, 2024
2 parents a27fceb + 1aae6f7 commit 9424ff1
Show file tree
Hide file tree
Showing 38 changed files with 874 additions and 1 deletion.
Empty file added academia/lms/__init__.py
Empty file.
Empty file.
Empty file.
8 changes: 8 additions & 0 deletions academia/lms/doctype/lms_assignment/lms_assignment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (c) 2024, SanU and contributors
// For license information, please see license.txt

// frappe.ui.form.on("LMS Assignment", {
// refresh(frm) {

// },
// });
152 changes: 152 additions & 0 deletions academia/lms/doctype/lms_assignment/lms_assignment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2024-02-07 22:28:04.836582",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"details_section",
"course",
"title",
"student_group",
"column_break_bsqh",
"instruction",
"assignment_type",
"section_break_gimj",
"make_the_assignment_availability",
"from_date",
"column_break_tjfh",
"to_date",
"section_break_epao",
"question",
"attachment",
"column_break_zcpn",
"answer",
"file_upload"
],
"fields": [
{
"fieldname": "details_section",
"fieldtype": "Section Break",
"label": "Details"
},
{
"fieldname": "course",
"fieldtype": "Link",
"label": "Course",
"options": "Course"
},
{
"fieldname": "title",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Title",
"reqd": 1
},
{
"fieldname": "student_group",
"fieldtype": "Link",
"label": "Student Group",
"options": "Student Group"
},
{
"fieldname": "column_break_bsqh",
"fieldtype": "Column Break"
},
{
"fieldname": "instruction",
"fieldtype": "Small Text",
"label": "Instruction"
},
{
"fieldname": "assignment_type",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Assignment Type",
"options": "\nEssay\nFile Upload",
"reqd": 1
},
{
"fieldname": "section_break_gimj",
"fieldtype": "Section Break",
"label": "Availability"
},
{
"default": "0",
"fieldname": "make_the_assignment_availability",
"fieldtype": "Check",
"label": "Make the assignment availability"
},
{
"depends_on": "make_the_assignment_availability",
"fieldname": "from_date",
"fieldtype": "Datetime",
"label": "From Date"
},
{
"fieldname": "column_break_tjfh",
"fieldtype": "Column Break"
},
{
"depends_on": "make_the_assignment_availability",
"fieldname": "to_date",
"fieldtype": "Datetime",
"label": "To Date"
},
{
"fieldname": "section_break_epao",
"fieldtype": "Section Break",
"label": "Assignment"
},
{
"fieldname": "question",
"fieldtype": "Text Editor",
"label": "Question"
},
{
"fieldname": "attachment",
"fieldtype": "Attach",
"label": "Attachment"
},
{
"fieldname": "column_break_zcpn",
"fieldtype": "Column Break"
},
{
"depends_on": "eval:doc.assignment_type == \"Essay\"",
"fieldname": "answer",
"fieldtype": "Text Editor",
"label": "Answer"
},
{
"depends_on": "eval:doc.assignment_type == \"File Upload\"",
"fieldname": "file_upload",
"fieldtype": "Attach",
"label": "File Upload"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-02-11 00:07:28.633103",
"modified_by": "Administrator",
"module": "LMS",
"name": "LMS Assignment",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
9 changes: 9 additions & 0 deletions academia/lms/doctype/lms_assignment/lms_assignment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2024, SanU and contributors
# For license information, please see license.txt

# import frappe
from frappe.model.document import Document


class LMSAssignment(Document):
pass
9 changes: 9 additions & 0 deletions academia/lms/doctype/lms_assignment/test_lms_assignment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2024, SanU and Contributors
# See license.txt

# import frappe
from frappe.tests.utils import FrappeTestCase


class TestLMSAssignment(FrappeTestCase):
pass
Empty file.
8 changes: 8 additions & 0 deletions academia/lms/doctype/lms_quiz/lms_quiz.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (c) 2024, SanU and contributors
// For license information, please see license.txt

// frappe.ui.form.on("LMS Quiz", {
// refresh(frm) {

// },
// });
167 changes: 167 additions & 0 deletions academia/lms/doctype/lms_quiz/lms_quiz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2024-02-08 00:53:46.535927",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"details_section",
"course",
"title",
"student_group",
"column_break_jsvl",
"instruction",
"section_break_mpgl",
"make_the_quiz_availability",
"from_date",
"column_break_llnc",
"to_date",
"section_break_qksq",
"is_time_bound",
"duration",
"grading_basis",
"column_break_feab",
"max_attempts",
"total_grades",
"section_break_euqq",
"question"
],
"fields": [
{
"fieldname": "details_section",
"fieldtype": "Section Break",
"label": "Details"
},
{
"fieldname": "course",
"fieldtype": "Link",
"label": "Course",
"options": "Course"
},
{
"fieldname": "title",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Title",
"reqd": 1
},
{
"fieldname": "student_group",
"fieldtype": "Link",
"label": "Student Group",
"options": "Student Group"
},
{
"fieldname": "column_break_jsvl",
"fieldtype": "Column Break"
},
{
"fieldname": "instruction",
"fieldtype": "Small Text",
"label": "Instruction"
},
{
"fieldname": "section_break_mpgl",
"fieldtype": "Section Break",
"label": "Availability"
},
{
"default": "0",
"fieldname": "make_the_quiz_availability",
"fieldtype": "Check",
"label": "Make the quiz availability"
},
{
"depends_on": "make_the_quiz_availability",
"fieldname": "from_date",
"fieldtype": "Datetime",
"label": "From Date"
},
{
"fieldname": "column_break_llnc",
"fieldtype": "Column Break"
},
{
"depends_on": "make_the_quiz_availability",
"fieldname": "to_date",
"fieldtype": "Datetime",
"label": "To Date"
},
{
"fieldname": "section_break_qksq",
"fieldtype": "Section Break",
"label": "Quiz Configuration"
},
{
"default": "0",
"fieldname": "is_time_bound",
"fieldtype": "Check",
"label": "is Time-Bound"
},
{
"depends_on": "is_time_bound",
"fieldname": "duration",
"fieldtype": "Duration",
"label": "Duration"
},
{
"fieldname": "grading_basis",
"fieldtype": "Select",
"label": "Grading Basis",
"options": "Latest Highest Score\nLastest Attempt"
},
{
"fieldname": "column_break_feab",
"fieldtype": "Column Break"
},
{
"default": "1",
"fieldname": "max_attempts",
"fieldtype": "Int",
"label": "Max Attempts",
"reqd": 1
},
{
"fieldname": "total_grades",
"fieldtype": "Float",
"label": "Total Grades"
},
{
"fieldname": "section_break_euqq",
"fieldtype": "Section Break"
},
{
"fieldname": "question",
"fieldtype": "Table",
"label": "Question",
"options": "Quiz Question",
"reqd": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-02-11 18:14:40.940782",
"modified_by": "Administrator",
"module": "LMS",
"name": "LMS Quiz",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
9 changes: 9 additions & 0 deletions academia/lms/doctype/lms_quiz/lms_quiz.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2024, SanU and contributors
# For license information, please see license.txt

# import frappe
from frappe.model.document import Document


class LMSQuiz(Document):
pass
9 changes: 9 additions & 0 deletions academia/lms/doctype/lms_quiz/test_lms_quiz.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2024, SanU and Contributors
# See license.txt

# import frappe
from frappe.tests.utils import FrappeTestCase


class TestLMSQuiz(FrappeTestCase):
pass
Empty file.
8 changes: 8 additions & 0 deletions academia/lms/doctype/question/question.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (c) 2024, SanU and contributors
// For license information, please see license.txt

// frappe.ui.form.on("Question", {
// refresh(frm) {

// },
// });
Loading

0 comments on commit 9424ff1

Please sign in to comment.