From 6de9cbb52d42fabfca4a67581a2a2f2016dca6dc Mon Sep 17 00:00:00 2001 From: scmmishra Date: Mon, 5 Nov 2018 11:01:05 +0530 Subject: [PATCH] Solved minor issue (Last activity not being saved) --- .../web-academy/components/ContentNavigation.vue | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/education/web-academy/components/ContentNavigation.vue b/erpnext/public/js/education/web-academy/components/ContentNavigation.vue index a281f14fb9..61e3988c58 100644 --- a/erpnext/public/js/education/web-academy/components/ContentNavigation.vue +++ b/erpnext/public/js/education/web-academy/components/ContentNavigation.vue @@ -2,7 +2,7 @@ @@ -21,6 +21,19 @@ export default { } }) this.$router.push({ name: 'content', params: { course: this.$route.params.course, type:this.nextContentType, content:this.nextContent }}) + }, + finish() { + if(this.$route.params.type != "Quiz"){ + frappe.call({ + method: "erpnext.www.academy.add_activity", + args: { + enrollment: this.$root.$data.enrolledCourses[this.$route.params.course], + content_type: this.$route.params.type, + content: this.$route.params.content + } + }) + } + this.$router.push({ name: 'program', params: { code: this.$route.params.code}}) } } };