Minor UI changes
This commit is contained in:
parent
a592f70d4a
commit
d93cec374d
@ -7,7 +7,11 @@
|
|||||||
<span class="course-list text-muted" id="getting-started">
|
<span class="course-list text-muted" id="getting-started">
|
||||||
Course Content
|
Course Content
|
||||||
<ul class="mb-0 mt-1">
|
<ul class="mb-0 mt-1">
|
||||||
<li v-for="content in course.course_content" :key="content.name">{{ content.content }}</li>
|
<li v-for="content in course.course_content" :key="content.name">
|
||||||
|
<router-link tag="a" :class="'text-muted'" :to="{name: 'content', params:{program_name: program_name, course: course.name, type:content.content_type, content: content.content} }">
|
||||||
|
<span style="padding-right: 0.4em"><i :class="iconClass(content.content_type)"></i></span>{{ content.content }}
|
||||||
|
</router-link>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -58,14 +62,27 @@ export default {
|
|||||||
return " hidden"
|
return " hidden"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
iconClass(content_type) {
|
||||||
|
if(content_type == 'Video') return 'fa fa-play'
|
||||||
|
if(content_type == 'Article') return 'fa fa-file-text-o'
|
||||||
|
if(content_type == 'Quiz') return 'fa fa-question-circle-o'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@media only screen and (max-width: 576px) {
|
@media only screen and (max-width: 576px) {
|
||||||
.course-buttons {
|
.course-buttons {
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
li {
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
.fa {
|
||||||
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</style>
|
</style>
|
@ -5,6 +5,9 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "lmsRoot",
|
name: "lmsRoot",
|
||||||
|
mounted() {
|
||||||
|
$(document).scrollTop(0)
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
@ -204,9 +204,7 @@ def check_quiz_completion(quiz, enrollment_name):
|
|||||||
def get_course_meta(course_enrollment):
|
def get_course_meta(course_enrollment):
|
||||||
# course_enrollment = frappe.get_doc("Course Enrollment", course_enrollment_name)
|
# course_enrollment = frappe.get_doc("Course Enrollment", course_enrollment_name)
|
||||||
progress = get_course_progress(course_enrollment)
|
progress = get_course_progress(course_enrollment)
|
||||||
print(progress)
|
|
||||||
count = sum([act['is_complete'] for act in progress])
|
count = sum([act['is_complete'] for act in progress])
|
||||||
print('Count', count)
|
|
||||||
if count == 0:
|
if count == 0:
|
||||||
return {'flag':'Start Course', 'content_type': progress[0]['content_type'], 'content': progress[0]['content']}
|
return {'flag':'Start Course', 'content_type': progress[0]['content_type'], 'content': progress[0]['content']}
|
||||||
elif count == len(progress):
|
elif count == len(progress):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user