From 91bbe776c1a477db27b783335ebf1adf5125fe6d Mon Sep 17 00:00:00 2001 From: scmmishra Date: Tue, 13 Nov 2018 16:35:34 +0530 Subject: [PATCH] Modified `academy.call` to point to erpnext.www.lms --- erpnext/public/js/education/academy/call.js | 2 +- .../academy/components/AcademyTopSectionButton.vue | 4 ++-- .../js/education/academy/components/ContentArticle.vue | 2 +- .../js/education/academy/components/ContentNavigation.vue | 6 +++--- .../public/js/education/academy/components/ContentQuiz.vue | 4 ++-- .../public/js/education/academy/components/ContentVideo.vue | 2 +- .../public/js/education/academy/pages/AcademyCoursePage.vue | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/erpnext/public/js/education/academy/call.js b/erpnext/public/js/education/academy/call.js index 64f914d69be..bdcca3ad4df 100644 --- a/erpnext/public/js/education/academy/call.js +++ b/erpnext/public/js/education/academy/call.js @@ -2,7 +2,7 @@ frappe.ready(() => { frappe.provide('academy'); academy.call = (method, args) => { - const method_path = 'erpnext.www.academy.' + method; + const method_path = 'erpnext.www.lms.' + method; return new Promise((resolve, reject) => { return frappe.call({ method: method_path, diff --git a/erpnext/public/js/education/academy/components/AcademyTopSectionButton.vue b/erpnext/public/js/education/academy/components/AcademyTopSectionButton.vue index 2bab29d96d9..8adb5ecc364 100644 --- a/erpnext/public/js/education/academy/components/AcademyTopSectionButton.vue +++ b/erpnext/public/js/education/academy/components/AcademyTopSectionButton.vue @@ -18,7 +18,7 @@ export default { mounted() { if(this.isLoggedIn && this.$route.name == 'program'){ frappe.call({ - method: "erpnext.www.academy.get_continue_data", + method: "erpnext.www.lms.get_continue_data", args: { program_name: this.$route.params.program_name } @@ -56,7 +56,7 @@ export default { } else { frappe.call({ - method: "erpnext.www.academy.enroll_in_program", + method: "erpnext.www.lms.enroll_in_program", args:{ program_name: this.$route.params.program_name, student_email_id: frappe.session.user diff --git a/erpnext/public/js/education/academy/components/ContentArticle.vue b/erpnext/public/js/education/academy/components/ContentArticle.vue index 64bfb86a3e2..b0fc0e6c5f5 100644 --- a/erpnext/public/js/education/academy/components/ContentArticle.vue +++ b/erpnext/public/js/education/academy/components/ContentArticle.vue @@ -28,7 +28,7 @@ export default { }, mounted() { frappe.call({ - method: "erpnext.www.academy.get_content", + method: "erpnext.www.lms.get_content", args: { content_name: this.content, content_type: this.type diff --git a/erpnext/public/js/education/academy/components/ContentNavigation.vue b/erpnext/public/js/education/academy/components/ContentNavigation.vue index 8c8280cb045..421606dfae2 100644 --- a/erpnext/public/js/education/academy/components/ContentNavigation.vue +++ b/erpnext/public/js/education/academy/components/ContentNavigation.vue @@ -14,7 +14,7 @@ export default { goNext() { if(this.$route.params.type != "Quiz"){ frappe.call({ - method: "erpnext.www.academy.add_activity", + method: "erpnext.www.lms.add_activity", args: { enrollment: academy.store.enrolledCourses[this.$route.params.course], content_type: this.$route.params.type, @@ -27,7 +27,7 @@ export default { finish() { if(this.$route.params.type != "Quiz"){ frappe.call({ - method: "erpnext.www.academy.add_activity", + method: "erpnext.www.lms.add_activity", args: { enrollment: academy.store.enrolledCourses[this.$route.params.course], content_type: this.$route.params.type, @@ -36,7 +36,7 @@ export default { }) } frappe.call({ - method: "erpnext.www.academy.mark_course_complete", + method: "erpnext.www.lms.mark_course_complete", args: { enrollment: academy.store.enrolledCourses[this.$route.params.course] } diff --git a/erpnext/public/js/education/academy/components/ContentQuiz.vue b/erpnext/public/js/education/academy/components/ContentQuiz.vue index b13b5e6e079..149d314b9d8 100644 --- a/erpnext/public/js/education/academy/components/ContentQuiz.vue +++ b/erpnext/public/js/education/academy/components/ContentQuiz.vue @@ -53,7 +53,7 @@ export default { }, mounted() { frappe.call({ - method: "erpnext.www.academy.get_quiz_without_answers", + method: "erpnext.www.lms.get_quiz_without_answers", args: { quiz_name: this.content, } @@ -70,7 +70,7 @@ export default { }, submitQuiz() { frappe.call({ - method: "erpnext.www.academy.evaluate_quiz", + method: "erpnext.www.lms.evaluate_quiz", args: { enrollment: academy.store.enrolledCourses[this.$route.params.course], quiz_response: this.quizResponse, diff --git a/erpnext/public/js/education/academy/components/ContentVideo.vue b/erpnext/public/js/education/academy/components/ContentVideo.vue index e3dbad7d14a..95a6178f548 100644 --- a/erpnext/public/js/education/academy/components/ContentVideo.vue +++ b/erpnext/public/js/education/academy/components/ContentVideo.vue @@ -47,7 +47,7 @@ export default { }, mounted() { frappe.call({ - method: "erpnext.www.academy.get_content", + method: "erpnext.www.lms.get_content", args: { content_name: this.content, content_type: this.type diff --git a/erpnext/public/js/education/academy/pages/AcademyCoursePage.vue b/erpnext/public/js/education/academy/pages/AcademyCoursePage.vue index 81cf4ff847a..9d50afe0a53 100644 --- a/erpnext/public/js/education/academy/pages/AcademyCoursePage.vue +++ b/erpnext/public/js/education/academy/pages/AcademyCoursePage.vue @@ -35,7 +35,7 @@ export default { }, mounted() { frappe.call({ - method: "erpnext.www.academy.get_next_content", + method: "erpnext.www.lms.get_next_content", args:{ content: this.content, content_type: this.type,