More Improvements
This commit is contained in:
parent
02420bd4ba
commit
798f13be0d
@ -124,4 +124,12 @@ def enroll_all_courses_in_program(program_enrollment, student):
|
||||
|
||||
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)
|
||||
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
|
@ -170,9 +170,11 @@ default_roles = [
|
||||
]
|
||||
|
||||
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",
|
||||
|
@ -55,7 +55,7 @@ export default {
|
||||
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" ) {
|
||||
|
@ -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>
|
||||
|
23
erpnext/public/js/education/lms/components/ScoreCard.vue
Normal file
23
erpnext/public/js/education/lms/components/ScoreCard.vue
Normal file
@ -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>
|
||||
|
@ -208,7 +208,7 @@ def get_course_meta(course_name, program_name):
|
||||
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']}
|
||||
|
Loading…
x
Reference in New Issue
Block a user