Skip to content

Commit

Permalink
fix: telemetry capture issue
Browse files Browse the repository at this point in the history
  • Loading branch information
pateljannat committed Sep 27, 2024
1 parent ad07f88 commit 7c055af
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ import DesktopLayout from './components/DesktopLayout.vue'
import MobileLayout from './components/MobileLayout.vue'
import { stopSession } from '@/telemetry'
import { init as initTelemetry } from '@/telemetry'
import { usersStore } from '@/stores/user'
const screenSize = useScreenSize()
let { userResource } = usersStore()
const Layout = computed(() => {
if (screenSize.width < 640) {
Expand All @@ -26,6 +28,7 @@ const Layout = computed(() => {
})
onMounted(async () => {
if (!userResource.data) return
await initTelemetry()
})
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/stores/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const sessionStore = defineStore('lms-session', () => {
}

let user = ref(sessionUser())
if (user) {
if (user.value) {
allUsers.reload()
}
const isLoggedIn = computed(() => !!user.value)
Expand Down
2 changes: 1 addition & 1 deletion lms/lms/doctype/course_lesson/course_lesson.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def save_progress(lesson, course):

def capture_progress_for_analytics(progress, course):
if progress in [25, 50, 75, 100]:
capture("course_progress", "lms", {"course": course, "progress": progress})
capture("course_progress", "lms", properties={"course": course, "progress": progress})


def get_quiz_progress(lesson):
Expand Down

0 comments on commit 7c055af

Please sign in to comment.