Adding ability to hide / show courses
This commit is contained in:
@@ -452,13 +452,15 @@
|
||||
}
|
||||
|
||||
function saveProgress(progressSeconds, completed = false) {
|
||||
const duration = activeMedia && isFinite(activeMedia.duration) ? Math.floor(activeMedia.duration) : null;
|
||||
fetch('/api/progress', {
|
||||
method: 'POST',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
body: JSON.stringify({
|
||||
lesson_path: '{{ lesson_path }}',
|
||||
completed: completed,
|
||||
progress_seconds: Math.floor(progressSeconds)
|
||||
progress_seconds: Math.floor(progressSeconds),
|
||||
duration_seconds: duration
|
||||
})
|
||||
}).catch(err => console.error('Failed to save progress:', err));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user