Removed LMS code in Course master

This commit is contained in:
Neil Trini Lasrado 2016-12-30 16:58:46 +05:30
parent 5c87455918
commit 577cfd559f
2 changed files with 0 additions and 18 deletions

View File

@ -108,7 +108,6 @@ portal_menu_items = [
{"title": _("Issues"), "route": "/issues", "reference_doctype": "Issue", "role":"Customer"},
{"title": _("Addresses"), "route": "/addresses", "reference_doctype": "Address"},
{"title": _("Announcements"), "route": "/announcement", "reference_doctype": "Announcement"},
{"title": _("Courses"), "route": "/course", "reference_doctype": "Course", "role":"Student"},
{"title": _("Assessment Schedule"), "route": "/assessment", "reference_doctype": "Assessment", "role":"Student"},
{"title": _("Fees"), "route": "/fees", "reference_doctype": "Fees", "role":"Student"}
]

View File

@ -18,20 +18,3 @@ class Course(Document):
total_weightage += criteria.weightage
if total_weightage != 100:
frappe.throw(_("Total Weightage of all Evaluation Criterias must be 100%"))
def get_sg_list(doctype, txt, filters, limit_start, limit_page_length=20):
user = frappe.session.user
student = frappe.db.sql("select name from `tabStudent` where student_email_id= %s", user)
if student:
return frappe.db.sql('''select course, academic_term, academic_year, SG.name from `tabStudent Group`
as SG, `tabStudent Group Student` as SGS where SG.name = SGS.parent and SGS.student = %s
order by SG.name asc limit {0} , {1}'''.format(limit_start, limit_page_length), student, as_dict=True)
def get_list_context(context=None):
return {
"show_sidebar": True,
'no_breadcrumbs': True,
"title": _("Courses"),
"get_list": get_sg_list,
"row_template": "templates/includes/course/course_row.html"
}