@@ -398,31 +398,13 @@ public function getContentSettings($id):array
398
398
return $ config ['url ' ].($ value ->path .$ value ->version );
399
399
}, $ files ['styles ' ]);
400
400
401
- // Error with scripts order
402
-
403
- $ scripts2 = [
404
- "http://localhost:1000/h5p/libraries/Tether-1.0/scripts/tether.min.js?ver=1.0.2 "
405
- ,"http://localhost:1000/h5p/libraries/Drop-1.0/js/drop.min.js?ver=1.0.2 "
406
- ,"http://localhost:1000/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-help-dialog.js?ver=1.3.10 "
407
- , "http://localhost:1000/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-message-dialog.js?ver=1.3.10 "
408
- , "http://localhost:1000/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-progress-circle.js?ver=1.3.10 "
409
- , "http://localhost:1000/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-simple-rounded-button.js?ver=1.3.10 "
410
- , "http://localhost:1000/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-speech-bubble.js?ver=1.3.10 "
411
- , "http://localhost:1000/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-throbber.js?ver=1.3.10 "
412
- , "http://localhost:1000/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-tip.js?ver=1.3.10 "
413
- , "http://localhost:1000/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-slider.js?ver=1.3.10 "
414
- , "http://localhost:1000/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-score-bar.js?ver=1.3.10 "
415
- , "http://localhost:1000/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-progressbar.js?ver=1.3.10 "
416
- , "http://localhost:1000/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-ui.js?ver=1.3.10 "
417
- , "http://localhost:1000/h5p/libraries/H5P.Question-1.4/scripts/question.js?ver=1.4.8 "
418
- , "http://localhost:1000/h5p/libraries/H5P.Question-1.4/scripts/explainer.js?ver=1.4.8 "
419
- , "http://localhost:1000/h5p/libraries/H5P.Question-1.4/scripts/score-points.js?ver=1.4.8 "
420
- , "http://localhost:1000/h5p/libraries/H5P.Transition-1.0/transition.js?ver=1.0.4 "
421
- , "http://localhost:1000/h5p/libraries/H5P.Image-1.1/image.js?ver=1.1.10 "
422
- , "http://localhost:1000/h5p/libraries/H5P.Agamotto-1.5/dist/h5p-agamotto.js?ver=1.5.2 " ];
423
-
424
- $ settings ['contents ' ]["cid- $ id " ]['scripts ' ] = $ scripts ;
425
- $ settings ['contents ' ]["cid- $ id " ]['styles ' ] = $ styles ;
401
+ if ($ embed === 'iframe ' ) {
402
+ $ settings ['contents ' ]["cid- $ id " ]['scripts ' ] = $ scripts ;
403
+ $ settings ['contents ' ]["cid- $ id " ]['styles ' ] = $ styles ;
404
+ } else {
405
+ $ settings ['loadedCss ' ][] = $ styles ;
406
+ $ settings ['loadedJs ' ][] = $ scripts ;
407
+ }
426
408
427
409
return $ settings ;
428
410
}
0 commit comments