More Improvements
diff --git a/erpnext/education/utils.py b/erpnext/education/utils.py
index bf7327b..5fee69b 100644
--- a/erpnext/education/utils.py
+++ b/erpnext/education/utils.py
@@ -124,4 +124,12 @@
def check_activity_exists(enrollment, content_type, content):
activity = frappe.get_all("Course Activity", filters={'enrollment': enrollment, 'content_type': content_type, 'content': content})
- return bool(activity)
\ No newline at end of file
+ return bool(activity)
+
+# def get_home_page(user):
+# print("----------------------------------------------------------------------")
+# print("Let's do a lot of magic")
+# if get_current_student():
+# return 'lms#/Profile'
+# else:
+# return None
\ No newline at end of file
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 61b8ae3..178b732 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -170,9 +170,11 @@
]
role_home_page = {
- "LMS User": "lms"
+ "LMS User": "`lms`"
}
+# get_website_user_home_page = "erpnext.education.utils.get_home_page"
+
has_website_permission = {
"Sales Order": "erpnext.controllers.website_list_for_contact.has_website_permission",
"Quotation": "erpnext.controllers.website_list_for_contact.has_website_permission",
diff --git a/erpnext/public/js/education/lms/components/CourseCard.vue b/erpnext/public/js/education/lms/components/CourseCard.vue
index 4718347..8aa553c 100644
--- a/erpnext/public/js/education/lms/components/CourseCard.vue
+++ b/erpnext/public/js/education/lms/components/CourseCard.vue
@@ -55,7 +55,7 @@
if (this.courseMeta.flag == "Start Course" ){
return "primary"
}
- else if (this.courseMeta.flag == "Complete" ) {
+ else if (this.courseMeta.flag == "Completed" ) {
return "success"
}
else if (this.courseMeta.flag == "Continue" ) {
diff --git a/erpnext/public/js/education/lms/components/ProgressCard.vue b/erpnext/public/js/education/lms/components/ProgressCard.vue
index ad38de9..f6a70b7 100644
--- a/erpnext/public/js/education/lms/components/ProgressCard.vue
+++ b/erpnext/public/js/education/lms/components/ProgressCard.vue
@@ -11,7 +11,7 @@
Courses
<ul class="mb-0 mt-1">
<li v-for="item in programData.progress" :key="item.name">
- <span v-if="item.is_complete"><i class="text-success fa fa-check" aria-hidden="true"></i></span>
+ <span v-if="item.is_complete"><i class="text-success fa fa-check-circle" aria-hidden="true"></i></span>
<span v-else><i class="text-secondary fa fa-circle-o" aria-hidden="true"></i></span>
{{ item.course_name }}
</li>
diff --git a/erpnext/public/js/education/lms/components/ScoreCard.vue b/erpnext/public/js/education/lms/components/ScoreCard.vue
new file mode 100644
index 0000000..523f4ac
--- /dev/null
+++ b/erpnext/public/js/education/lms/components/ScoreCard.vue
@@ -0,0 +1,23 @@
+<template>
+ <div class='card-deck mt-3'>
+ <div class="card">
+ <div class='card-body'>
+ <div class="course-details">
+ <h5 class='card-title'>ECP2018 > Introduction Quiz</h5>
+ <span class="course-list text-muted" id="getting-started">
+ Courses
+ </span>
+ </div>
+ </div>
+ </div>
+ </div>
+</template>
+<script>
+export default {
+ props: ['program'],
+ name: "ScoreCard",
+ data() {
+ }
+};
+</script>
+
diff --git a/erpnext/www/lms.py b/erpnext/www/lms.py
index d3d47d6..c106a2a 100644
--- a/erpnext/www/lms.py
+++ b/erpnext/www/lms.py
@@ -208,7 +208,7 @@
if count == 0:
return {'flag':'Start Course', 'content_type': progress[0]['content_type'], 'content': progress[0]['content']}
elif count == len(progress):
- return {'flag':'Complete', 'content_type': progress[0]['content_type'], 'content': progress[0]['content']}
+ return {'flag':'Completed', 'content_type': progress[0]['content_type'], 'content': progress[0]['content']}
elif count < len(progress):
next_item = next(item for item in progress if item['is_complete']==False)
return {'flag':'Continue', 'content_type': next_item['content_type'], 'content': next_item['content']}