Skip to content

Commit

Permalink
Merge pull request #36 from mohaltheeb/develop
Browse files Browse the repository at this point in the history
feat(core): Add a Tab Research in Academic Program Doctype and Add a Course Specification Doctype with Fields
  • Loading branch information
alshalabi-su authored Apr 24, 2024
2 parents f41643e + 6c9129d commit 61fbdc4
Show file tree
Hide file tree
Showing 7 changed files with 190 additions and 49 deletions.
34 changes: 32 additions & 2 deletions academia/academia/doctype/academic_program/academic_program.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
"section_break_ljrb",
"courses",
"column_break_cash",
"research_or_thesis"
"research_or_thesis",
"research_tab",
"minimum_course_average_to_start_research",
"minimum_research_period",
"maximum_research_period"
],
"fields": [
{
Expand Down Expand Up @@ -94,11 +98,37 @@
"fieldtype": "Check",
"label": "Research or Thesis",
"mandatory_depends_on": "eval:doc.program_degree == \"Master Degree\" || doc.program_degree == \"PHD Degree\";"
},
{
"depends_on": "eval:doc.research_or_thesis === 1;",
"fieldname": "research_tab",
"fieldtype": "Tab Break",
"label": "Research",
"mandatory_depends_on": "eval:doc.research_or_thesis === 1;"
},
{
"fieldname": "minimum_research_period",
"fieldtype": "Int",
"label": "Minimum Research Period",
"mandatory_depends_on": "eval:doc.research_or_thesis === 1 && doc.courses === 1 ;"
},
{
"fieldname": "maximum_research_period",
"fieldtype": "Int",
"label": "Maximum Research Period",
"mandatory_depends_on": "eval:doc.research_or_thesis === 1 && doc.courses === 1 ;"
},
{
"depends_on": "eval:doc.research_or_thesis === 1 && doc.courses === 1 ;",
"fieldname": "minimum_course_average_to_start_research",
"fieldtype": "Data",
"label": "Minimum Course Average to Start Research ",
"mandatory_depends_on": "eval:doc.research_or_thesis === 1 && doc.courses === 1 ;"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-04-23 22:51:28.866811",
"modified": "2024-04-24 19:39:10.869477",
"modified_by": "Administrator",
"module": "Academia",
"name": "Academic Program",
Expand Down
51 changes: 4 additions & 47 deletions academia/academia/doctype/course/course.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,8 @@
"field_order": [
"course_code",
"course_name",
"course_type",
"faculty",
"course_image",
"column_break_uvaw",
"languages",
"pre_requisites",
"co_requisites",
"section_break_nxbw",
"column_break_fqwr",
"description",
"course_details_tab",
"table_rgxb"
Expand All @@ -38,39 +32,17 @@
"reqd": 1,
"unique": 1
},
{
"fieldname": "languages",
"fieldtype": "Table MultiSelect",
"label": "Languages",
"options": "Course Language"
},
{
"fieldname": "course_image",
"fieldtype": "Attach Image",
"hidden": 1,
"label": "Course Image"
},
{
"fieldname": "column_break_uvaw",
"fieldtype": "Column Break"
},
{
"fieldname": "description",
"fieldtype": "Text Editor",
"label": "Description"
},
{
"fieldname": "pre_requisites",
"fieldtype": "Table MultiSelect",
"label": "Pre Requisites",
"options": "Pre Requisites"
},
{
"fieldname": "co_requisites",
"fieldtype": "Table MultiSelect",
"label": "Co Requisites",
"options": "Co Requisites"
},
{
"fieldname": "course_details_tab",
"fieldtype": "Tab Break",
Expand All @@ -82,29 +54,14 @@
"options": "Course Hours"
},
{
"fieldname": "course_type",
"fieldtype": "Select",
"label": "Course Type",
"options": "\nUniversity Requirement\nFaculty Requirement\nProgram Requirement",
"reqd": 1
},
{
"fieldname": "section_break_nxbw",
"fieldtype": "Section Break"
},
{
"depends_on": "eval:doc.course_type == \"Faculty Requirement\";",
"fieldname": "faculty",
"fieldtype": "Link",
"label": "Faculty",
"mandatory_depends_on": "eval:doc.course_type == \"Faculty Requirement\";",
"options": "Faculty"
"fieldname": "column_break_fqwr",
"fieldtype": "Column Break"
}
],
"image_field": "course_image",
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-04-23 23:18:52.011457",
"modified": "2024-04-24 19:01:41.211850",
"modified_by": "Administrator",
"module": "Academia",
"name": "Course",
Expand Down
Empty file.
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("Course Specification", {
// refresh(frm) {

// },
// });
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2024-04-24 18:45:22.123570",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"course_code",
"course_name",
"course_type",
"faculty",
"course_image",
"column_break_iypx",
"languages",
"pre_requisites",
"co_requisites",
"section_break_sjbv",
"description",
"course_details_tab",
"course_hours"
],
"fields": [
{
"fieldname": "course_code",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Course Code",
"reqd": 1,
"unique": 1
},
{
"fieldname": "course_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Course Name",
"reqd": 1,
"unique": 1
},
{
"fieldname": "course_type",
"fieldtype": "Select",
"label": "Course Type",
"options": "\nUniversity Requirement\nFaculty Requirement\nProgram Requirement",
"reqd": 1
},
{
"depends_on": "eval:doc.course_type == \"Faculty Requirement\";",
"fieldname": "faculty",
"fieldtype": "Link",
"label": "faculty",
"mandatory_depends_on": "eval:doc.course_type == \"Faculty Requirement\";",
"options": "Faculty"
},
{
"fieldname": "course_image",
"fieldtype": "Attach Image",
"hidden": 1,
"label": "Course Image"
},
{
"fieldname": "languages",
"fieldtype": "Table MultiSelect",
"label": "Languages",
"options": "Course Language"
},
{
"fieldname": "column_break_iypx",
"fieldtype": "Column Break"
},
{
"fieldname": "pre_requisites",
"fieldtype": "Table MultiSelect",
"label": "Pre Requisites",
"options": "Pre Requisites"
},
{
"fieldname": "co_requisites",
"fieldtype": "Table MultiSelect",
"label": "Co Requisites",
"options": "Co Requisites"
},
{
"fieldname": "section_break_sjbv",
"fieldtype": "Section Break"
},
{
"fieldname": "description",
"fieldtype": "Text Editor",
"label": "Description"
},
{
"fieldname": "course_details_tab",
"fieldtype": "Tab Break",
"label": "Course Details"
},
{
"fieldname": "course_hours",
"fieldtype": "Table",
"label": "Course Hours",
"options": "Course Hours"
}
],
"image_field": "course_image",
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-04-24 19:00:28.712426",
"modified_by": "Administrator",
"module": "Academia",
"name": "Course Specification",
"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": []
}
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 CourseSpecification(Document):
pass
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 TestCourseSpecification(FrappeTestCase):
pass

0 comments on commit 61fbdc4

Please sign in to comment.