← All changes
|
assets/src/apps/js/frontend/single-curriculum/components/items-progress.js
+6
-0
4.1.7
→
4.4.9
View file →
| @@ -16,8 +16,13 @@ | ||
| 16 | 16 | if ( elements[ 0 ].querySelectorAll( 'form.form-button-finish-course' ).length !== 0 ) { |
| 17 | 17 | return; |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | + const user_id = lpGlobalSettings.user_id || 0; | |
| 21 | + if ( user_id === 0 ) { | |
| 22 | + return; | |
| 23 | + } | |
| 24 | + | |
| 20 | 25 | if ( 'IntersectionObserver' in window ) { |
| 21 | 26 | const eleObserver = new IntersectionObserver( ( entries, observer ) => { |
| 22 | 27 | entries.forEach( ( entry ) => { |
| 23 | 28 | if ( entry.isIntersecting ) { |
| @@ -45,7 +50,8 @@ | ||
| 45 | 50 | |
| 46 | 51 | const { data } = response; |
| 47 | 52 | |
| 48 | 53 | ele.innerHTML += data; |
| 54 | + ele.classList.add( 'can-finish-course' ); | |
| 49 | 55 | |
| 50 | 56 | lpModalOverlayCompleteItem.init(); |
| 51 | 57 | }; |