Advertisement
Guest User

Untitled

a guest
Nov 15th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. <html>
  2. <head>
  3. <link type="text/css" rel="stylesheet" media="all" href="dist/styles/h5p.css" />
  4. <meta charset="utf-8" />
  5. <script type="text/javascript" src="dist/js/h5p-standalone-main.min.js"></script>
  6.  
  7. <script type="text/javascript">
  8. (function($) {
  9. $(function() {
  10. $('.h5p-container').h5p({
  11. frameJs: 'dist/js/h5p-standalone-frame.min.js',
  12. frameCss: 'dist/styles/h5p.css',
  13. h5pContent: 'https://harukaedu-lms.harukaeduapps.com/h5p/workspace/26'
  14. });
  15. });
  16. })(H5P.jQuery);
  17.  
  18. H5P.externalDispatcher.on('xAPI', function(event){
  19. console.log(event)
  20. if (event.data.statement !== undefined) {
  21. if (event.data.statement.result !== undefined) {
  22. //TODO do something here
  23. scoreMax(event.data.statement.result.score.max);
  24. scoreMin(event.data.statement.result.score.min);
  25. scoreRaw(event.data.statement.result.score.raw);
  26. scoreScaled(event.data.statement.result.score.scaled);
  27. }
  28. }
  29. });
  30.  
  31. function scoreMax(max){
  32. };
  33.  
  34. function scoreMin(min){
  35. };
  36.  
  37. function scoreRaw(raw){
  38. };
  39.  
  40. function scoreScaled(scaled){
  41. };
  42. </script>
  43. </head>
  44. <body>
  45. <div class="h5p-container"></div>
  46. </body>
  47. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement