Plugin: H5P Import: Add first H5P import plugin implementation - refs BT#20717

Author: @BorjaSanchezBeezNest
pull/4863/head
Borja Sánchez 2 years ago committed by GitHub
parent 08587c65c3
commit c85e9852df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      composer.json
  2. BIN
      main/img/icons/128/plugin_h5p_import.png
  3. BIN
      main/img/icons/128/plugin_h5p_import_upload.png
  4. BIN
      main/img/icons/16/plugin_h5p_import.png
  5. BIN
      main/img/icons/16/plugin_h5p_import_upload.png
  6. BIN
      main/img/icons/22/plugin_h5p_import.png
  7. BIN
      main/img/icons/22/plugin_h5p_import_upload.png
  8. BIN
      main/img/icons/32/plugin_h5p_import.png
  9. BIN
      main/img/icons/32/plugin_h5p_import_upload.png
  10. BIN
      main/img/icons/48/plugin_h5p_import.png
  11. BIN
      main/img/icons/48/plugin_h5p_import_upload.png
  12. BIN
      main/img/icons/64/plugin_h5p_import.png
  13. BIN
      main/img/icons/64/plugin_h5p_import_upload.png
  14. 133
      main/img/icons/svg/plugin_h5p_import.svg
  15. 110
      main/img/icons/svg/plugin_h5p_import_upload.svg
  16. 2
      main/inc/lib/api.lib.php
  17. 288
      main/inc/lib/tracking.lib.php
  18. 27
      main/lp/learnpath.class.php
  19. 12
      main/lp/learnpathItem.class.php
  20. 2
      main/lp/lp_view.php
  21. 4
      main/lp/scorm_api.php
  22. 255
      plugin/h5pimport/Entity/H5pImport.php
  23. 383
      plugin/h5pimport/Entity/H5pImportLibrary.php
  24. 267
      plugin/h5pimport/Entity/H5pImportResults.php
  25. 307
      plugin/h5pimport/H5pImportPlugin.php
  26. 674
      plugin/h5pimport/LICENSE.txt
  27. 26
      plugin/h5pimport/README.md
  28. 5
      plugin/h5pimport/config.php
  29. 8
      plugin/h5pimport/install.php
  30. 23
      plugin/h5pimport/lang/english.php
  31. 23
      plugin/h5pimport/lang/french.php
  32. 23
      plugin/h5pimport/lang/spanish.php
  33. 5
      plugin/h5pimport/plugin.php
  34. 375
      plugin/h5pimport/src/H5pImplementation.php
  35. 78
      plugin/h5pimport/src/H5pPackageImporter.php
  36. 327
      plugin/h5pimport/src/H5pPackageTools.php
  37. 183
      plugin/h5pimport/src/ZipPackageImporter.php
  38. 90
      plugin/h5pimport/src/ajax.php
  39. 240
      plugin/h5pimport/start.php
  40. 6
      plugin/h5pimport/uninstall.php
  41. 189
      plugin/h5pimport/view.php
  42. 6
      plugin/h5pimport/view/index.tpl
  43. 46
      src/Chamilo/CourseBundle/Component/CourseCopy/CourseBuilder.php
  44. 10
      src/Chamilo/CourseBundle/Component/CourseCopy/CourseRestorer.php
  45. 31
      src/Chamilo/CourseBundle/Component/CourseCopy/Resources/H5pTool.php

@ -68,6 +68,7 @@
"graphp/algorithms": "~0.8.0",
"graphp/graphviz": "~0.2.0",
"guzzlehttp/guzzle": "~6.0",
"h5p/h5p-core": "*",
"imagine/imagine": "0.6.3",
"ircmaxell/password-compat": "~1.0.4",
"jbroadway/urlify": "1.1.0-stable",

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -0,0 +1,133 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="1024px" height="1024px" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd" xmlns:xlink="http://www.w3.org/1999/xlink">
<g><path style="opacity:1" fill="#2781d2" d="M -0.5,-0.5 C 340.833,-0.5 682.167,-0.5 1023.5,-0.5C 1023.5,340.833 1023.5,682.167 1023.5,1023.5C 682.167,1023.5 340.833,1023.5 -0.5,1023.5C -0.5,682.167 -0.5,340.833 -0.5,-0.5 Z"/></g>
<g><path style="opacity:1" fill="#4c84c5" d="M 747.5,326.5 C 747.5,326.833 747.5,327.167 747.5,327.5C 744.994,326.25 742.327,325.584 739.5,325.5C 739.03,324.307 738.03,323.64 736.5,323.5C 733.532,322.838 730.532,322.505 727.5,322.5C 691.337,321.502 655.004,321.168 618.5,321.5C 618.5,321.167 618.5,320.833 618.5,320.5C 653.998,319.336 689.664,319.169 725.5,320C 730.229,320.273 734.896,320.939 739.5,322C 742.821,322.498 745.487,323.998 747.5,326.5 Z"/></g>
<g><path style="opacity:1" fill="#6893c6" d="M 305.5,321.5 C 280.167,321.5 254.833,321.5 229.5,321.5C 254.372,320.824 279.372,320.158 304.5,319.5C 305.298,319.957 305.631,320.624 305.5,321.5 Z"/></g>
<g><path style="opacity:1" fill="#6591c5" d="M 389.5,321.5 C 409.993,320.503 430.66,320.169 451.5,320.5C 451.666,326.509 451.499,332.509 451,338.5C 450.583,339.756 449.75,340.423 448.5,340.5C 449.602,334.552 450.269,328.552 450.5,322.5C 430.34,321.503 410.007,321.17 389.5,321.5 Z"/></g>
<g><path style="opacity:1" fill="#fdfefe" d="M 389.5,481.5 C 389.5,428.5 389.5,375.5 389.5,322.5C 409.833,322.5 430.167,322.5 450.5,322.5C 450.269,328.552 449.602,334.552 448.5,340.5C 448.5,340.833 448.5,341.167 448.5,341.5C 446.74,351.648 445.407,361.982 444.5,372.5C 443.343,375.273 442.676,378.273 442.5,381.5C 440.75,385.183 440.083,389.183 440.5,393.5C 440.5,394.167 440.5,394.833 440.5,395.5C 439.196,400.984 438.196,406.651 437.5,412.5C 435.933,411.319 435.099,409.653 435,407.5C 434.853,410.571 434.02,413.404 432.5,416C 435.246,421.915 434.912,427.748 431.5,433.5C 431.931,434.293 432.265,435.127 432.5,436C 431.358,442.111 430.691,448.278 430.5,454.5C 430.002,459.152 429.669,463.819 429.5,468.5C 429.5,468.833 429.5,469.167 429.5,469.5C 427.882,472.171 427.215,475.171 427.5,478.5C 427.5,479.167 427.5,479.833 427.5,480.5C 426.475,483.974 425.808,487.64 425.5,491.5C 424.873,496.141 424.54,500.807 424.5,505.5C 422.882,509.575 421.882,513.908 421.5,518.5C 420.197,521.355 420.197,524.355 421.5,527.5C 423.235,528.057 424.902,528.39 426.5,528.5C 427.711,529.274 427.711,530.107 426.5,531C 428.101,531.273 429.601,531.773 431,532.5C 433.456,530.679 436.289,530.012 439.5,530.5C 441.833,530.5 444.167,530.5 446.5,530.5C 448.72,533.477 451.72,535.31 455.5,536C 459.5,536.333 463.5,536.667 467.5,537C 468.416,537.374 469.25,537.874 470,538.5C 476.528,538.914 483.028,538.914 489.5,538.5C 490.434,537.432 490.768,536.099 490.5,534.5C 491.979,532.28 493.312,529.946 494.5,527.5C 495.906,527.027 496.573,526.027 496.5,524.5C 496.5,524.167 496.5,523.833 496.5,523.5C 499.5,522.5 501.5,520.5 502.5,517.5C 504.223,515.782 506.223,514.449 508.5,513.5C 516.598,511.936 524.598,512.269 532.5,514.5C 534.754,515.415 536.754,516.748 538.5,518.5C 539.419,521.089 541.086,523.089 543.5,524.5C 546.016,527.534 548.016,530.868 549.5,534.5C 549.5,535.167 549.5,535.833 549.5,536.5C 549.66,538.153 550.326,539.486 551.5,540.5C 551.366,542.292 551.699,543.958 552.5,545.5C 552.905,557.678 552.239,569.678 550.5,581.5C 550.24,586.22 548.906,590.554 546.5,594.5C 543.815,597.19 541.482,600.19 539.5,603.5C 539.167,603.5 538.833,603.5 538.5,603.5C 535.783,606.22 532.783,608.553 529.5,610.5C 528.391,610.557 527.391,610.89 526.5,611.5C 522.5,611.5 518.5,611.5 514.5,611.5C 512.5,611.167 510.5,610.833 508.5,610.5C 502.823,605.822 497.823,600.489 493.5,594.5C 493.5,594.167 493.5,593.833 493.5,593.5C 492.147,590.795 490.814,588.128 489.5,585.5C 488.903,584.861 488.07,584.528 487,584.5C 483.628,584.609 480.794,585.609 478.5,587.5C 476.5,587.5 474.5,587.5 472.5,587.5C 466.635,588.465 460.969,589.798 455.5,591.5C 451.098,591.308 447.098,592.308 443.5,594.5C 439.159,594.658 435.159,595.658 431.5,597.5C 429.265,597.205 427.265,597.539 425.5,598.5C 424.167,598.5 422.833,598.5 421.5,598.5C 421.198,601.059 421.532,603.393 422.5,605.5C 423.008,609.736 424.008,613.736 425.5,617.5C 425.993,619.806 426.326,622.139 426.5,624.5C 426.796,626.403 427.463,628.07 428.5,629.5C 428.755,631.967 429.755,633.967 431.5,635.5C 431.5,636.5 431.5,637.5 431.5,638.5C 431.755,640.967 432.755,642.967 434.5,644.5C 434.285,646.179 434.952,647.179 436.5,647.5C 437.038,649.117 437.371,650.784 437.5,652.5C 439.082,656.79 440.749,661.123 442.5,665.5C 444.759,667.338 447.092,669.004 449.5,670.5C 451.833,672.167 453.833,674.167 455.5,676.5C 456.911,678.914 458.911,680.581 461.5,681.5C 465.424,685.802 470.091,689.136 475.5,691.5C 475.804,692.15 476.137,692.817 476.5,693.5C 447.508,694.5 418.508,694.833 389.5,694.5C 389.5,648.5 389.5,602.5 389.5,556.5C 361.662,556.169 333.995,556.502 306.5,557.5C 305.501,602.997 305.168,648.664 305.5,694.5C 280.167,694.5 254.833,694.5 229.5,694.5C 229.5,570.5 229.5,446.5 229.5,322.5C 254.833,322.5 280.167,322.5 305.5,322.5C 305.333,375.501 305.5,428.501 306,481.5C 333.931,482.832 361.764,482.832 389.5,481.5 Z"/></g>
<g><path style="opacity:1" fill="#fdfefd" d="M 727.5,322.5 C 731.159,324.342 735.159,325.342 739.5,325.5C 742.327,325.584 744.994,326.25 747.5,327.5C 752.36,330.682 757.36,333.682 762.5,336.5C 762.833,336.5 763.167,336.5 763.5,336.5C 766.195,339.526 768.862,342.526 771.5,345.5C 772.419,348.089 774.086,350.089 776.5,351.5C 776.557,352.609 776.89,353.609 777.5,354.5C 777.5,356.5 777.5,358.5 777.5,360.5C 778.822,360.33 779.989,360.663 781,361.5C 782.024,364.383 783.191,367.217 784.5,370C 782.47,374.41 783.804,377.243 788.5,378.5C 789.687,380.072 790.687,381.739 791.5,383.5C 791.674,385.861 792.007,388.194 792.5,390.5C 792.989,399.425 794.322,408.092 796.5,416.5C 796.714,434.183 796.381,451.85 795.5,469.5C 794.34,473.681 793.34,478.015 792.5,482.5C 791.699,484.042 791.366,485.708 791.5,487.5C 790.076,489.515 789.41,491.848 789.5,494.5C 787.935,496.509 786.935,498.843 786.5,501.5C 786.5,501.833 786.5,502.167 786.5,502.5C 783.504,508.492 780.504,514.492 777.5,520.5C 774.512,524.462 771.512,528.462 768.5,532.5C 761.641,538.087 754.641,543.421 747.5,548.5C 746.508,548.328 745.842,548.662 745.5,549.5C 741.213,550.232 737.213,551.565 733.5,553.5C 729.316,553.851 725.316,554.518 721.5,555.5C 719.735,556.461 717.735,556.795 715.5,556.5C 696.326,556.17 677.326,556.503 658.5,557.5C 657.501,602.664 657.168,647.997 657.5,693.5C 628.662,693.831 599.995,693.498 571.5,692.5C 571.5,692.167 571.5,691.833 571.5,691.5C 571.833,691.5 572.167,691.5 572.5,691.5C 573.873,691.657 575.207,691.49 576.5,691C 578.692,689.933 580.358,688.433 581.5,686.5C 586.263,685.748 589.596,683.082 591.5,678.5C 593.03,677.933 594.53,677.267 596,676.5C 596.989,674.03 598.155,671.697 599.5,669.5C 601.089,667.085 603.256,665.085 606,663.5C 607.03,658.438 609.363,654.105 613,650.5C 614.026,647.198 614.86,643.865 615.5,640.5C 615.5,639.833 615.5,639.167 615.5,638.5C 616.167,637.5 616.833,636.5 617.5,635.5C 621.302,634.502 622.302,632.168 620.5,628.5C 621.785,625.979 622.452,623.313 622.5,620.5C 622.5,619.833 622.5,619.167 622.5,618.5C 623.924,616.485 624.59,614.152 624.5,611.5C 627.332,600.006 628.998,588.339 629.5,576.5C 629.828,564.322 629.495,552.322 628.5,540.5C 628.387,535.482 628.053,530.482 627.5,525.5C 628.054,521.256 627.054,517.59 624.5,514.5C 624.88,512.302 624.213,510.635 622.5,509.5C 622.768,507.901 622.434,506.568 621.5,505.5C 620.012,500.533 618.012,495.866 615.5,491.5C 613.926,486.68 611.593,482.347 608.5,478.5C 605.917,475.003 603.584,471.336 601.5,467.5C 599.062,461.633 595.395,456.633 590.5,452.5C 589.522,452.977 588.689,453.643 588,454.5C 587.74,452.382 586.74,450.716 585,449.5C 583.374,449.854 581.541,449.854 579.5,449.5C 577.181,449.008 575.181,448.008 573.5,446.5C 571.629,445.203 569.629,444.203 567.5,443.5C 565.611,442.678 563.611,441.845 561.5,441C 550.992,440.175 540.658,440.341 530.5,441.5C 526.84,441.159 523.507,441.825 520.5,443.5C 515.913,444.021 511.913,445.688 508.5,448.5C 504.987,447.876 502.153,448.876 500,451.5C 499.365,449.365 499.699,447.365 501,445.5C 502.281,445.619 503.448,445.119 504.5,444C 503.128,442.758 502.128,441.258 501.5,439.5C 503.973,426.383 505.64,413.05 506.5,399.5C 544.004,399.832 581.337,399.498 618.5,398.5C 619.498,373.339 619.831,348.005 619.5,322.5C 655.5,322.5 691.5,322.5 727.5,322.5 Z"/></g>
<g><path style="opacity:1" fill="#b1c8e3" d="M 727.5,322.5 C 730.532,322.505 733.532,322.838 736.5,323.5C 738.03,323.64 739.03,324.307 739.5,325.5C 735.159,325.342 731.159,324.342 727.5,322.5 Z"/></g>
<g><path style="opacity:1" fill="#6094c1" d="M 747.5,326.5 C 749.655,326.372 751.655,326.872 753.5,328C 757.329,329.997 760.329,332.83 762.5,336.5C 757.36,333.682 752.36,330.682 747.5,327.5C 747.5,327.167 747.5,326.833 747.5,326.5 Z"/></g>
<g><path style="opacity:1" fill="#96afd3" d="M 389.5,321.5 C 410.007,321.17 430.34,321.503 450.5,322.5C 430.167,322.5 409.833,322.5 389.5,322.5C 389.5,375.5 389.5,428.5 389.5,481.5C 361.995,481.831 334.662,481.498 307.5,480.5C 331.167,480.5 354.833,480.5 378.5,480.5C 379.833,480.5 381.167,480.5 382.5,480.5C 384.5,480.5 386.5,480.5 388.5,480.5C 388.5,428.5 388.5,376.5 388.5,324.5C 388.263,323.209 388.596,322.209 389.5,321.5 Z"/></g>
<g><path style="opacity:1" fill="#6f96c5" d="M 618.5,321.5 C 618.5,347.167 618.5,372.833 618.5,398.5C 617.5,398.5 616.5,398.5 615.5,398.5C 615.783,397.711 616.283,397.044 617,396.5C 617.168,371.33 617.668,346.33 618.5,321.5 Z"/></g>
<g><path style="opacity:1" fill="#3a7ec6" d="M 228.5,323.5 C 228.167,447.334 228.5,571.001 229.5,694.5C 254.661,695.498 279.995,695.831 305.5,695.5C 279.672,696.498 253.672,696.831 227.5,696.5C 227.667,573.5 227.5,450.5 227,327.5C 224.554,324.822 224.054,321.822 225.5,318.5C 226.325,320.36 227.325,322.026 228.5,323.5 Z"/></g>
<g><path style="opacity:1" fill="#a3bada" d="M 229.5,321.5 C 254.833,321.5 280.167,321.5 305.5,321.5C 306.167,321.5 306.5,321.833 306.5,322.5C 306.168,375.336 306.501,428.003 307.5,480.5C 334.662,481.498 361.995,481.831 389.5,481.5C 361.764,482.832 333.931,482.832 306,481.5C 305.5,428.501 305.333,375.501 305.5,322.5C 280.167,322.5 254.833,322.5 229.5,322.5C 229.5,446.5 229.5,570.5 229.5,694.5C 228.5,571.001 228.167,447.334 228.5,323.5C 228.328,322.508 228.662,321.842 229.5,321.5 Z"/></g>
<g><path style="opacity:1" fill="#437cc5" d="M 388.5,324.5 C 388.5,376.5 388.5,428.5 388.5,480.5C 386.5,480.5 384.5,480.5 382.5,480.5C 383.878,479.766 385.378,479.099 387,478.5C 387.167,426.998 387.667,375.665 388.5,324.5 Z"/></g>
<g><path style="opacity:1" fill="#ced8ed" d="M 618.5,321.5 C 655.004,321.168 691.337,321.502 727.5,322.5C 691.5,322.5 655.5,322.5 619.5,322.5C 619.831,348.005 619.498,373.339 618.5,398.5C 618.5,372.833 618.5,347.167 618.5,321.5 Z"/></g>
<g><path style="opacity:1" fill="#6393c0" d="M 763.5,336.5 C 767.478,338.478 770.478,341.478 772.5,345.5C 772.167,345.5 771.833,345.5 771.5,345.5C 768.862,342.526 766.195,339.526 763.5,336.5 Z"/></g>
<g><path style="opacity:1" fill="#4e81bd" d="M 306.5,322.5 C 307.499,374.664 307.832,426.997 307.5,479.5C 331.339,479.169 355.006,479.502 378.5,480.5C 354.833,480.5 331.167,480.5 307.5,480.5C 306.501,428.003 306.168,375.336 306.5,322.5 Z"/></g>
<g><path style="opacity:1" fill="#a4c5e3" d="M 771.5,345.5 C 771.833,345.5 772.167,345.5 772.5,345.5C 774.252,347.246 775.585,349.246 776.5,351.5C 774.086,350.089 772.419,348.089 771.5,345.5 Z"/></g>
<g><path style="opacity:1" fill="#90b5d8" d="M 776.5,351.5 C 777.906,351.973 778.573,352.973 778.5,354.5C 778.167,354.5 777.833,354.5 777.5,354.5C 776.89,353.609 776.557,352.609 776.5,351.5 Z"/></g>
<g><path style="opacity:1" fill="#4e85c4" d="M 448.5,341.5 C 448.018,349.676 447.351,357.843 446.5,366C 446.467,368.61 445.8,370.777 444.5,372.5C 445.407,361.982 446.74,351.648 448.5,341.5 Z"/></g>
<g><path style="opacity:1" fill="#deedf7" d="M 777.5,354.5 C 777.833,354.5 778.167,354.5 778.5,354.5C 782.871,360.575 786.204,367.242 788.5,374.5C 788.5,375.833 788.5,377.167 788.5,378.5C 783.804,377.243 782.47,374.41 784.5,370C 783.191,367.217 782.024,364.383 781,361.5C 779.989,360.663 778.822,360.33 777.5,360.5C 777.5,358.5 777.5,356.5 777.5,354.5 Z"/></g>
<g><path style="opacity:1" fill="#5e8ec7" d="M 788.5,374.5 C 789.458,374.953 790.292,375.619 791,376.5C 791.497,378.81 791.663,381.143 791.5,383.5C 790.687,381.739 789.687,380.072 788.5,378.5C 788.5,377.167 788.5,375.833 788.5,374.5 Z"/></g>
<g><path style="opacity:1" fill="#a6c9e5" d="M 442.5,381.5 C 442.149,385.684 441.482,389.684 440.5,393.5C 440.083,389.183 440.75,385.183 442.5,381.5 Z"/></g>
<g><path style="opacity:1" fill="#4f86be" d="M 791.5,383.5 C 795.083,390.969 796.75,398.969 796.5,407.5C 795.167,401.833 793.833,396.167 792.5,390.5C 792.007,388.194 791.674,385.861 791.5,383.5 Z"/></g>
<g><path style="opacity:1" fill="#497ec6" d="M 618.5,320.5 C 618.5,320.833 618.5,321.167 618.5,321.5C 617.668,346.33 617.168,371.33 617,396.5C 616.283,397.044 615.783,397.711 615.5,398.5C 579.167,398.5 542.833,398.5 506.5,398.5C 505.402,397.603 505.402,396.77 506.5,396C 543.165,395.5 579.832,395.333 616.5,395.5C 616.819,371.301 616.485,347.134 615.5,323C 615.748,321.251 616.748,320.418 618.5,320.5 Z"/></g>
<g><path style="opacity:1" fill="#cce3f4" d="M 792.5,390.5 C 793.833,396.167 795.167,401.833 796.5,407.5C 796.5,410.5 796.5,413.5 796.5,416.5C 794.322,408.092 792.989,399.425 792.5,390.5 Z"/></g>
<g><path style="opacity:1" fill="#9fbee1" d="M 658.5,397.5 C 669.321,396.505 680.321,396.172 691.5,396.5C 692.833,397.167 694.167,397.833 695.5,398.5C 692.5,398.5 689.5,398.5 686.5,398.5C 677.348,397.506 668.015,397.173 658.5,397.5 Z"/></g>
<g><path style="opacity:1" fill="#2880d8" d="M 448.5,372.5 C 449.164,375.146 449.498,377.979 449.5,381C 448.463,392.835 447.463,404.668 446.5,416.5C 445.5,416.5 444.5,416.5 443.5,416.5C 443.171,410.463 443.504,404.463 444.5,398.5C 445.843,389.731 447.177,381.064 448.5,372.5 Z"/></g>
<g><path style="opacity:1" fill="#a4c6e0" d="M 697.5,398.5 C 700.831,398.018 703.497,399.018 705.5,401.5C 702.603,400.871 699.936,399.871 697.5,398.5 Z"/></g>
<g><path style="opacity:1" fill="#3982c6" d="M 686.5,398.5 C 689.5,398.5 692.5,398.5 695.5,398.5C 696.167,398.5 696.833,398.5 697.5,398.5C 699.936,399.871 702.603,400.871 705.5,401.5C 712.11,404.457 716.11,409.457 717.5,416.5C 716.265,416.279 715.265,415.612 714.5,414.5C 713.808,415.025 713.308,415.692 713,416.5C 712.503,413.854 712.336,411.187 712.5,408.5C 709.63,407.97 707.63,406.303 706.5,403.5C 703.216,402.343 699.882,402.176 696.5,403C 696.957,403.414 697.291,403.914 697.5,404.5C 693.919,406.775 690.253,406.775 686.5,404.5C 688.078,403.702 689.744,403.202 691.5,403C 691.833,402 692.167,401 692.5,400C 690.292,399.809 688.292,399.309 686.5,398.5 Z"/></g>
<g><path style="opacity:1" fill="#6695c1" d="M 505.5,399.5 C 505.149,403.684 504.482,407.684 503.5,411.5C 502.911,407.029 503.577,403.029 505.5,399.5 Z"/></g>
<g><path style="opacity:1" fill="#2881d2" d="M 686.5,398.5 C 688.292,399.309 690.292,399.809 692.5,400C 692.167,401 691.833,402 691.5,403C 689.744,403.202 688.078,403.702 686.5,404.5C 690.253,406.775 693.919,406.775 697.5,404.5C 697.291,403.914 696.957,403.414 696.5,403C 699.882,402.176 703.216,402.343 706.5,403.5C 707.63,406.303 709.63,407.97 712.5,408.5C 712.336,411.187 712.503,413.854 713,416.5C 713.308,415.692 713.808,415.025 714.5,414.5C 715.265,415.612 716.265,416.279 717.5,416.5C 718.61,420.406 719.443,424.406 720,428.5C 720.383,429.056 720.883,429.389 721.5,429.5C 723.243,440.442 722.243,451.108 718.5,461.5C 715.81,464.873 713.477,468.54 711.5,472.5C 710.021,473.759 708.354,474.759 706.5,475.5C 705.391,475.557 704.391,475.89 703.5,476.5C 694.653,478.307 685.486,479.307 676,479.5C 670.422,479.478 664.922,479.144 659.5,478.5C 659.5,451.833 659.5,425.167 659.5,398.5C 668.5,398.5 677.5,398.5 686.5,398.5 Z"/></g>
<g><path style="opacity:1" fill="#dff1f8" d="M 691.5,396.5 C 697.033,396.145 702.367,396.978 707.5,399C 710.368,403.201 713.868,406.701 718,409.5C 718.696,412.478 719.196,415.478 719.5,418.5C 718.833,417.833 718.167,417.167 717.5,416.5C 716.11,409.457 712.11,404.457 705.5,401.5C 703.497,399.018 700.831,398.018 697.5,398.5C 696.833,398.5 696.167,398.5 695.5,398.5C 694.167,397.833 692.833,397.167 691.5,396.5 Z"/></g>
<g><path style="opacity:1" fill="#5a8cc2" d="M 658.5,397.5 C 668.015,397.173 677.348,397.506 686.5,398.5C 677.5,398.5 668.5,398.5 659.5,398.5C 659.5,425.167 659.5,451.833 659.5,478.5C 659.167,478.5 658.833,478.5 658.5,478.5C 658.5,451.5 658.5,424.5 658.5,397.5 Z"/></g>
<g><path style="opacity:1" fill="#e6f3f8" d="M 437.5,412.5 C 436.627,416.768 436.294,421.102 436.5,425.5C 434.956,430.606 433.956,435.939 433.5,441.5C 432.319,445.743 431.652,450.076 431.5,454.5C 431.167,454.5 430.833,454.5 430.5,454.5C 430.691,448.278 431.358,442.111 432.5,436C 432.265,435.127 431.931,434.293 431.5,433.5C 434.912,427.748 435.246,421.915 432.5,416C 434.02,413.404 434.853,410.571 435,407.5C 435.099,409.653 435.933,411.319 437.5,412.5 Z"/></g>
<g><path style="opacity:1" fill="#5b89c1" d="M 440.5,395.5 C 440.444,405.808 439.111,415.808 436.5,425.5C 436.294,421.102 436.627,416.768 437.5,412.5C 438.196,406.651 439.196,400.984 440.5,395.5 Z"/></g>
<g><path style="opacity:1" fill="#518bbe" d="M 717.5,416.5 C 718.167,417.167 718.833,417.833 719.5,418.5C 720.422,422.112 721.089,425.779 721.5,429.5C 720.883,429.389 720.383,429.056 720,428.5C 719.443,424.406 718.61,420.406 717.5,416.5 Z"/></g>
<g><path style="opacity:1" fill="#4e84bd" d="M 436.5,425.5 C 436.946,431.245 435.946,436.579 433.5,441.5C 433.956,435.939 434.956,430.606 436.5,425.5 Z"/></g>
<g><path style="opacity:1" fill="#6695cb" d="M 796.5,416.5 C 797.268,417.263 797.768,418.263 798,419.5C 798.667,433.5 798.667,447.5 798,461.5C 798.053,464.675 797.22,467.342 795.5,469.5C 796.381,451.85 796.714,434.183 796.5,416.5 Z"/></g>
<g><path style="opacity:1" fill="#8fb4d7" d="M 500.5,434.5 C 500.324,437.727 499.657,440.727 498.5,443.5C 498.215,440.171 498.882,437.171 500.5,434.5 Z"/></g>
<g><path style="opacity:1" fill="#c7dcf2" d="M 530.5,441.5 C 540.658,440.341 550.992,440.175 561.5,441C 563.611,441.845 565.611,442.678 567.5,443.5C 566.5,443.5 565.5,443.5 564.5,443.5C 562.5,443.5 560.5,443.5 558.5,443.5C 558.5,443.167 558.5,442.833 558.5,442.5C 549.348,441.506 540.015,441.173 530.5,441.5 Z"/></g>
<g><path style="opacity:1" fill="#6d99cb" d="M 530.5,441.5 C 540.015,441.173 549.348,441.506 558.5,442.5C 547.14,442.283 535.807,442.616 524.5,443.5C 522.308,445.59 519.641,446.59 516.5,446.5C 517.833,445.5 519.167,444.5 520.5,443.5C 523.507,441.825 526.84,441.159 530.5,441.5 Z"/></g>
<g><path style="opacity:1" fill="#ddebf6" d="M 506.5,398.5 C 542.833,398.5 579.167,398.5 615.5,398.5C 616.5,398.5 617.5,398.5 618.5,398.5C 581.337,399.498 544.004,399.832 506.5,399.5C 505.64,413.05 503.973,426.383 501.5,439.5C 502.128,441.258 503.128,442.758 504.5,444C 503.448,445.119 502.281,445.619 501,445.5C 499.699,447.365 499.365,449.365 500,451.5C 502.153,448.876 504.987,447.876 508.5,448.5C 508.5,448.833 508.5,449.167 508.5,449.5C 504.91,450.628 501.577,452.295 498.5,454.5C 497.54,450.861 497.54,447.195 498.5,443.5C 499.657,440.727 500.324,437.727 500.5,434.5C 501.167,428.5 501.833,422.5 502.5,416.5C 503.451,415.081 503.784,413.415 503.5,411.5C 504.482,407.684 505.149,403.684 505.5,399.5C 505.5,398.833 505.833,398.5 506.5,398.5 Z"/></g>
<g><path style="opacity:1" fill="#8db2d9" d="M 564.5,443.5 C 565.5,443.5 566.5,443.5 567.5,443.5C 569.629,444.203 571.629,445.203 573.5,446.5C 569.971,446.443 566.971,445.443 564.5,443.5 Z"/></g>
<g><path style="opacity:1" fill="#3682c7" d="M 502.5,416.5 C 501.833,422.5 501.167,428.5 500.5,434.5C 498.882,437.171 498.215,440.171 498.5,443.5C 497.54,447.195 497.54,450.861 498.5,454.5C 501.577,452.295 504.91,450.628 508.5,449.5C 510.979,448.026 513.646,447.026 516.5,446.5C 519.641,446.59 522.308,445.59 524.5,443.5C 524.719,444.675 524.386,445.675 523.5,446.5C 521.051,446.98 518.885,447.98 517,449.5C 516.08,451.632 514.913,453.632 513.5,455.5C 512.491,452.013 510.158,450.68 506.5,451.5C 506.328,453.492 506.995,455.158 508.5,456.5C 507.68,458.111 506.346,458.778 504.5,458.5C 504.5,457.5 504.5,456.5 504.5,455.5C 501.552,455.777 498.719,455.444 496,454.5C 494.599,456.192 492.766,456.859 490.5,456.5C 490.34,454.801 490.506,453.134 491,451.5C 493.046,449.624 494.879,447.624 496.5,445.5C 497.55,435.501 499.55,425.834 502.5,416.5 Z"/></g>
<g><path style="opacity:1" fill="#a4c5e0" d="M 520.5,443.5 C 519.167,444.5 517.833,445.5 516.5,446.5C 513.646,447.026 510.979,448.026 508.5,449.5C 508.5,449.167 508.5,448.833 508.5,448.5C 511.913,445.688 515.913,444.021 520.5,443.5 Z"/></g>
<g><path style="opacity:1" fill="#3b81c9" d="M 558.5,443.5 C 560.5,443.5 562.5,443.5 564.5,443.5C 566.971,445.443 569.971,446.443 573.5,446.5C 575.181,448.008 577.181,449.008 579.5,449.5C 586.366,453.921 592.366,459.254 597.5,465.5C 595.549,465.227 594.049,465.893 593,467.5C 592.319,465.105 591.485,462.772 590.5,460.5C 587.446,459.528 585.113,457.695 583.5,455C 579.011,453.235 574.345,452.235 569.5,452C 569.034,450.701 569.034,449.201 569.5,447.5C 566.482,447.665 563.482,447.498 560.5,447C 559.027,446.29 558.36,445.124 558.5,443.5 Z"/></g>
<g><path style="opacity:1" fill="#e0eef6" d="M 579.5,449.5 C 581.541,449.854 583.374,449.854 585,449.5C 586.74,450.716 587.74,452.382 588,454.5C 588.689,453.643 589.522,452.977 590.5,452.5C 595.395,456.633 599.062,461.633 601.5,467.5C 600.833,467.167 600.167,466.833 599.5,466.5C 598.833,466.167 598.167,465.833 597.5,465.5C 592.366,459.254 586.366,453.921 579.5,449.5 Z"/></g>
<g><path style="opacity:1" fill="#739fce" d="M 430.5,454.5 C 430.833,454.5 431.167,454.5 431.5,454.5C 431.638,459.414 430.972,464.081 429.5,468.5C 429.669,463.819 430.002,459.152 430.5,454.5 Z"/></g>
<g><path style="opacity:1" fill="#9ebfdf" d="M 718.5,461.5 C 717.374,465.954 715.041,469.621 711.5,472.5C 713.477,468.54 715.81,464.873 718.5,461.5 Z"/></g>
<g><path style="opacity:1" fill="#6798c6" d="M 599.5,466.5 C 600.167,466.833 600.833,467.167 601.5,467.5C 603.584,471.336 605.917,475.003 608.5,478.5C 605.983,477.107 604.316,475.107 603.5,472.5C 602.5,472.5 601.5,472.5 600.5,472.5C 600.483,470.435 600.15,468.435 599.5,466.5 Z"/></g>
<g><path style="opacity:1" fill="#9cbae1" d="M 429.5,469.5 C 429.324,472.727 428.657,475.727 427.5,478.5C 427.215,475.171 427.882,472.171 429.5,469.5 Z"/></g>
<g><path style="opacity:1" fill="#5f94cb" d="M 795.5,469.5 C 796.035,474.312 795.035,478.645 792.5,482.5C 793.34,478.015 794.34,473.681 795.5,469.5 Z"/></g>
<g><path style="opacity:1" fill="#adcde8" d="M 706.5,475.5 C 705.656,477.759 703.989,478.759 701.5,478.5C 702.167,477.833 702.833,477.167 703.5,476.5C 704.391,475.89 705.391,475.557 706.5,475.5 Z"/></g>
<g><path style="opacity:1" fill="#4283c3" d="M 703.5,476.5 C 702.833,477.167 702.167,477.833 701.5,478.5C 698.848,478.41 696.515,479.076 694.5,480.5C 682.452,481.145 670.785,480.478 659.5,478.5C 664.922,479.144 670.422,479.478 676,479.5C 685.486,479.307 694.653,478.307 703.5,476.5 Z"/></g>
<g><path style="opacity:1" fill="#aac3de" d="M 701.5,478.5 C 699.485,479.924 697.152,480.59 694.5,480.5C 696.515,479.076 698.848,478.41 701.5,478.5 Z"/></g>
<g><path style="opacity:1" fill="#79a5cf" d="M 658.5,478.5 C 658.833,478.5 659.167,478.5 659.5,478.5C 670.785,480.478 682.452,481.145 694.5,480.5C 682.678,481.495 670.678,481.828 658.5,481.5C 658.5,480.5 658.5,479.5 658.5,478.5 Z"/></g>
<g><path style="opacity:1" fill="#77a3ce" d="M 427.5,480.5 C 427.665,483.518 427.498,486.518 427,489.5C 426.722,490.416 426.222,491.082 425.5,491.5C 425.808,487.64 426.475,483.974 427.5,480.5 Z"/></g>
<g><path style="opacity:1" fill="#508bc5" d="M 608.5,478.5 C 611.593,482.347 613.926,486.68 615.5,491.5C 614.25,491.423 613.417,490.756 613,489.5C 612.667,490.5 612.333,491.5 612,492.5C 611.11,487.734 609.943,483.067 608.5,478.5 Z"/></g>
<g><path style="opacity:1" fill="#8bb4db" d="M 791.5,487.5 C 791.59,490.152 790.924,492.485 789.5,494.5C 789.41,491.848 790.076,489.515 791.5,487.5 Z"/></g>
<g><path style="opacity:1" fill="#8dafd0" d="M 789.5,494.5 C 789.834,497.491 788.834,499.824 786.5,501.5C 786.935,498.843 787.935,496.509 789.5,494.5 Z"/></g>
<g><path style="opacity:1" fill="#739dcb" d="M 615.5,491.5 C 618.012,495.866 620.012,500.533 621.5,505.5C 617.941,501.694 615.941,497.027 615.5,491.5 Z"/></g>
<g><path style="opacity:1" fill="#3082cb" d="M 526.5,508.5 C 522.029,507.911 518.029,508.577 514.5,510.5C 511.923,510.455 509.923,511.455 508.5,513.5C 506.223,514.449 504.223,515.782 502.5,517.5C 500.5,519.167 498.5,520.833 496.5,522.5C 496.5,519.833 496.5,517.167 496.5,514.5C 497.822,514.67 498.989,514.337 500,513.5C 500.372,509.682 501.206,506.015 502.5,502.5C 504.5,502.5 506.5,502.5 508.5,502.5C 508.395,497.846 509.729,497.346 512.5,501C 510.5,502.667 508.5,504.333 506.5,506C 507.973,506.71 508.64,507.876 508.5,509.5C 514.511,507.424 520.511,507.09 526.5,508.5 Z"/></g>
<g><path style="opacity:1" fill="#4b83c1" d="M 526.5,508.5 C 529.049,509.509 531.715,510.342 534.5,511C 535.667,514.167 537.833,516.333 541,517.5C 541.483,518.448 541.649,519.448 541.5,520.5C 540.5,519.833 539.5,519.167 538.5,518.5C 536.754,516.748 534.754,515.415 532.5,514.5C 531.264,512.172 529.264,511.006 526.5,511C 522.514,510.501 518.514,510.334 514.5,510.5C 518.029,508.577 522.029,507.911 526.5,508.5 Z"/></g>
<g><path style="opacity:1" fill="#c9dff0" d="M 514.5,510.5 C 518.514,510.334 522.514,510.501 526.5,511C 529.264,511.006 531.264,512.172 532.5,514.5C 524.598,512.269 516.598,511.936 508.5,513.5C 509.923,511.455 511.923,510.455 514.5,510.5 Z"/></g>
<g><path style="opacity:1" fill="#abcae6" d="M 622.5,509.5 C 624.213,510.635 624.88,512.302 624.5,514.5C 623.463,513.07 622.796,511.403 622.5,509.5 Z"/></g>
<g><path style="opacity:1" fill="#5384c1" d="M 424.5,505.5 C 424.299,511.193 424.132,516.86 424,522.5C 426.953,523.324 429.453,524.657 431.5,526.5C 428.14,526.384 424.807,526.051 421.5,525.5C 421.5,523.167 421.5,520.833 421.5,518.5C 421.882,513.908 422.882,509.575 424.5,505.5 Z"/></g>
<g><path style="opacity:1" fill="#588fca" d="M 786.5,502.5 C 785.043,507.756 783.876,513.089 783,518.5C 781.185,519.244 779.352,519.911 777.5,520.5C 780.504,514.492 783.504,508.492 786.5,502.5 Z"/></g>
<g><path style="opacity:1" fill="#abc5e5" d="M 502.5,517.5 C 501.5,520.5 499.5,522.5 496.5,523.5C 496.5,523.167 496.5,522.833 496.5,522.5C 498.5,520.833 500.5,519.167 502.5,517.5 Z"/></g>
<g><path style="opacity:1" fill="#4d86c0" d="M 541.5,520.5 C 542.496,520.414 543.329,520.748 544,521.5C 545.586,524.919 547.752,527.919 550.5,530.5C 549.754,531.736 549.421,533.07 549.5,534.5C 548.016,530.868 546.016,527.534 543.5,524.5C 543.267,522.938 542.6,521.605 541.5,520.5 Z"/></g>
<g><path style="opacity:1" fill="#a4c7e4" d="M 538.5,518.5 C 539.5,519.167 540.5,519.833 541.5,520.5C 542.6,521.605 543.267,522.938 543.5,524.5C 541.086,523.089 539.419,521.089 538.5,518.5 Z"/></g>
<g><path style="opacity:1" fill="#d2e6f3" d="M 624.5,514.5 C 627.054,517.59 628.054,521.256 627.5,525.5C 626.349,523.221 625.349,520.888 624.5,518.5C 624.5,517.167 624.5,515.833 624.5,514.5 Z"/></g>
<g><path style="opacity:1" fill="#4f87c1" d="M 496.5,523.5 C 496.5,523.833 496.5,524.167 496.5,524.5C 495.094,524.973 494.427,525.973 494.5,527.5C 493.312,529.946 491.979,532.28 490.5,534.5C 491.187,531.088 492.187,527.754 493.5,524.5C 494.325,523.614 495.325,523.281 496.5,523.5 Z"/></g>
<g><path style="opacity:1" fill="#90b1d9" d="M 777.5,520.5 C 775.951,525.603 772.951,529.603 768.5,532.5C 771.512,528.462 774.512,524.462 777.5,520.5 Z"/></g>
<g><path style="opacity:1" fill="#94b9dc" d="M 496.5,524.5 C 496.573,526.027 495.906,527.027 494.5,527.5C 494.427,525.973 495.094,524.973 496.5,524.5 Z"/></g>
<g><path style="opacity:1" fill="#e1f0f8" d="M 421.5,518.5 C 421.5,520.833 421.5,523.167 421.5,525.5C 424.807,526.051 428.14,526.384 431.5,526.5C 433.5,527.167 435.5,527.833 437.5,528.5C 438.167,529.167 438.833,529.833 439.5,530.5C 436.289,530.012 433.456,530.679 431,532.5C 429.601,531.773 428.101,531.273 426.5,531C 427.711,530.107 427.711,529.274 426.5,528.5C 424.902,528.39 423.235,528.057 421.5,527.5C 420.197,524.355 420.197,521.355 421.5,518.5 Z"/></g>
<g><path style="opacity:1" fill="#3581c5" d="M 469.5,533.5 C 465.548,532.728 461.548,532.395 457.5,532.5C 455.095,531.232 452.428,530.565 449.5,530.5C 448.5,530.5 447.5,530.5 446.5,530.5C 443.829,528.882 440.829,528.215 437.5,528.5C 435.5,527.833 433.5,527.167 431.5,526.5C 433.604,526.799 435.604,526.466 437.5,525.5C 435.5,524.5 433.5,523.5 431.5,522.5C 432.5,522.167 433.5,521.833 434.5,521.5C 437.377,522.767 440.377,523.767 443.5,524.5C 443.5,525.5 443.5,526.5 443.5,527.5C 446.91,527.543 450.243,527.043 453.5,526C 454.667,525.5 455.5,524.667 456,523.5C 456.494,525.134 456.66,526.801 456.5,528.5C 460.886,530.182 465.219,531.848 469.5,533.5 Z"/></g>
<g><path style="opacity:1" fill="#afcae7" d="M 437.5,528.5 C 440.829,528.215 443.829,528.882 446.5,530.5C 444.167,530.5 441.833,530.5 439.5,530.5C 438.833,529.833 438.167,529.167 437.5,528.5 Z"/></g>
<g><path style="opacity:1" fill="#80abd5" d="M 449.5,530.5 C 452.428,530.565 455.095,531.232 457.5,532.5C 454.505,532.706 451.838,532.04 449.5,530.5 Z"/></g>
<g><path style="opacity:1" fill="#77a0c9" d="M 457.5,532.5 C 461.548,532.395 465.548,532.728 469.5,533.5C 473.974,534.66 478.307,535.993 482.5,537.5C 479.813,537.664 477.146,537.497 474.5,537C 468.722,535.492 463.056,533.992 457.5,532.5 Z"/></g>
<g><path style="opacity:1" fill="#e4f1f9" d="M 446.5,530.5 C 447.5,530.5 448.5,530.5 449.5,530.5C 451.838,532.04 454.505,532.706 457.5,532.5C 463.056,533.992 468.722,535.492 474.5,537C 477.146,537.497 479.813,537.664 482.5,537.5C 484.764,538.219 487.097,538.552 489.5,538.5C 483.028,538.914 476.528,538.914 470,538.5C 469.25,537.874 468.416,537.374 467.5,537C 463.5,536.667 459.5,536.333 455.5,536C 451.72,535.31 448.72,533.477 446.5,530.5 Z"/></g>
<g><path style="opacity:1" fill="#4b88bf" d="M 624.5,518.5 C 625.349,520.888 626.349,523.221 627.5,525.5C 628.053,530.482 628.387,535.482 628.5,540.5C 626.782,533.493 625.448,526.159 624.5,518.5 Z"/></g>
<g><path style="opacity:1" fill="#8cb1d3" d="M 549.5,536.5 C 551.104,537.287 551.771,538.62 551.5,540.5C 550.326,539.486 549.66,538.153 549.5,536.5 Z"/></g>
<g><path style="opacity:1" fill="#91b6db" d="M 768.5,532.5 C 767.797,534.716 766.464,536.549 764.5,538C 760.949,540.268 757.616,542.768 754.5,545.5C 752.026,546.32 749.693,547.32 747.5,548.5C 754.641,543.421 761.641,538.087 768.5,532.5 Z"/></g>
<g><path style="opacity:1" fill="#6f97cc" d="M 549.5,534.5 C 550.15,534.804 550.817,535.137 551.5,535.5C 554.607,547.412 555.274,559.412 553.5,571.5C 553.826,562.651 553.493,553.984 552.5,545.5C 551.699,543.958 551.366,542.292 551.5,540.5C 551.771,538.62 551.104,537.287 549.5,536.5C 549.5,535.833 549.5,535.167 549.5,534.5 Z"/></g>
<g><path style="opacity:1" fill="#87afd4" d="M 745.5,549.5 C 742.004,552.048 738.004,553.381 733.5,553.5C 737.213,551.565 741.213,550.232 745.5,549.5 Z"/></g>
<g><path style="opacity:1" fill="#acc4e6" d="M 733.5,553.5 C 731.786,554.738 729.786,555.405 727.5,555.5C 725.5,555.5 723.5,555.5 721.5,555.5C 725.316,554.518 729.316,553.851 733.5,553.5 Z"/></g>
<g><path style="opacity:1" fill="#4a80bb" d="M 721.5,555.5 C 723.5,555.5 725.5,555.5 727.5,555.5C 726.4,556.558 725.066,557.392 723.5,558C 702.169,558.5 680.836,558.667 659.5,558.5C 678.167,557.833 696.833,557.167 715.5,556.5C 717.735,556.795 719.735,556.461 721.5,555.5 Z"/></g>
<g><path style="opacity:1" fill="#4f80bb" d="M 306.5,557.5 C 333.833,557.5 361.167,557.5 388.5,557.5C 388.5,560.833 388.5,564.167 388.5,567.5C 388.167,567.5 387.833,567.5 387.5,567.5C 387.5,564.5 387.5,561.5 387.5,558.5C 360.833,558.5 334.167,558.5 307.5,558.5C 307.832,604.003 307.499,649.336 306.5,694.5C 306.5,648.833 306.5,603.167 306.5,557.5 Z"/></g>
<g><path style="opacity:1" fill="#7498cf" d="M 715.5,556.5 C 696.833,557.167 678.167,557.833 659.5,558.5C 659.5,561.5 659.5,564.5 659.5,567.5C 659.5,609.833 659.5,652.167 659.5,694.5C 659.167,694.5 658.833,694.5 658.5,694.5C 658.5,648.833 658.5,603.167 658.5,557.5C 677.326,556.503 696.326,556.17 715.5,556.5 Z"/></g>
<g><path style="opacity:1" fill="#2585cd" d="M 661.5,691.5 C 660.501,650.337 660.168,609.003 660.5,567.5C 660.369,566.624 660.702,565.957 661.5,565.5C 665.445,566.268 669.445,566.768 673.5,567C 669.848,567.499 666.182,567.665 662.5,567.5C 662.832,609.003 662.499,650.337 661.5,691.5 Z"/></g>
<g><path style="opacity:1" fill="#94b0d5" d="M 306.5,557.5 C 333.995,556.502 361.662,556.169 389.5,556.5C 389.5,602.5 389.5,648.5 389.5,694.5C 389.167,694.5 388.833,694.5 388.5,694.5C 388.5,652.167 388.5,609.833 388.5,567.5C 388.5,564.167 388.5,560.833 388.5,557.5C 361.167,557.5 333.833,557.5 306.5,557.5 Z"/></g>
<g><path style="opacity:1" fill="#3678c8" d="M 659.5,567.5 C 659.833,567.5 660.167,567.5 660.5,567.5C 660.168,609.003 660.501,650.337 661.5,691.5C 662.914,693.598 662.248,694.598 659.5,694.5C 659.5,652.167 659.5,609.833 659.5,567.5 Z"/></g>
<g><path style="opacity:1" fill="#deebf5" d="M 552.5,545.5 C 553.493,553.984 553.826,562.651 553.5,571.5C 553.552,573.903 553.219,576.236 552.5,578.5C 551.833,579.5 551.167,580.5 550.5,581.5C 552.239,569.678 552.905,557.678 552.5,545.5 Z"/></g>
<g><path style="opacity:1" fill="#3f7bc3" d="M 387.5,567.5 C 387.833,567.5 388.167,567.5 388.5,567.5C 388.5,609.833 388.5,652.167 388.5,694.5C 417.815,696.492 447.481,697.159 477.5,696.5C 448.294,697.174 418.961,697.841 389.5,698.5C 388.914,698.291 388.414,697.957 388,697.5C 387.5,654.168 387.333,610.835 387.5,567.5 Z"/></g>
<g><path style="opacity:1" fill="#6590bf" d="M 489.5,585.5 C 485.952,586.702 482.285,587.369 478.5,587.5C 480.794,585.609 483.628,584.609 487,584.5C 488.07,584.528 488.903,584.861 489.5,585.5 Z"/></g>
<g><path style="opacity:1" fill="#80a9d4" d="M 472.5,587.5 C 467.265,590.261 461.599,591.594 455.5,591.5C 460.969,589.798 466.635,588.465 472.5,587.5 Z"/></g>
<g><path style="opacity:1" fill="#8aaed6" d="M 455.5,591.5 C 453.371,592.203 451.371,593.203 449.5,594.5C 447.5,594.5 445.5,594.5 443.5,594.5C 447.098,592.308 451.098,591.308 455.5,591.5 Z"/></g>
<g><path style="opacity:1" fill="#508cc8" d="M 489.5,585.5 C 490.814,588.128 492.147,590.795 493.5,593.5C 492.312,592.316 491.145,592.316 490,593.5C 489.503,590.854 489.336,588.187 489.5,585.5 Z"/></g>
<g><path style="opacity:1" fill="#6391bf" d="M 443.5,594.5 C 439.841,596.342 435.841,597.342 431.5,597.5C 435.159,595.658 439.159,594.658 443.5,594.5 Z"/></g>
<g><path style="opacity:1" fill="#85abcf" d="M 546.5,594.5 C 545.25,598.408 542.917,601.408 539.5,603.5C 541.482,600.19 543.815,597.19 546.5,594.5 Z"/></g>
<g><path style="opacity:1" fill="#417fc3" d="M 443.5,594.5 C 445.5,594.5 447.5,594.5 449.5,594.5C 446.442,596.132 443.109,597.299 439.5,598C 434.102,598.517 428.769,599.351 423.5,600.5C 423.858,604.509 424.358,608.509 425,612.5C 426.131,611.396 426.965,611.729 427.5,613.5C 427.154,614.696 426.654,614.696 426,613.5C 425.51,614.793 425.343,616.127 425.5,617.5C 424.008,613.736 423.008,609.736 422.5,605.5C 421.532,603.393 421.198,601.059 421.5,598.5C 422.833,598.5 424.167,598.5 425.5,598.5C 427.265,597.539 429.265,597.205 431.5,597.5C 435.841,597.342 439.841,596.342 443.5,594.5 Z"/></g>
<g><path style="opacity:1" fill="#5188c3" d="M 629.5,576.5 C 628.998,588.339 627.332,600.006 624.5,611.5C 624.167,611.5 623.833,611.5 623.5,611.5C 624.306,607.957 624.306,604.457 623.5,601C 625.59,592.631 627.59,584.464 629.5,576.5 Z"/></g>
<g><path style="opacity:1" fill="#4486c8" d="M 493.5,594.5 C 497.823,600.489 502.823,605.822 508.5,610.5C 505.761,610.293 503.427,609.293 501.5,607.5C 499.944,608.547 498.277,609.214 496.5,609.5C 497.167,607.167 497.833,604.833 498.5,602.5C 495.794,602.575 493.127,602.908 490.5,603.5C 490.5,602.5 490.5,601.5 490.5,600.5C 491.5,600.5 492.5,600.5 493.5,600.5C 493.5,598.5 493.5,596.5 493.5,594.5 Z"/></g>
<g><path style="opacity:1" fill="#6b92be" d="M 425.5,598.5 C 424.791,599.404 423.791,599.737 422.5,599.5C 422.5,601.5 422.5,603.5 422.5,605.5C 422.5,603.5 422.5,601.5 422.5,599.5C 423.791,599.737 424.791,599.404 425.5,598.5 Z"/></g>
<g><path style="opacity:1" fill="#99bbdc" d="M 538.5,603.5 C 536.938,607.733 533.938,610.067 529.5,610.5C 532.783,608.553 535.783,606.22 538.5,603.5 Z"/></g>
<g><path style="opacity:1" fill="#4082c4" d="M 552.5,578.5 C 551.965,582.819 551.465,587.152 551,591.5C 547.708,596.806 544.375,602.139 541,607.5C 540.506,609.134 540.34,610.801 540.5,612.5C 535.529,610.723 530.862,611.223 526.5,614C 521.467,614.829 516.467,614.662 511.5,613.5C 510.007,612.859 509.007,611.859 508.5,610.5C 510.5,610.833 512.5,611.167 514.5,611.5C 518.47,614.079 522.47,614.079 526.5,611.5C 527.391,610.89 528.391,610.557 529.5,610.5C 533.938,610.067 536.938,607.733 538.5,603.5C 538.833,603.5 539.167,603.5 539.5,603.5C 542.917,601.408 545.25,598.408 546.5,594.5C 548.906,590.554 550.24,586.22 550.5,581.5C 551.167,580.5 551.833,579.5 552.5,578.5 Z"/></g>
<g><path style="opacity:1" fill="#b3d8ec" d="M 514.5,611.5 C 518.5,611.5 522.5,611.5 526.5,611.5C 522.47,614.079 518.47,614.079 514.5,611.5 Z"/></g>
<g><path style="opacity:1" fill="#a1bedb" d="M 623.5,611.5 C 623.833,611.5 624.167,611.5 624.5,611.5C 624.59,614.152 623.924,616.485 622.5,618.5C 622.674,616.139 623.007,613.806 623.5,611.5 Z"/></g>
<g><path style="opacity:1" fill="#8aafd2" d="M 426.5,624.5 C 428.213,625.635 428.88,627.302 428.5,629.5C 427.463,628.07 426.796,626.403 426.5,624.5 Z"/></g>
<g><path style="opacity:1" fill="#deeef5" d="M 622.5,620.5 C 622.452,623.313 621.785,625.979 620.5,628.5C 622.302,632.168 621.302,634.502 617.5,635.5C 618.589,630.233 620.256,625.233 622.5,620.5 Z"/></g>
<g><path style="opacity:1" fill="#4681bc" d="M 431.5,635.5 C 432.5,635.5 433.5,635.5 434.5,635.5C 434.541,639.616 435.207,643.616 436.5,647.5C 434.952,647.179 434.285,646.179 434.5,644.5C 434.245,642.033 433.245,640.033 431.5,638.5C 431.5,637.5 431.5,636.5 431.5,635.5 Z"/></g>
<g><path style="opacity:1" fill="#5085be" d="M 615.5,638.5 C 615.5,639.167 615.5,639.833 615.5,640.5C 614.021,642.72 612.688,645.054 611.5,647.5C 610.657,643.343 611.991,640.343 615.5,638.5 Z"/></g>
<g><path style="opacity:1" fill="#94b7d6" d="M 431.5,638.5 C 433.245,640.033 434.245,642.033 434.5,644.5C 432.755,642.967 431.755,640.967 431.5,638.5 Z"/></g>
<g><path style="opacity:1" fill="#d2e5f3" d="M 615.5,640.5 C 614.86,643.865 614.026,647.198 613,650.5C 609.363,654.105 607.03,658.438 606,663.5C 603.256,665.085 601.089,667.085 599.5,669.5C 604.01,662.482 608.01,655.149 611.5,647.5C 612.688,645.054 614.021,642.72 615.5,640.5 Z"/></g>
<g><path style="opacity:1" fill="#ddeaf5" d="M 437.5,652.5 C 441.68,658.355 445.68,664.355 449.5,670.5C 447.092,669.004 444.759,667.338 442.5,665.5C 440.749,661.123 439.082,656.79 437.5,652.5 Z"/></g>
<g><path style="opacity:1" fill="#7097c2" d="M 455.5,676.5 C 458.089,677.419 460.089,679.086 461.5,681.5C 458.911,680.581 456.911,678.914 455.5,676.5 Z"/></g>
<g><path style="opacity:1" fill="#cce2f1" d="M 599.5,669.5 C 598.155,671.697 596.989,674.03 596,676.5C 594.53,677.267 593.03,677.933 591.5,678.5C 593.773,675.223 596.44,672.223 599.5,669.5 Z"/></g>
<g><path style="opacity:1" fill="#c7daef" d="M 591.5,678.5 C 589.596,683.082 586.263,685.748 581.5,686.5C 584.854,683.828 588.187,681.161 591.5,678.5 Z"/></g>
<g><path style="opacity:1" fill="#6796c5" d="M 461.5,681.5 C 465.922,683.406 470.256,685.572 474.5,688C 475.823,688.816 476.489,689.983 476.5,691.5C 476.167,691.5 475.833,691.5 475.5,691.5C 470.091,689.136 465.424,685.802 461.5,681.5 Z"/></g>
<g><path style="opacity:1" fill="#cce5f4" d="M 581.5,686.5 C 580.358,688.433 578.692,689.933 576.5,691C 575.207,691.49 573.873,691.657 572.5,691.5C 575.008,689.076 578.008,687.41 581.5,686.5 Z"/></g>
<g><path style="opacity:1" fill="#dae7f9" d="M 658.5,557.5 C 658.5,603.167 658.5,648.833 658.5,694.5C 629.159,694.833 599.826,694.5 570.5,693.5C 570.624,692.893 570.957,692.56 571.5,692.5C 599.995,693.498 628.662,693.831 657.5,693.5C 657.168,647.997 657.501,602.664 658.5,557.5 Z"/></g>
<g><path style="opacity:1" fill="#acc6e9" d="M 306.5,557.5 C 306.5,603.167 306.5,648.833 306.5,694.5C 306.5,695.167 306.167,695.5 305.5,695.5C 279.995,695.831 254.661,695.498 229.5,694.5C 254.833,694.5 280.167,694.5 305.5,694.5C 305.168,648.664 305.501,602.997 306.5,557.5 Z"/></g>
<g><path style="opacity:1" fill="#a5c2eb" d="M 475.5,691.5 C 475.833,691.5 476.167,691.5 476.5,691.5C 476.833,691.5 477.167,691.5 477.5,691.5C 478.141,692.482 478.807,693.482 479.5,694.5C 449.336,695.83 419.336,695.83 389.5,694.5C 418.508,694.833 447.508,694.5 476.5,693.5C 476.137,692.817 475.804,692.15 475.5,691.5 Z"/></g>
<g><path style="opacity:1" fill="#a5c2e9" d="M 571.5,691.5 C 571.5,691.833 571.5,692.167 571.5,692.5C 570.957,692.56 570.624,692.893 570.5,693.5C 599.826,694.5 629.159,694.833 658.5,694.5C 658.5,694.833 658.5,695.167 658.5,695.5C 628.833,695.5 599.167,695.5 569.5,695.5C 569.5,694.5 569.5,693.5 569.5,692.5C 569.842,691.662 570.508,691.328 571.5,691.5 Z"/></g>
<g><path style="opacity:1" fill="#5e8fcb" d="M 477.5,691.5 C 482.7,693.507 482.7,695.173 477.5,696.5C 447.481,697.159 417.815,696.492 388.5,694.5C 388.833,694.5 389.167,694.5 389.5,694.5C 419.336,695.83 449.336,695.83 479.5,694.5C 478.807,693.482 478.141,692.482 477.5,691.5 Z"/></g>
<g><path style="opacity:1" fill="#6090ca" d="M 569.5,692.5 C 569.5,693.5 569.5,694.5 569.5,695.5C 599.167,695.5 628.833,695.5 658.5,695.5C 628.338,696.498 598.005,696.831 567.5,696.5C 567.229,694.62 567.896,693.287 569.5,692.5 Z"/></g>
<g><path style="opacity:1" fill="#2b7fd7" d="M 236.5,703.5 C 260.167,703.5 283.833,703.5 307.5,703.5C 307.5,705.167 307.5,706.833 307.5,708.5C 283.909,706.626 260.242,705.959 236.5,706.5C 236.5,705.5 236.5,704.5 236.5,703.5 Z"/></g>
<g><path style="opacity:1" fill="#2b7ed7" d="M 385.5,700.5 C 387.167,700.5 388.833,700.5 390.5,700.5C 390.5,701.5 390.5,702.5 390.5,703.5C 418.167,703.5 445.833,703.5 473.5,703.5C 473.5,704.5 473.5,705.5 473.5,706.5C 445.593,706.172 417.759,706.505 390,707.5C 387.98,705.449 386.48,703.116 385.5,700.5 Z"/></g>
<g><path style="opacity:1" fill="#2c7ed7" d="M 579.5,703.5 C 603.167,703.5 626.833,703.5 650.5,703.5C 650.5,704.5 650.5,705.5 650.5,706.5C 626.833,706.5 603.167,706.5 579.5,706.5C 579.5,705.5 579.5,704.5 579.5,703.5 Z"/></g>
</svg>

After

Width:  |  Height:  |  Size: 42 KiB

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="1024px" height="1024px" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd" xmlns:xlink="http://www.w3.org/1999/xlink">
<g><path style="opacity:1" fill="#2781d2" d="M -0.5,-0.5 C 340.833,-0.5 682.167,-0.5 1023.5,-0.5C 1023.5,340.833 1023.5,682.167 1023.5,1023.5C 825.5,1023.5 627.5,1023.5 429.5,1023.5C 438.329,1016.83 445.162,1008.5 450,998.5C 450.495,996.527 450.662,994.527 450.5,992.5C 451.29,991.391 451.79,990.058 452,988.5C 452.5,964.836 452.667,941.169 452.5,917.5C 452.5,902.833 452.5,888.167 452.5,873.5C 452.5,848.833 452.5,824.167 452.5,799.5C 452.5,794.167 452.5,788.833 452.5,783.5C 474.169,783.667 495.836,783.5 517.5,783C 531.72,779.416 538.22,770.25 537,755.5C 534.116,748.264 529.616,742.097 523.5,737C 515.333,730.331 507.333,723.498 499.5,716.5C 491.141,709.138 482.808,701.804 474.5,694.5C 475.978,694.762 477.311,694.429 478.5,693.5C 476.042,692.876 474.376,691.376 473.5,689C 471.545,688.047 469.878,686.713 468.5,685C 465.629,684.869 463.295,683.703 461.5,681.5C 460.893,681.624 460.56,681.957 460.5,682.5C 456.518,680.183 453.185,677.183 450.5,673.5C 451.525,673.103 451.692,672.437 451,671.5C 440.547,657.809 432.547,642.809 427,626.5C 426.498,623.487 425.998,620.487 425.5,617.5C 425.343,616.127 425.51,614.793 426,613.5C 428.033,614.016 428.033,613.35 426,611.5C 425.667,611.833 425.333,612.167 425,612.5C 424.358,608.509 423.858,604.509 423.5,600.5C 436.809,598.548 449.976,595.881 463,592.5C 464.981,592.629 466.647,593.296 468,594.5C 469.675,593.405 470.842,591.905 471.5,590C 473.927,589.098 476.26,588.264 478.5,587.5C 478.97,586.307 479.97,585.64 481.5,585.5C 484.154,584.732 486.821,584.566 489.5,585C 491.997,589.816 494.497,594.649 497,599.5C 500.414,603.723 504.247,607.389 508.5,610.5C 509.007,611.859 510.007,612.859 511.5,613.5C 516.467,614.662 521.467,614.829 526.5,614C 530.353,611.757 534.353,609.757 538.5,608C 540.99,603.355 543.657,598.855 546.5,594.5C 548.906,590.554 550.24,586.22 550.5,581.5C 552.461,578.551 553.627,575.218 554,571.5C 554.858,562.61 554.358,553.943 552.5,545.5C 550.447,537.392 547.281,529.725 543,522.5C 525.877,505.557 509.877,506.557 495,525.5C 493.028,529.747 491.528,534.081 490.5,538.5C 487.763,538.599 485.096,538.265 482.5,537.5C 474.564,534.438 466.231,532.772 457.5,532.5C 445.695,529.309 433.695,526.976 421.5,525.5C 422.508,514.133 423.841,502.8 425.5,491.5C 426.151,490.909 426.818,490.243 427.5,489.5C 427.937,482.979 429.104,476.646 431,470.5C 431.333,473.167 431.667,475.833 432,478.5C 432.001,475.313 432.834,472.48 434.5,470C 433.884,468.6 433.551,467.1 433.5,465.5C 433.685,462.866 434.685,460.7 436.5,459C 436.07,457.566 435.236,456.399 434,455.5C 433.501,451.514 433.334,447.514 433.5,443.5C 438.746,409.201 443.746,374.868 448.5,340.5C 449.75,340.423 450.583,339.756 451,338.5C 451.499,332.509 451.666,326.509 451.5,320.5C 430.66,320.169 409.993,320.503 389.5,321.5C 388.501,374.331 388.168,427.331 388.5,480.5C 385.167,480.5 381.833,480.5 378.5,480.5C 355.006,479.502 331.339,479.169 307.5,479.5C 307.832,426.997 307.499,374.664 306.5,322.5C 306.5,321.833 306.167,321.5 305.5,321.5C 305.631,320.624 305.298,319.957 304.5,319.5C 279.372,320.158 254.372,320.824 229.5,321.5C 228.167,397.5 228.167,473.5 229.5,549.5C 209.537,566.461 189.87,583.795 170.5,601.5C 126.929,638.064 83.9286,675.398 41.5,713.5C 28.7811,723.317 16.6145,733.984 5,745.5C 3.06609,748.514 1.23276,751.514 -0.5,754.5C -0.5,502.833 -0.5,251.167 -0.5,-0.5 Z"/></g>
<g><path style="opacity:1" fill="#4f86c4" d="M 762.5,336.5 C 756.543,332.517 750.209,329.017 743.5,326C 738.429,323.655 733.095,322.488 727.5,322.5C 691.337,321.502 655.004,321.168 618.5,321.5C 618.5,321.167 618.5,320.833 618.5,320.5C 636.164,319.833 653.997,319.5 672,319.5C 693.19,319.396 714.357,319.896 735.5,321C 741.808,322.66 747.808,324.994 753.5,328C 757.329,329.997 760.329,332.83 762.5,336.5 Z"/></g>
<g><path style="opacity:1" fill="#6893c6" d="M 305.5,321.5 C 280.167,321.5 254.833,321.5 229.5,321.5C 254.372,320.824 279.372,320.158 304.5,319.5C 305.298,319.957 305.631,320.624 305.5,321.5 Z"/></g>
<g><path style="opacity:1" fill="#6591c5" d="M 389.5,321.5 C 409.993,320.503 430.66,320.169 451.5,320.5C 451.666,326.509 451.499,332.509 451,338.5C 450.583,339.756 449.75,340.423 448.5,340.5C 449.602,334.552 450.269,328.552 450.5,322.5C 430.34,321.503 410.007,321.17 389.5,321.5 Z"/></g>
<g><path style="opacity:1" fill="#fdfdfd" d="M 229.5,322.5 C 254.833,322.5 280.167,322.5 305.5,322.5C 305.333,375.501 305.5,428.501 306,481.5C 333.931,482.832 361.764,482.832 389.5,481.5C 389.5,428.5 389.5,375.5 389.5,322.5C 409.833,322.5 430.167,322.5 450.5,322.5C 450.269,328.552 449.602,334.552 448.5,340.5C 443.746,374.868 438.746,409.201 433.5,443.5C 430.476,459.323 427.81,475.323 425.5,491.5C 423.841,502.8 422.508,514.133 421.5,525.5C 433.695,526.976 445.695,529.309 457.5,532.5C 463.056,533.992 468.722,535.492 474.5,537C 477.146,537.497 479.813,537.664 482.5,537.5C 485.096,538.265 487.763,538.599 490.5,538.5C 491.528,534.081 493.028,529.747 495,525.5C 509.877,506.557 525.877,505.557 543,522.5C 547.281,529.725 550.447,537.392 552.5,545.5C 552.905,557.678 552.239,569.678 550.5,581.5C 550.24,586.22 548.906,590.554 546.5,594.5C 544.031,597.144 541.698,599.977 539.5,603C 535.726,606.768 531.393,609.768 526.5,612C 524.419,612.869 522.253,613.369 520,613.5C 516.197,612.399 512.364,611.399 508.5,610.5C 504.247,607.389 500.414,603.723 497,599.5C 494.497,594.649 491.997,589.816 489.5,585C 486.821,584.566 484.154,584.732 481.5,585.5C 479.97,585.64 478.97,586.307 478.5,587.5C 474.818,587.335 471.152,587.501 467.5,588C 452.264,592.025 436.931,595.525 421.5,598.5C 422.046,605.102 423.379,611.435 425.5,617.5C 425.998,620.487 426.498,623.487 427,626.5C 432.547,642.809 440.547,657.809 451,671.5C 451.692,672.437 451.525,673.103 450.5,673.5C 429.871,656.207 409.538,638.54 389.5,620.5C 389.5,599.167 389.5,577.833 389.5,556.5C 365.167,556.5 340.833,556.5 316.5,556.5C 305.372,547.21 294.372,537.71 283.5,528C 274.927,521.536 265.927,520.869 256.5,526C 247.641,533.365 238.974,540.865 230.5,548.5C 229.501,473.335 229.167,398.002 229.5,322.5 Z"/></g>
<g><path style="opacity:1" fill="#fdfdfd" d="M 727.5,322.5 C 733.095,322.488 738.429,323.655 743.5,326C 750.209,329.017 756.543,332.517 762.5,336.5C 762.833,336.5 763.167,336.5 763.5,336.5C 768.938,343.723 774.604,350.723 780.5,357.5C 792.947,382.382 798.613,408.882 797.5,437C 797.752,466.593 791.085,494.427 777.5,520.5C 774.512,524.462 771.512,528.462 768.5,532.5C 761.641,538.087 754.641,543.421 747.5,548.5C 746.508,548.328 745.842,548.662 745.5,549.5C 741.213,550.232 737.213,551.565 733.5,553.5C 731.786,554.738 729.786,555.405 727.5,555.5C 704.346,556.104 681.346,556.77 658.5,557.5C 657.501,602.664 657.168,647.997 657.5,693.5C 628.662,693.831 599.995,693.498 571.5,692.5C 571.5,692.167 571.5,691.833 571.5,691.5C 576.98,688.593 582.313,685.426 587.5,682C 590.698,677.974 594.032,674.141 597.5,670.5C 598.167,670.167 598.833,669.833 599.5,669.5C 601.089,667.085 603.256,665.085 606,663.5C 607.03,658.438 609.363,654.105 613,650.5C 614.026,647.198 614.86,643.865 615.5,640.5C 617.014,634.776 618.681,629.109 620.5,623.5C 621.891,621.04 623.058,618.374 624,615.5C 626.646,602.604 628.646,589.604 630,576.5C 630.667,565.167 630.667,553.833 630,542.5C 629.722,541.584 629.222,540.918 628.5,540.5C 627.081,513.093 617.915,488.76 601,467.5C 592.068,458.912 582.235,451.412 571.5,445C 567.035,444.126 562.702,443.293 558.5,442.5C 547.007,441.341 535.341,441.174 523.5,442C 522.263,442.232 521.263,442.732 520.5,443.5C 514.391,445.14 508.391,446.974 502.5,449C 501.333,449.5 500.5,450.333 500,451.5C 499.503,448.854 499.336,446.187 499.5,443.5C 500.853,428.739 502.853,414.072 505.5,399.5C 543.167,399.5 580.833,399.5 618.5,399.5C 618.5,373.833 618.5,348.167 618.5,322.5C 654.833,322.5 691.167,322.5 727.5,322.5 Z"/></g>
<g><path style="opacity:1" fill="#96afd3" d="M 389.5,321.5 C 410.007,321.17 430.34,321.503 450.5,322.5C 430.167,322.5 409.833,322.5 389.5,322.5C 389.5,375.5 389.5,428.5 389.5,481.5C 361.995,481.831 334.662,481.498 307.5,480.5C 331.167,480.5 354.833,480.5 378.5,480.5C 381.833,480.5 385.167,480.5 388.5,480.5C 388.168,427.331 388.501,374.331 389.5,321.5 Z"/></g>
<g><path style="opacity:1" fill="#9bb3d8" d="M 618.5,321.5 C 655.004,321.168 691.337,321.502 727.5,322.5C 691.167,322.5 654.833,322.5 618.5,322.5C 618.5,348.167 618.5,373.833 618.5,399.5C 580.833,399.5 543.167,399.5 505.5,399.5C 505.5,398.833 505.833,398.5 506.5,398.5C 542.835,398.667 579.168,398.5 615.5,398C 616,397.5 616.5,397 617,396.5C 617.168,371.33 617.668,346.33 618.5,321.5 Z"/></g>
<g><path style="opacity:1" fill="#bbcce7" d="M 229.5,322.5 C 229.5,322.167 229.5,321.833 229.5,321.5C 254.833,321.5 280.167,321.5 305.5,321.5C 306.167,321.5 306.5,321.833 306.5,322.5C 306.168,375.336 306.501,428.003 307.5,480.5C 334.662,481.498 361.995,481.831 389.5,481.5C 361.764,482.832 333.931,482.832 306,481.5C 305.5,428.501 305.333,375.501 305.5,322.5C 280.167,322.5 254.833,322.5 229.5,322.5 Z"/></g>
<g><path style="opacity:1" fill="#759ac1" d="M 229.5,321.5 C 229.5,321.833 229.5,322.167 229.5,322.5C 229.167,398.002 229.501,473.335 230.5,548.5C 230.5,549.167 230.167,549.5 229.5,549.5C 228.167,473.5 228.167,397.5 229.5,321.5 Z"/></g>
<g><path style="opacity:1" fill="#4e81bd" d="M 306.5,322.5 C 307.499,374.664 307.832,426.997 307.5,479.5C 331.339,479.169 355.006,479.502 378.5,480.5C 354.833,480.5 331.167,480.5 307.5,480.5C 306.501,428.003 306.168,375.336 306.5,322.5 Z"/></g>
<g><path style="opacity:1" fill="#6797ca" d="M 763.5,336.5 C 768.316,339.151 771.983,342.984 774.5,348C 776.329,348.273 777.829,349.107 779,350.5C 779.44,352.866 779.94,355.199 780.5,357.5C 774.604,350.723 768.938,343.723 763.5,336.5 Z"/></g>
<g><path style="opacity:1" fill="#497ec6" d="M 618.5,320.5 C 618.5,320.833 618.5,321.167 618.5,321.5C 617.668,346.33 617.168,371.33 617,396.5C 616.5,397 616,397.5 615.5,398C 579.168,398.5 542.835,398.667 506.5,398.5C 505.402,397.603 505.402,396.77 506.5,396C 543.165,395.5 579.832,395.333 616.5,395.5C 616.819,371.301 616.485,347.134 615.5,323C 615.748,321.251 616.748,320.418 618.5,320.5 Z"/></g>
<g><path style="opacity:1" fill="#9fbee1" d="M 658.5,397.5 C 669.326,396.341 680.326,396.174 691.5,397C 693.058,397.21 694.391,397.71 695.5,398.5C 692.5,398.5 689.5,398.5 686.5,398.5C 677.348,397.506 668.015,397.173 658.5,397.5 Z"/></g>
<g><path style="opacity:1" fill="#2981d2" d="M 686.5,398.5 C 689.5,398.5 692.5,398.5 695.5,398.5C 708.268,400.771 716.435,408.104 720,420.5C 723.674,434.368 723.174,448.035 718.5,461.5C 715.81,464.873 713.477,468.54 711.5,472.5C 706.284,475.939 700.617,478.606 694.5,480.5C 682.833,480.5 671.167,480.5 659.5,480.5C 659.5,453.167 659.5,425.833 659.5,398.5C 668.5,398.5 677.5,398.5 686.5,398.5 Z"/></g>
<g><path style="opacity:1" fill="#6191c4" d="M 658.5,397.5 C 668.015,397.173 677.348,397.506 686.5,398.5C 677.5,398.5 668.5,398.5 659.5,398.5C 659.5,425.833 659.5,453.167 659.5,480.5C 671.167,480.5 682.833,480.5 694.5,480.5C 682.678,481.495 670.678,481.828 658.5,481.5C 658.5,453.5 658.5,425.5 658.5,397.5 Z"/></g>
<g><path style="opacity:1" fill="#538ac4" d="M 505.5,399.5 C 502.853,414.072 500.853,428.739 499.5,443.5C 498.833,444.833 498.167,446.167 497.5,447.5C 498.012,436.43 499.178,425.43 501,414.5C 502.225,410.325 503.058,405.991 503.5,401.5C 503.747,400.287 504.414,399.62 505.5,399.5 Z"/></g>
<g><path style="opacity:1" fill="#c7deed" d="M 499.5,443.5 C 499.336,446.187 499.503,448.854 500,451.5C 500.5,450.333 501.333,449.5 502.5,449C 508.391,446.974 514.391,445.14 520.5,443.5C 513.411,447.459 506.078,451.125 498.5,454.5C 497.534,452.604 497.201,450.604 497.5,448.5C 497.5,448.167 497.5,447.833 497.5,447.5C 498.167,446.167 498.833,444.833 499.5,443.5 Z"/></g>
<g><path style="opacity:1" fill="#4687c9" d="M 558.5,442.5 C 547.14,442.283 535.807,442.616 524.5,443.5C 524.719,444.675 524.386,445.675 523.5,446.5C 521.051,446.98 518.885,447.98 517,449.5C 516.08,451.632 514.913,453.632 513.5,455.5C 512.491,452.013 510.158,450.68 506.5,451.5C 506.328,453.492 506.995,455.158 508.5,456.5C 507.68,458.111 506.346,458.778 504.5,458.5C 504.5,457.5 504.5,456.5 504.5,455.5C 501.833,455.5 499.167,455.5 496.5,455.5C 496.198,452.941 496.532,450.607 497.5,448.5C 497.201,450.604 497.534,452.604 498.5,454.5C 506.078,451.125 513.411,447.459 520.5,443.5C 521.263,442.732 522.263,442.232 523.5,442C 535.341,441.174 547.007,441.341 558.5,442.5 Z"/></g>
<g><path style="opacity:1" fill="#4988cb" d="M 433.5,443.5 C 433.334,447.514 433.501,451.514 434,455.5C 435.236,456.399 436.07,457.566 436.5,459C 434.685,460.7 433.685,462.866 433.5,465.5C 433.551,467.1 433.884,468.6 434.5,470C 432.834,472.48 432.001,475.313 432,478.5C 431.667,475.833 431.333,473.167 431,470.5C 429.104,476.646 427.937,482.979 427.5,489.5C 426.818,490.243 426.151,490.909 425.5,491.5C 427.81,475.323 430.476,459.323 433.5,443.5 Z"/></g>
<g><path style="opacity:1" fill="#9ebfdf" d="M 718.5,461.5 C 717.374,465.954 715.041,469.621 711.5,472.5C 713.477,468.54 715.81,464.873 718.5,461.5 Z"/></g>
<g><path style="opacity:1" fill="#02038f" d="M 316.5,556.5 C 316.5,557.167 316.833,557.5 317.5,557.5C 335.489,572.824 353.156,588.491 370.5,604.5C 359.664,605.468 348.664,605.468 337.5,604.5C 314.213,585.381 291.38,565.715 269,545.5C 254.64,557.698 240.474,570.032 226.5,582.5C 218.352,589.738 210.019,596.738 201.5,603.5C 190.828,603.667 180.161,603.5 169.5,603C 170.056,602.617 170.389,602.117 170.5,601.5C 189.87,583.795 209.537,566.461 229.5,549.5C 230.167,549.5 230.5,549.167 230.5,548.5C 238.974,540.865 247.641,533.365 256.5,526C 265.927,520.869 274.927,521.536 283.5,528C 294.372,537.71 305.372,547.21 316.5,556.5 Z"/></g>
<g><path style="opacity:1" fill="#90b1d9" d="M 777.5,520.5 C 775.951,525.603 772.951,529.603 768.5,532.5C 771.512,528.462 774.512,524.462 777.5,520.5 Z"/></g>
<g><path style="opacity:1" fill="#77a0c9" d="M 457.5,532.5 C 466.231,532.772 474.564,534.438 482.5,537.5C 479.813,537.664 477.146,537.497 474.5,537C 468.722,535.492 463.056,533.992 457.5,532.5 Z"/></g>
<g><path style="opacity:1" fill="#91b6db" d="M 768.5,532.5 C 767.797,534.716 766.464,536.549 764.5,538C 760.949,540.268 757.616,542.768 754.5,545.5C 752.026,546.32 749.693,547.32 747.5,548.5C 754.641,543.421 761.641,538.087 768.5,532.5 Z"/></g>
<g><path style="opacity:1" fill="#0938eb" d="M 337.5,604.5 C 381.203,643.539 425.203,682.206 469.5,720.5C 484.185,733.851 499.185,746.851 514.5,759.5C 486.508,760.5 458.508,760.833 430.5,760.5C 428.5,758.833 426.5,757.167 424.5,755.5C 424.973,754.094 425.973,753.427 427.5,753.5C 448.844,753.833 470.177,753.5 491.5,752.5C 491.376,751.893 491.043,751.56 490.5,751.5C 490.5,750.833 490.167,750.5 489.5,750.5C 484.248,745.853 478.914,741.186 473.5,736.5C 467.321,730.921 460.988,725.588 454.5,720.5C 444.918,711.041 434.918,702.041 424.5,693.5C 417.771,687.431 410.771,681.764 403.5,676.5C 398.446,670.806 392.78,665.806 386.5,661.5C 376.072,651.129 365.072,641.463 353.5,632.5C 347.516,626.52 341.183,620.853 334.5,615.5C 312.653,596.637 290.82,577.637 269,558.5C 258.445,567.857 247.611,576.857 236.5,585.5C 234.429,584.046 232.262,582.713 230,581.5C 228.862,581.989 227.695,582.322 226.5,582.5C 240.474,570.032 254.64,557.698 269,545.5C 291.38,565.715 314.213,585.381 337.5,604.5 Z"/></g>
<g><path style="opacity:1" fill="#87afd4" d="M 745.5,549.5 C 742.004,552.048 738.004,553.381 733.5,553.5C 737.213,551.565 741.213,550.232 745.5,549.5 Z"/></g>
<g><path style="opacity:1" fill="#6291c7" d="M 628.5,540.5 C 629.222,540.918 629.722,541.584 630,542.5C 630.667,553.833 630.667,565.167 630,576.5C 628.646,589.604 626.646,602.604 624,615.5C 623.058,618.374 621.891,621.04 620.5,623.5C 620.491,617.044 621.825,610.878 624.5,605C 623.048,601.251 623.548,597.751 626,594.5C 628.165,576.568 628.998,558.568 628.5,540.5 Z"/></g>
<g><path style="opacity:1" fill="#2980d0" d="M 317.5,557.5 C 341.167,557.5 364.833,557.5 388.5,557.5C 388.5,578.167 388.5,598.833 388.5,619.5C 382.5,614.5 376.5,609.5 370.5,604.5C 353.156,588.491 335.489,572.824 317.5,557.5 Z"/></g>
<g><path style="opacity:1" fill="#d5e1f6" d="M 658.5,557.5 C 658.5,603.167 658.5,648.833 658.5,694.5C 629.159,694.833 599.826,694.5 570.5,693.5C 570.624,692.893 570.957,692.56 571.5,692.5C 599.995,693.498 628.662,693.831 657.5,693.5C 657.168,647.997 657.501,602.664 658.5,557.5 Z"/></g>
<g><path style="opacity:1" fill="#6b92ca" d="M 727.5,555.5 C 726.4,556.558 725.066,557.392 723.5,558C 702.169,558.5 680.836,558.667 659.5,558.5C 659.832,604.003 659.499,649.336 658.5,694.5C 658.5,648.833 658.5,603.167 658.5,557.5C 681.346,556.77 704.346,556.104 727.5,555.5 Z"/></g>
<g><path style="opacity:1" fill="#94b0d5" d="M 316.5,556.5 C 340.833,556.5 365.167,556.5 389.5,556.5C 389.5,577.833 389.5,599.167 389.5,620.5C 388.833,620.5 388.5,620.167 388.5,619.5C 388.5,598.833 388.5,578.167 388.5,557.5C 364.833,557.5 341.167,557.5 317.5,557.5C 316.833,557.5 316.5,557.167 316.5,556.5 Z"/></g>
<g><path style="opacity:1" fill="#d1e0f1" d="M 552.5,545.5 C 554.358,553.943 554.858,562.61 554,571.5C 553.627,575.218 552.461,578.551 550.5,581.5C 552.239,569.678 552.905,557.678 552.5,545.5 Z"/></g>
<g><path style="opacity:1" fill="#ebf3fe" d="M 334.5,615.5 C 331.36,616.641 328.027,616.808 324.5,616C 289.795,611.638 255.128,606.971 220.5,602C 221.71,600.961 222.71,599.794 223.5,598.5C 227.64,593.939 231.973,589.605 236.5,585.5C 247.611,576.857 258.445,567.857 269,558.5C 290.82,577.637 312.653,596.637 334.5,615.5 Z"/></g>
<g><path style="opacity:1" fill="#e2eefe" d="M 223.5,598.5 C 222.71,599.794 221.71,600.961 220.5,602C 255.128,606.971 289.795,611.638 324.5,616C 328.027,616.808 331.36,616.641 334.5,615.5C 341.183,620.853 347.516,626.52 353.5,632.5C 352.551,633.152 351.385,633.486 350,633.5C 339.225,631.987 328.391,631.154 317.5,631C 279.467,626.281 241.467,621.281 203.5,616C 204.056,615.617 204.389,615.117 204.5,614.5C 210.242,608.422 216.575,603.088 223.5,598.5 Z"/></g>
<g><path style="opacity:1" fill="#0e49f0" d="M 236.5,585.5 C 231.973,589.605 227.64,593.939 223.5,598.5C 216.575,603.088 210.242,608.422 204.5,614.5C 202.02,615.912 199.687,617.578 197.5,619.5C 195.059,618.443 192.725,617.11 190.5,615.5C 189.583,616.127 188.583,616.461 187.5,616.5C 192.167,612.167 196.833,607.833 201.5,603.5C 210.019,596.738 218.352,589.738 226.5,582.5C 227.695,582.322 228.862,581.989 230,581.5C 232.262,582.713 234.429,584.046 236.5,585.5 Z"/></g>
<g><path style="opacity:1" fill="#4f86c5" d="M 478.5,587.5 C 476.26,588.264 473.927,589.098 471.5,590C 470.842,591.905 469.675,593.405 468,594.5C 466.647,593.296 464.981,592.629 463,592.5C 449.976,595.881 436.809,598.548 423.5,600.5C 423.858,604.509 424.358,608.509 425,612.5C 425.333,612.167 425.667,611.833 426,611.5C 428.033,613.35 428.033,614.016 426,613.5C 425.51,614.793 425.343,616.127 425.5,617.5C 423.379,611.435 422.046,605.102 421.5,598.5C 436.931,595.525 452.264,592.025 467.5,588C 471.152,587.501 474.818,587.335 478.5,587.5 Z"/></g>
<g><path style="opacity:1" fill="#598ac2" d="M 546.5,594.5 C 543.657,598.855 540.99,603.355 538.5,608C 534.353,609.757 530.353,611.757 526.5,614C 521.467,614.829 516.467,614.662 511.5,613.5C 510.007,612.859 509.007,611.859 508.5,610.5C 512.364,611.399 516.197,612.399 520,613.5C 522.253,613.369 524.419,612.869 526.5,612C 531.393,609.768 535.726,606.768 539.5,603C 541.698,599.977 544.031,597.144 546.5,594.5 Z"/></g>
<g><path style="opacity:1" fill="#1555f3" d="M 197.5,619.5 C 191.833,624.833 186.167,630.167 180.5,635.5C 179.609,636.11 178.609,636.443 177.5,636.5C 175.511,635.012 173.678,633.345 172,631.5C 171.184,632.823 170.017,633.489 168.5,633.5C 174.464,627.542 180.797,621.875 187.5,616.5C 188.583,616.461 189.583,616.127 190.5,615.5C 192.725,617.11 195.059,618.443 197.5,619.5 Z"/></g>
<g><path style="opacity:1" fill="#d8e9fe" d="M 204.5,614.5 C 204.389,615.117 204.056,615.617 203.5,616C 241.467,621.281 279.467,626.281 317.5,631C 328.391,631.154 339.225,631.987 350,633.5C 351.385,633.486 352.551,633.152 353.5,632.5C 365.072,641.463 376.072,651.129 386.5,661.5C 385.726,662.147 384.726,662.48 383.5,662.5C 315.555,654.383 247.888,645.383 180.5,635.5C 186.167,630.167 191.833,624.833 197.5,619.5C 199.687,617.578 202.02,615.912 204.5,614.5 Z"/></g>
<g><path style="opacity:1" fill="#d1e5fe" d="M 180.5,635.5 C 247.888,645.383 315.555,654.383 383.5,662.5C 384.726,662.48 385.726,662.147 386.5,661.5C 392.78,665.806 398.446,670.806 403.5,676.5C 403.083,677.124 402.416,677.457 401.5,677.5C 334.525,668.861 267.525,660.361 200.5,652C 189.812,650.426 179.146,648.759 168.5,647C 169.71,645.961 170.71,644.794 171.5,643.5C 173.5,641.167 175.5,638.833 177.5,636.5C 178.609,636.443 179.609,636.11 180.5,635.5 Z"/></g>
<g><path style="opacity:1" fill="#145ef5" d="M 177.5,636.5 C 175.5,638.833 173.5,641.167 171.5,643.5C 164.602,648.122 158.269,653.456 152.5,659.5C 151.833,659.833 151.167,660.167 150.5,660.5C 148.731,659.579 147.065,658.412 145.5,657C 144.207,656.51 142.873,656.343 141.5,656.5C 149.933,648.124 158.933,640.458 168.5,633.5C 170.017,633.489 171.184,632.823 172,631.5C 173.678,633.345 175.511,635.012 177.5,636.5 Z"/></g>
<g><path style="opacity:1" fill="#cae1fe" d="M 171.5,643.5 C 170.71,644.794 169.71,645.961 168.5,647C 179.146,648.759 189.812,650.426 200.5,652C 267.525,660.361 334.525,668.861 401.5,677.5C 402.416,677.457 403.083,677.124 403.5,676.5C 410.771,681.764 417.771,687.431 424.5,693.5C 423.551,694.152 422.385,694.486 421,694.5C 410.896,692.771 400.73,691.604 390.5,691C 310.966,680.898 231.633,670.398 152.5,659.5C 158.269,653.456 164.602,648.122 171.5,643.5 Z"/></g>
<g><path style="opacity:1" fill="#cce1f1" d="M 615.5,640.5 C 614.86,643.865 614.026,647.198 613,650.5C 609.363,654.105 607.03,658.438 606,663.5C 603.256,665.085 601.089,667.085 599.5,669.5C 604.847,659.74 610.181,650.074 615.5,640.5 Z"/></g>
<g><path style="opacity:1" fill="#001197" d="M 170.5,601.5 C 170.389,602.117 170.056,602.617 169.5,603C 180.161,603.5 190.828,603.667 201.5,603.5C 196.833,607.833 192.167,612.167 187.5,616.5C 180.797,621.875 174.464,627.542 168.5,633.5C 158.933,640.458 149.933,648.124 141.5,656.5C 131.179,664.822 121.179,673.489 111.5,682.5C 101.179,690.822 91.1794,699.489 81.5,708.5C 78.8333,710.5 76.1667,712.5 73.5,714.5C 62.6536,714.828 51.9869,714.494 41.5,713.5C 83.9286,675.398 126.929,638.064 170.5,601.5 Z"/></g>
<g><path style="opacity:1" fill="#021197" d="M 337.5,604.5 C 348.664,605.468 359.664,605.468 370.5,604.5C 376.5,609.5 382.5,614.5 388.5,619.5C 388.5,620.167 388.833,620.5 389.5,620.5C 409.538,638.54 429.871,656.207 450.5,673.5C 453.185,677.183 456.518,680.183 460.5,682.5C 464.847,686.845 469.514,690.845 474.5,694.5C 482.808,701.804 491.141,709.138 499.5,716.5C 489.5,717.833 479.5,719.167 469.5,720.5C 425.203,682.206 381.203,643.539 337.5,604.5 Z"/></g>
<g><path style="opacity:1" fill="#c2ddfe" d="M 152.5,659.5 C 231.633,670.398 310.966,680.898 390.5,691C 400.73,691.604 410.896,692.771 421,694.5C 422.385,694.486 423.551,694.152 424.5,693.5C 434.918,702.041 444.918,711.041 454.5,720.5C 454.265,721.097 453.765,721.43 453,721.5C 345.516,707.614 238.016,693.781 130.5,680C 131.252,679.329 131.586,678.496 131.5,677.5C 137.645,671.599 143.978,665.932 150.5,660.5C 151.167,660.167 151.833,659.833 152.5,659.5 Z"/></g>
<g><path style="opacity:1" fill="#196bf8" d="M 141.5,656.5 C 142.873,656.343 144.207,656.51 145.5,657C 147.065,658.412 148.731,659.579 150.5,660.5C 143.978,665.932 137.645,671.599 131.5,677.5C 128.124,680.878 124.457,683.878 120.5,686.5C 117.474,685.118 114.474,683.785 111.5,682.5C 121.179,673.489 131.179,664.822 141.5,656.5 Z"/></g>
<g><path style="opacity:1" fill="#b8d8fe" d="M 131.5,677.5 C 131.586,678.496 131.252,679.329 130.5,680C 238.016,693.781 345.516,707.614 453,721.5C 453.765,721.43 454.265,721.097 454.5,720.5C 460.988,725.588 467.321,730.921 473.5,736.5C 473.38,737.586 472.713,738.253 471.5,738.5C 366.185,724.86 260.852,711.36 155.5,698C 142.257,696.421 129.257,694.254 116.5,691.5C 117.3,689.427 118.633,687.76 120.5,686.5C 124.457,683.878 128.124,680.878 131.5,677.5 Z"/></g>
<g><path style="opacity:1" fill="#4585c9" d="M 597.5,670.5 C 594.032,674.141 590.698,677.974 587.5,682C 582.313,685.426 576.98,688.593 571.5,691.5C 569.824,692.183 569.157,693.517 569.5,695.5C 599.167,695.5 628.833,695.5 658.5,695.5C 628.338,696.498 598.005,696.831 567.5,696.5C 567.5,694.167 567.5,691.833 567.5,689.5C 570.5,689.833 571.833,688.5 571.5,685.5C 570.167,685.5 568.833,685.5 567.5,685.5C 567.5,684.167 567.5,682.833 567.5,681.5C 571.306,681.412 574.972,682.079 578.5,683.5C 580.904,682.992 581.571,681.825 580.5,680C 581.667,679.5 582.5,678.667 583,677.5C 587.489,680.543 589.322,679.209 588.5,673.5C 591.882,673.274 594.882,672.274 597.5,670.5 Z"/></g>
<g><path style="opacity:1" fill="#adc4e3" d="M 474.5,694.5 C 469.514,690.845 464.847,686.845 460.5,682.5C 460.56,681.957 460.893,681.624 461.5,681.5C 463.295,683.703 465.629,684.869 468.5,685C 469.878,686.713 471.545,688.047 473.5,689C 474.376,691.376 476.042,692.876 478.5,693.5C 477.311,694.429 475.978,694.762 474.5,694.5 Z"/></g>
<g><path style="opacity:1" fill="#1d76fb" d="M 111.5,682.5 C 114.474,683.785 117.474,685.118 120.5,686.5C 118.633,687.76 117.3,689.427 116.5,691.5C 111.752,693.882 107.752,697.216 104.5,701.5C 100.016,704.582 95.683,707.916 91.5,711.5C 89.4535,709.721 87.2869,708.054 85,706.5C 84.1841,707.823 83.0174,708.489 81.5,708.5C 91.1794,699.489 101.179,690.822 111.5,682.5 Z"/></g>
<g><path style="opacity:1" fill="#a5c2e9" d="M 571.5,691.5 C 571.5,691.833 571.5,692.167 571.5,692.5C 570.957,692.56 570.624,692.893 570.5,693.5C 599.826,694.5 629.159,694.833 658.5,694.5C 658.5,694.833 658.5,695.167 658.5,695.5C 628.833,695.5 599.167,695.5 569.5,695.5C 569.157,693.517 569.824,692.183 571.5,691.5 Z"/></g>
<g><path style="opacity:1" fill="#b1d4fe" d="M 116.5,691.5 C 129.257,694.254 142.257,696.421 155.5,698C 260.852,711.36 366.185,724.86 471.5,738.5C 472.713,738.253 473.38,737.586 473.5,736.5C 478.914,741.186 484.248,745.853 489.5,750.5C 479.347,751.494 469.014,751.828 458.5,751.5C 339.576,736.231 220.576,720.731 101.5,705C 102.71,703.961 103.71,702.794 104.5,701.5C 107.752,697.216 111.752,693.882 116.5,691.5 Z"/></g>
<g><path style="opacity:1" fill="#abd1fe" d="M 104.5,701.5 C 103.71,702.794 102.71,703.961 101.5,705C 220.576,720.731 339.576,736.231 458.5,751.5C 448.652,751.173 438.986,751.506 429.5,752.5C 428.508,752.328 427.842,752.662 427.5,753.5C 425.973,753.427 424.973,754.094 424.5,755.5C 423.599,756.29 422.932,757.29 422.5,758.5C 312.679,744.454 202.845,730.454 93,716.5C 91.3189,716.392 90.1522,715.725 89.5,714.5C 90.1667,713.5 90.8333,712.5 91.5,711.5C 95.683,707.916 100.016,704.582 104.5,701.5 Z"/></g>
<g><path style="opacity:1" fill="#2883fd" d="M 91.5,711.5 C 90.8333,712.5 90.1667,713.5 89.5,714.5C 84.4116,718.039 79.7449,722.039 75.5,726.5C 72.8883,727.779 70.5549,729.445 68.5,731.5C 65.6071,729.886 62.6071,728.553 59.5,727.5C 64.1667,723.167 68.8333,718.833 73.5,714.5C 76.1667,712.5 78.8333,710.5 81.5,708.5C 83.0174,708.489 84.1841,707.823 85,706.5C 87.2869,708.054 89.4535,709.721 91.5,711.5 Z"/></g>
<g><path style="opacity:1" fill="#a5cdff" d="M 89.5,714.5 C 90.1522,715.725 91.3189,716.392 93,716.5C 202.845,730.454 312.679,744.454 422.5,758.5C 422.5,762.833 422.5,767.167 422.5,771.5C 306.624,757.135 190.957,742.135 75.5,726.5C 79.7449,722.039 84.4116,718.039 89.5,714.5 Z"/></g>
<g><path style="opacity:1" fill="#9fcafe" d="M 75.5,726.5 C 190.957,742.135 306.624,757.135 422.5,771.5C 422.83,778.2 422.497,784.866 421.5,791.5C 410.37,786.458 398.703,782.792 386.5,780.5C 371.074,777.374 355.407,774.874 339.5,773C 248.111,761.802 156.778,750.135 65.5,738C 64.7476,737.329 64.4142,736.496 64.5,735.5C 65.8333,734.167 67.1667,732.833 68.5,731.5C 70.5549,729.445 72.8883,727.779 75.5,726.5 Z"/></g>
<g><path style="opacity:1" fill="#99c7fe" d="M 64.5,735.5 C 64.4142,736.496 64.7476,737.329 65.5,738C 156.778,750.135 248.111,761.802 339.5,773C 355.407,774.874 371.074,777.374 386.5,780.5C 383.833,780.5 381.167,780.5 378.5,780.5C 365.99,779.018 353.657,780.351 341.5,784.5C 339.167,785.167 336.833,785.833 334.5,786.5C 266.753,778.152 199.086,769.485 131.5,760.5C 131.672,759.508 131.338,758.842 130.5,758.5C 129.712,755.379 127.712,753.712 124.5,753.5C 124.5,752.833 124.167,752.5 123.5,752.5C 97.8333,751.833 72.1667,751.167 46.5,750.5C 52.5,745.5 58.5,740.5 64.5,735.5 Z"/></g>
<g><path style="opacity:1" fill="#3e92fe" d="M 59.5,727.5 C 62.6071,728.553 65.6071,729.886 68.5,731.5C 67.1667,732.833 65.8333,734.167 64.5,735.5C 58.5,740.5 52.5,745.5 46.5,750.5C 45.9569,750.56 45.6236,750.893 45.5,751.5C 71.4915,752.5 97.4915,752.833 123.5,752.5C 124.167,752.5 124.5,752.833 124.5,753.5C 112.495,753.333 100.495,753.5 88.5,754C 90.8333,755.667 93.1667,757.333 95.5,759C 83.6667,759.167 71.8333,759.333 60,759.5C 47.8139,759.499 35.9806,758.832 24.5,757.5C 36.1415,747.529 47.8082,737.529 59.5,727.5 Z"/></g>
<g><path style="opacity:1" fill="#63a8ff" d="M 46.5,750.5 C 72.1667,751.167 97.8333,751.833 123.5,752.5C 97.4915,752.833 71.4915,752.5 45.5,751.5C 45.6236,750.893 45.9569,750.56 46.5,750.5 Z"/></g>
<g><path style="opacity:1" fill="#75a1f9" d="M 489.5,750.5 C 490.167,750.5 490.5,750.833 490.5,751.5C 470.34,752.497 450.007,752.83 429.5,752.5C 438.986,751.506 448.652,751.173 458.5,751.5C 469.014,751.828 479.347,751.494 489.5,750.5 Z"/></g>
<g><path style="opacity:1" fill="#2156f1" d="M 490.5,751.5 C 491.043,751.56 491.376,751.893 491.5,752.5C 470.177,753.5 448.844,753.833 427.5,753.5C 427.842,752.662 428.508,752.328 429.5,752.5C 450.007,752.83 470.34,752.497 490.5,751.5 Z"/></g>
<g><path style="opacity:1" fill="#2c85fb" d="M 124.5,753.5 C 127.712,753.712 129.712,755.379 130.5,758.5C 130.5,768.5 130.5,778.5 130.5,788.5C 129.681,791.305 129.181,794.305 129,797.5C 126.815,796.072 124.815,794.405 123,792.5C 122.768,793.737 122.268,794.737 121.5,795.5C 121.828,783.655 121.495,771.988 120.5,760.5C 87.8265,760.833 55.1599,760.5 22.5,759.5C 22.8555,758.478 23.5222,757.811 24.5,757.5C 35.9806,758.832 47.8139,759.499 60,759.5C 71.8333,759.333 83.6667,759.167 95.5,759C 93.1667,757.333 90.8333,755.667 88.5,754C 100.495,753.5 112.495,753.333 124.5,753.5 Z"/></g>
<g><path style="opacity:1" fill="#0021a0" d="M 41.5,713.5 C 51.9869,714.494 62.6536,714.828 73.5,714.5C 68.8333,718.833 64.1667,723.167 59.5,727.5C 47.8082,737.529 36.1415,747.529 24.5,757.5C 23.5222,757.811 22.8555,758.478 22.5,759.5C 55.1599,760.5 87.8265,760.833 120.5,760.5C 120.5,772.5 120.5,784.5 120.5,796.5C 113.543,795.614 106.543,795.28 99.5,795.5C 99.8168,791.298 99.4834,787.298 98.5,783.5C 72.1646,783.667 45.8312,783.5 19.5,783C 14.6602,782.224 10.3269,780.391 6.5,777.5C 3.78093,773.615 1.4476,769.615 -0.5,765.5C -0.5,761.833 -0.5,758.167 -0.5,754.5C 1.23276,751.514 3.06609,748.514 5,745.5C 16.6145,733.984 28.7811,723.317 41.5,713.5 Z"/></g>
<g><path style="opacity:1" fill="#92c3fe" d="M 131.5,760.5 C 199.086,769.485 266.753,778.152 334.5,786.5C 330.039,788.564 325.706,790.898 321.5,793.5C 318.977,794.801 316.31,795.801 313.5,796.5C 252.788,789.208 192.121,781.541 131.5,773.5C 131.5,769.167 131.5,764.833 131.5,760.5 Z"/></g>
<g><path style="opacity:1" fill="#0021a0" d="M 499.5,716.5 C 507.333,723.498 515.333,730.331 523.5,737C 529.616,742.097 534.116,748.264 537,755.5C 538.22,770.25 531.72,779.416 517.5,783C 495.836,783.5 474.169,783.667 452.5,783.5C 452.5,788.833 452.5,794.167 452.5,799.5C 445.5,799.5 438.5,799.5 431.5,799.5C 431.784,797.585 431.451,795.919 430.5,794.5C 430.5,783.167 430.5,771.833 430.5,760.5C 458.508,760.833 486.508,760.5 514.5,759.5C 499.185,746.851 484.185,733.851 469.5,720.5C 479.5,719.167 489.5,717.833 499.5,716.5 Z"/></g>
<g><path style="opacity:1" fill="#2681d2" d="M -0.5,765.5 C 1.4476,769.615 3.78093,773.615 6.5,777.5C 10.3269,780.391 14.6602,782.224 19.5,783C 45.8312,783.5 72.1646,783.667 98.5,783.5C 98.3333,850.167 98.5,916.834 99,983.5C 100.128,985.345 100.628,987.345 100.5,989.5C 103.681,1003.86 111.347,1015.19 123.5,1023.5C 82.1667,1023.5 40.8333,1023.5 -0.5,1023.5C -0.5,937.5 -0.5,851.5 -0.5,765.5 Z"/></g>
<g><path style="opacity:1" fill="#8cc0fe" d="M 131.5,773.5 C 192.121,781.541 252.788,789.208 313.5,796.5C 310.202,798.485 306.869,800.485 303.5,802.5C 301.079,804.238 298.412,805.571 295.5,806.5C 240.847,799.74 186.18,793.073 131.5,786.5C 131.5,782.167 131.5,777.833 131.5,773.5 Z"/></g>
<g><path style="opacity:1" fill="#0f5af6" d="M 378.5,780.5 C 376.712,780.215 375.045,780.548 373.5,781.5C 373.709,782.086 374.043,782.586 374.5,783C 393.058,797.239 411.724,811.406 430.5,825.5C 430.5,837.5 430.5,849.5 430.5,861.5C 429.835,859.302 429.168,856.969 428.5,854.5C 398.986,831.908 369.652,809.075 340.5,786C 341.056,785.617 341.389,785.117 341.5,784.5C 353.657,780.351 365.99,779.018 378.5,780.5 Z"/></g>
<g><path style="opacity:1" fill="#0f52f3" d="M 424.5,755.5 C 426.5,757.167 428.5,758.833 430.5,760.5C 430.5,771.833 430.5,783.167 430.5,794.5C 430.5,804.833 430.5,815.167 430.5,825.5C 411.724,811.406 393.058,797.239 374.5,783C 374.043,782.586 373.709,782.086 373.5,781.5C 375.045,780.548 376.712,780.215 378.5,780.5C 381.167,780.5 383.833,780.5 386.5,780.5C 398.703,782.792 410.37,786.458 421.5,791.5C 422.497,784.866 422.83,778.2 422.5,771.5C 422.5,767.167 422.5,762.833 422.5,758.5C 422.932,757.29 423.599,756.29 424.5,755.5 Z"/></g>
<g><path style="opacity:1" fill="#1160f7" d="M 341.5,784.5 C 341.389,785.117 341.056,785.617 340.5,786C 369.652,809.075 398.986,831.908 428.5,854.5C 429.168,856.969 429.835,859.302 430.5,861.5C 430.5,863.5 430.5,865.5 430.5,867.5C 429.677,870.977 429.177,874.644 429,878.5C 394.786,851.285 360.286,824.451 325.5,798C 323.808,796.693 322.475,795.193 321.5,793.5C 325.706,790.898 330.039,788.564 334.5,786.5C 336.833,785.833 339.167,785.167 341.5,784.5 Z"/></g>
<g><path style="opacity:1" fill="#86bdfe" d="M 131.5,786.5 C 186.18,793.073 240.847,799.74 295.5,806.5C 291.228,808.774 287.228,811.441 283.5,814.5C 280.605,815.399 277.938,816.733 275.5,818.5C 227.534,812.348 179.534,806.348 131.5,800.5C 131.5,795.833 131.5,791.167 131.5,786.5 Z"/></g>
<g><path style="opacity:1" fill="#1366f9" d="M 321.5,793.5 C 322.475,795.193 323.808,796.693 325.5,798C 360.286,824.451 394.786,851.285 429,878.5C 429.177,874.644 429.677,870.977 430.5,867.5C 430.5,869.5 430.5,871.5 430.5,873.5C 430.5,884.5 430.5,895.5 430.5,906.5C 430.167,906.5 429.833,906.5 429.5,906.5C 387.177,873.018 344.677,839.685 302,806.5C 301.7,804.934 302.2,803.601 303.5,802.5C 306.869,800.485 310.202,798.485 313.5,796.5C 316.31,795.801 318.977,794.801 321.5,793.5 Z"/></g>
<g><path style="opacity:1" fill="#7db8fe" d="M 131.5,800.5 C 179.534,806.348 227.534,812.348 275.5,818.5C 272.833,820.167 270.167,821.833 267.5,823.5C 262.167,826.5 256.833,829.5 251.5,832.5C 248.299,833.931 245.299,835.597 242.5,837.5C 241.833,837.5 241.167,837.5 240.5,837.5C 204.154,832.942 167.821,828.276 131.5,823.5C 131.5,815.833 131.5,808.167 131.5,800.5 Z"/></g>
<g><path style="opacity:1" fill="#166dfa" d="M 303.5,802.5 C 302.2,803.601 301.7,804.934 302,806.5C 344.677,839.685 387.177,873.018 429.5,906.5C 429.666,913.841 429.5,921.174 429,928.5C 380.599,890.382 332.099,852.382 283.5,814.5C 287.228,811.441 291.228,808.774 295.5,806.5C 298.412,805.571 301.079,804.238 303.5,802.5 Z"/></g>
<g><path style="opacity:1" fill="#1873fb" d="M 283.5,814.5 C 332.099,852.382 380.599,890.382 429,928.5C 429.5,921.174 429.666,913.841 429.5,906.5C 429.833,906.5 430.167,906.5 430.5,906.5C 430.5,910.167 430.5,913.833 430.5,917.5C 430.831,941.006 430.498,964.339 429.5,987.5C 429.5,983.167 429.5,978.833 429.5,974.5C 429.666,966.826 429.5,959.159 429,951.5C 375.358,909.531 321.691,867.531 268,825.5C 267.536,824.906 267.369,824.239 267.5,823.5C 270.167,821.833 272.833,820.167 275.5,818.5C 277.938,816.733 280.605,815.399 283.5,814.5 Z"/></g>
<g><path style="opacity:1" fill="#73b3ff" d="M 131.5,823.5 C 167.821,828.276 204.154,832.942 240.5,837.5C 237.833,839.167 235.167,840.833 232.5,842.5C 229.397,843.686 226.397,845.02 223.5,846.5C 221.5,847.167 219.5,847.833 217.5,848.5C 189.192,844.98 160.859,841.647 132.5,838.5C 132.737,837.209 132.404,836.209 131.5,835.5C 131.5,831.5 131.5,827.5 131.5,823.5 Z"/></g>
<g><path style="opacity:1" fill="#1a79fd" d="M 267.5,823.5 C 267.369,824.239 267.536,824.906 268,825.5C 321.691,867.531 375.358,909.531 429,951.5C 429.5,959.159 429.666,966.826 429.5,974.5C 369.376,928.215 309.376,881.715 249.5,835C 250.381,834.292 251.047,833.458 251.5,832.5C 256.833,829.5 262.167,826.5 267.5,823.5 Z"/></g>
<g><path style="opacity:1" fill="#4899fe" d="M 130.5,788.5 C 130.667,807.17 130.5,825.836 130,844.5C 127.371,842.112 124.538,840.112 121.5,838.5C 121.5,824.167 121.5,809.833 121.5,795.5C 122.268,794.737 122.768,793.737 123,792.5C 124.815,794.405 126.815,796.072 129,797.5C 129.181,794.305 129.681,791.305 130.5,788.5 Z"/></g>
<g><path style="opacity:1" fill="#012da8" d="M 120.5,760.5 C 121.495,771.988 121.828,783.655 121.5,795.5C 121.5,809.833 121.5,824.167 121.5,838.5C 121.088,849.164 120.755,859.83 120.5,870.5C 113.5,870.5 106.5,870.5 99.5,870.5C 99.5,845.5 99.5,820.5 99.5,795.5C 106.543,795.28 113.543,795.614 120.5,796.5C 120.5,784.5 120.5,772.5 120.5,760.5 Z"/></g>
<g><path style="opacity:1" fill="#1d7efe" d="M 251.5,832.5 C 251.047,833.458 250.381,834.292 249.5,835C 309.376,881.715 369.376,928.215 429.5,974.5C 429.5,978.833 429.5,983.167 429.5,987.5C 429.167,987.5 428.833,987.5 428.5,987.5C 428.489,985.983 427.823,984.816 426.5,984C 364.443,936.457 302.777,888.29 241.5,839.5C 241.863,838.817 242.196,838.15 242.5,837.5C 245.299,835.597 248.299,833.931 251.5,832.5 Z"/></g>
<g><path style="opacity:1" fill="#6bafff" d="M 131.5,835.5 C 132.404,836.209 132.737,837.209 132.5,838.5C 160.859,841.647 189.192,844.98 217.5,848.5C 216.833,849.167 216.167,849.833 215.5,850.5C 212.914,851.01 210.581,852.01 208.5,853.5C 203.859,855.485 199.193,857.485 194.5,859.5C 192.5,860.167 190.5,860.833 188.5,861.5C 183.989,862.931 179.655,864.598 175.5,866.5C 172.341,867.885 169.008,868.885 165.5,869.5C 164.833,869.5 164.167,869.5 163.5,869.5C 154.013,867.768 144.346,866.268 134.5,865C 133.584,864.626 132.75,864.126 132,863.5C 131.5,854.173 131.334,844.839 131.5,835.5 Z"/></g>
<g><path style="opacity:1" fill="#002ca6" d="M 430.5,794.5 C 431.451,795.919 431.784,797.585 431.5,799.5C 438.5,799.5 445.5,799.5 452.5,799.5C 452.5,824.167 452.5,848.833 452.5,873.5C 445.167,873.5 437.833,873.5 430.5,873.5C 430.5,871.5 430.5,869.5 430.5,867.5C 430.5,865.5 430.5,863.5 430.5,861.5C 430.5,849.5 430.5,837.5 430.5,825.5C 430.5,815.167 430.5,804.833 430.5,794.5 Z"/></g>
<g><path style="opacity:1" fill="#2281fe" d="M 240.5,837.5 C 241.167,837.5 241.833,837.5 242.5,837.5C 242.196,838.15 241.863,838.817 241.5,839.5C 302.777,888.29 364.443,936.457 426.5,984C 427.823,984.816 428.489,985.983 428.5,987.5C 428.5,988.833 428.5,990.167 428.5,991.5C 427.272,992.306 426.272,993.306 425.5,994.5C 418.025,987.865 410.358,981.365 402.5,975C 345.182,931.527 288.516,887.36 232.5,842.5C 235.167,840.833 237.833,839.167 240.5,837.5 Z"/></g>
<g><path style="opacity:1" fill="#2885fe" d="M 232.5,842.5 C 288.516,887.36 345.182,931.527 402.5,975C 410.358,981.365 418.025,987.865 425.5,994.5C 423.906,997.764 421.573,1000.43 418.5,1002.5C 418.703,1000.61 418.037,999.11 416.5,998C 357.8,951.97 298.8,906.303 239.5,861C 234.643,856.749 229.643,852.749 224.5,849C 223.748,848.329 223.414,847.496 223.5,846.5C 226.397,845.02 229.397,843.686 232.5,842.5 Z"/></g>
<g><path style="opacity:1" fill="#2f89fe" d="M 223.5,846.5 C 223.414,847.496 223.748,848.329 224.5,849C 229.643,852.749 234.643,856.749 239.5,861C 298.8,906.303 357.8,951.97 416.5,998C 418.037,999.11 418.703,1000.61 418.5,1002.5C 416.117,1004.36 413.45,1005.69 410.5,1006.5C 410.67,1005.18 410.337,1004.01 409.5,1003C 345.151,953.313 280.818,903.647 216.5,854C 215.663,852.989 215.33,851.822 215.5,850.5C 216.167,849.833 216.833,849.167 217.5,848.5C 219.5,847.833 221.5,847.167 223.5,846.5 Z"/></g>
<g><path style="opacity:1" fill="#348dfe" d="M 215.5,850.5 C 215.33,851.822 215.663,852.989 216.5,854C 280.818,903.647 345.151,953.313 409.5,1003C 410.337,1004.01 410.67,1005.18 410.5,1006.5C 406.702,1007.48 402.702,1007.82 398.5,1007.5C 333.815,957.161 269.148,906.828 204.5,856.5C 206.184,855.85 207.517,854.85 208.5,853.5C 210.581,852.01 212.914,851.01 215.5,850.5 Z"/></g>
<g><path style="opacity:1" fill="#3b91ff" d="M 208.5,853.5 C 207.517,854.85 206.184,855.85 204.5,856.5C 269.148,906.828 333.815,957.161 398.5,1007.5C 393.5,1007.5 388.5,1007.5 383.5,1007.5C 320.358,958.419 257.358,909.086 194.5,859.5C 199.193,857.485 203.859,855.485 208.5,853.5 Z"/></g>
<g><path style="opacity:1" fill="#4295ff" d="M 194.5,859.5 C 257.358,909.086 320.358,958.419 383.5,1007.5C 378.5,1007.5 373.5,1007.5 368.5,1007.5C 367.091,1005.58 365.424,1003.75 363.5,1002C 303.82,956.488 244.487,910.488 185.5,864C 186.942,863.623 187.942,862.79 188.5,861.5C 190.5,860.833 192.5,860.167 194.5,859.5 Z"/></g>
<g><path style="opacity:1" fill="#4799ff" d="M 188.5,861.5 C 187.942,862.79 186.942,863.623 185.5,864C 244.487,910.488 303.82,956.488 363.5,1002C 365.424,1003.75 367.091,1005.58 368.5,1007.5C 363.833,1007.5 359.167,1007.5 354.5,1007.5C 353.04,1005.54 351.373,1003.7 349.5,1002C 290.97,957.278 232.97,912.111 175.5,866.5C 179.655,864.598 183.989,862.931 188.5,861.5 Z"/></g>
<g><path style="opacity:1" fill="#4e9dff" d="M 175.5,866.5 C 232.97,912.111 290.97,957.278 349.5,1002C 351.373,1003.7 353.04,1005.54 354.5,1007.5C 349.167,1007.5 343.833,1007.5 338.5,1007.5C 280.662,961.833 222.662,916.333 164.5,871C 165.056,870.617 165.389,870.117 165.5,869.5C 169.008,868.885 172.341,867.885 175.5,866.5 Z"/></g>
<g><path style="opacity:1" fill="#0034ab" d="M 99.5,870.5 C 106.5,870.5 113.5,870.5 120.5,870.5C 120.5,885.167 120.5,899.833 120.5,914.5C 113.5,914.5 106.5,914.5 99.5,914.5C 99.5,899.833 99.5,885.167 99.5,870.5 Z"/></g>
<g><path style="opacity:1" fill="#66acff" d="M 279.5,1006.5 C 227.387,964.712 174.72,923.712 121.5,883.5C 121.334,879.154 121.501,874.821 122,870.5C 179.863,915.704 237.696,960.871 295.5,1006C 290.177,1006.5 284.844,1006.67 279.5,1006.5 Z"/></g>
<g><path style="opacity:1" fill="#54a0ff" d="M 163.5,869.5 C 164.167,869.5 164.833,869.5 165.5,869.5C 165.389,870.117 165.056,870.617 164.5,871C 222.662,916.333 280.662,961.833 338.5,1007.5C 334.167,1007.5 329.833,1007.5 325.5,1007.5C 269.939,963.106 213.939,919.273 157.5,876C 156.663,874.989 156.33,873.822 156.5,872.5C 159.063,871.912 161.396,870.912 163.5,869.5 Z"/></g>
<g><path style="opacity:1" fill="#5aa4ff" d="M 156.5,872.5 C 156.33,873.822 156.663,874.989 157.5,876C 213.939,919.273 269.939,963.106 325.5,1007.5C 320.5,1007.5 315.5,1007.5 310.5,1007.5C 255.353,963.864 200.02,920.364 144.5,877C 148.33,875.002 152.33,873.502 156.5,872.5 Z"/></g>
<g><path style="opacity:1" fill="#0034ab" d="M 430.5,873.5 C 437.833,873.5 445.167,873.5 452.5,873.5C 452.5,888.167 452.5,902.833 452.5,917.5C 445.167,917.5 437.833,917.5 430.5,917.5C 430.5,913.833 430.5,910.167 430.5,906.5C 430.5,895.5 430.5,884.5 430.5,873.5 Z"/></g>
<g><path style="opacity:1" fill="#5ea5fc" d="M 130.5,758.5 C 131.338,758.842 131.672,759.508 131.5,760.5C 131.5,764.833 131.5,769.167 131.5,773.5C 131.5,777.833 131.5,782.167 131.5,786.5C 131.5,791.167 131.5,795.833 131.5,800.5C 131.5,808.167 131.5,815.833 131.5,823.5C 131.5,827.5 131.5,831.5 131.5,835.5C 131.334,844.839 131.5,854.173 132,863.5C 132.75,864.126 133.584,864.626 134.5,865C 144.346,866.268 154.013,867.768 163.5,869.5C 161.396,870.912 159.063,871.912 156.5,872.5C 152.33,873.502 148.33,875.002 144.5,877C 200.02,920.364 255.353,963.864 310.5,1007.5C 286.5,1007.5 262.5,1007.5 238.5,1007.5C 247.318,1006.51 256.318,1006.17 265.5,1006.5C 270.167,1006.5 274.833,1006.5 279.5,1006.5C 284.844,1006.67 290.177,1006.5 295.5,1006C 237.696,960.871 179.863,915.704 122,870.5C 121.501,874.821 121.334,879.154 121.5,883.5C 121.5,887.167 121.5,890.833 121.5,894.5C 121.5,901.833 121.5,909.167 121.5,916.5C 121.5,923.833 121.5,931.167 121.5,938.5C 121.5,942.5 121.5,946.5 121.5,950.5C 121.5,961.167 121.5,971.833 121.5,982.5C 120.503,960.006 120.169,937.339 120.5,914.5C 120.5,899.833 120.5,885.167 120.5,870.5C 120.755,859.83 121.088,849.164 121.5,838.5C 124.538,840.112 127.371,842.112 130,844.5C 130.5,825.836 130.667,807.17 130.5,788.5C 130.5,778.5 130.5,768.5 130.5,758.5 Z"/></g>
<g><path style="opacity:1" fill="#6db0ff" d="M 121.5,883.5 C 174.72,923.712 227.387,964.712 279.5,1006.5C 274.833,1006.5 270.167,1006.5 265.5,1006.5C 217.759,968.654 169.759,931.32 121.5,894.5C 121.5,890.833 121.5,887.167 121.5,883.5 Z"/></g>
<g><path style="opacity:1" fill="#76b5fe" d="M 121.5,894.5 C 169.759,931.32 217.759,968.654 265.5,1006.5C 256.318,1006.17 247.318,1006.51 238.5,1007.5C 205.996,1007.83 173.662,1007.5 141.5,1006.5C 158.833,1006.5 176.167,1006.5 193.5,1006.5C 198.833,1006.5 204.167,1006.5 209.5,1006.5C 218.839,1006.67 228.173,1006.5 237.5,1006C 198.939,975.903 160.272,946.069 121.5,916.5C 121.5,909.167 121.5,901.833 121.5,894.5 Z"/></g>
<g><path style="opacity:1" fill="#83beff" d="M 121.5,916.5 C 160.272,946.069 198.939,975.903 237.5,1006C 228.173,1006.5 218.839,1006.67 209.5,1006.5C 180.137,983.825 150.803,961.158 121.5,938.5C 121.5,931.167 121.5,923.833 121.5,916.5 Z"/></g>
<g><path style="opacity:1" fill="#8bc3ff" d="M 121.5,938.5 C 150.803,961.158 180.137,983.825 209.5,1006.5C 204.167,1006.5 198.833,1006.5 193.5,1006.5C 169.515,987.838 145.515,969.171 121.5,950.5C 121.5,946.5 121.5,942.5 121.5,938.5 Z"/></g>
<g><path style="opacity:1" fill="#0342b3" d="M 98.5,783.5 C 99.4834,787.298 99.8168,791.298 99.5,795.5C 99.5,820.5 99.5,845.5 99.5,870.5C 99.5,885.167 99.5,899.833 99.5,914.5C 106.5,914.5 113.5,914.5 120.5,914.5C 120.169,937.339 120.503,960.006 121.5,982.5C 121.5,983.5 121.5,984.5 121.5,985.5C 121.5,986.833 121.5,988.167 121.5,989.5C 114.5,989.5 107.5,989.5 100.5,989.5C 100.628,987.345 100.128,985.345 99,983.5C 98.5,916.834 98.3333,850.167 98.5,783.5 Z"/></g>
<g><path style="opacity:1" fill="#003fb2" d="M 430.5,917.5 C 437.833,917.5 445.167,917.5 452.5,917.5C 452.667,941.169 452.5,964.836 452,988.5C 451.79,990.058 451.29,991.391 450.5,992.5C 442.981,992.825 435.648,992.492 428.5,991.5C 428.5,990.167 428.5,988.833 428.5,987.5C 428.833,987.5 429.167,987.5 429.5,987.5C 430.498,964.339 430.831,941.006 430.5,917.5 Z"/></g>
<g><path style="opacity:1" fill="#95c9fe" d="M 121.5,950.5 C 145.515,969.171 169.515,987.838 193.5,1006.5C 176.167,1006.5 158.833,1006.5 141.5,1006.5C 131.427,1002.76 124.76,995.76 121.5,985.5C 121.5,984.5 121.5,983.5 121.5,982.5C 121.5,971.833 121.5,961.167 121.5,950.5 Z"/></g>
<g><path style="opacity:1" fill="#0047b6" d="M 121.5,985.5 C 124.76,995.76 131.427,1002.76 141.5,1006.5C 173.662,1007.5 205.996,1007.83 238.5,1007.5C 262.5,1007.5 286.5,1007.5 310.5,1007.5C 315.5,1007.5 320.5,1007.5 325.5,1007.5C 329.833,1007.5 334.167,1007.5 338.5,1007.5C 343.833,1007.5 349.167,1007.5 354.5,1007.5C 359.167,1007.5 363.833,1007.5 368.5,1007.5C 373.5,1007.5 378.5,1007.5 383.5,1007.5C 388.5,1007.5 393.5,1007.5 398.5,1007.5C 402.702,1007.82 406.702,1007.48 410.5,1006.5C 413.45,1005.69 416.117,1004.36 418.5,1002.5C 421.573,1000.43 423.906,997.764 425.5,994.5C 426.272,993.306 427.272,992.306 428.5,991.5C 435.648,992.492 442.981,992.825 450.5,992.5C 450.662,994.527 450.495,996.527 450,998.5C 445.162,1008.5 438.329,1016.83 429.5,1023.5C 327.5,1023.5 225.5,1023.5 123.5,1023.5C 111.347,1015.19 103.681,1003.86 100.5,989.5C 107.5,989.5 114.5,989.5 121.5,989.5C 121.5,988.167 121.5,986.833 121.5,985.5 Z"/></g>
</svg>

After

Width:  |  Height:  |  Size: 46 KiB

@ -152,6 +152,7 @@ define('TOOL_PORTFOLIO', 'portfolio');
define('TOOL_PORTFOLIO_COMMENT', 'portfolio_comment');
define('TOOL_PLAGIARISM', 'compilatio');
define('TOOL_XAPI', 'xapi');
define('TOOL_H5P', 'h5p');
// CONSTANTS defining Chamilo interface sections
define('SECTION_CAMPUS', 'mycampus');
@ -696,6 +697,7 @@ define('RESOURCE_WORK', 'work');
define('RESOURCE_SESSION_COURSE', 'session_course');
define('RESOURCE_GRADEBOOK', 'gradebook');
define('RESOURCE_XAPI_TOOL', 'xapi_tool');
define('RESOURCE_H5P_TOOL', 'h5p_tool');
define('ADD_THEMATIC_PLAN', 6);
// Max online users to show per page (whoisonline)

@ -192,9 +192,6 @@ class Tracking
/**
* Get the tables html as contents to export lp certificate pdf .
*
* @param $userId
* @param $sessionId
*
* @return array
*/
public static function getLpCertificateTablesToPdf(
@ -461,11 +458,6 @@ class Tracking
/**
* It gets table html of Lp stats used to export in pdf.
*
* @param $userId
* @param $courseInfo
* @param $sessionId
* @param $lpId
*
* @return string
*/
public static function getLpStatsContentToPdf(
@ -626,7 +618,7 @@ class Tracking
}
break;
case 'quiz':
// Get score and total time from last attempt of a exercise en lp.
// Get score and total time from last attempt of an exercise en lp.
$sql = "SELECT iid, score
FROM $tblLpItemView
WHERE
@ -1214,8 +1206,8 @@ class Tracking
$res_result_disabled = Database::query($sql);
$row_result_disabled = Database::fetch_row($res_result_disabled);
if (Database::num_rows($res_result_disabled) > 0 &&
1 === (int) $row_result_disabled[0]
if (Database::num_rows($res_result_disabled) > 0
&& 1 === (int) $row_result_disabled[0]
) {
$result_disabled_ext_all = true;
}
@ -1285,18 +1277,18 @@ class Tracking
if ($timeCourse) {
// $attemptResult = 0;
if (isset($timeCourse['learnpath_detailed']) &&
isset($timeCourse['learnpath_detailed'][$lp_id]) &&
isset($timeCourse['learnpath_detailed'][$lp_id][$my_item_id])
if (isset($timeCourse['learnpath_detailed'])
&& isset($timeCourse['learnpath_detailed'][$lp_id])
&& isset($timeCourse['learnpath_detailed'][$lp_id][$my_item_id])
) {
$attemptResult = $timeCourse['learnpath_detailed'][$lp_id][$my_item_id][$row['iv_view_count']];
}
}
if ((
learnpath::get_interactions_count_from_db($row['iv_id'], $course_id) > 0 ||
learnpath::get_objectives_count_from_db($row['iv_id'], $course_id) > 0
) &&
!$extend_all
learnpath::get_interactions_count_from_db($row['iv_id'], $course_id) > 0
|| learnpath::get_objectives_count_from_db($row['iv_id'], $course_id) > 0
)
&& !$extend_all
) {
if ($extendAttemptId == $row['iv_id']) {
// The extend button for this attempt has been clicked.
@ -1518,8 +1510,8 @@ class Tracking
$res_result_disabled = Database::query($sql);
$row_result_disabled = Database::fetch_row($res_result_disabled);
if (Database::num_rows($res_result_disabled) > 0 &&
(int) $row_result_disabled[0] === 1
if (Database::num_rows($res_result_disabled) > 0
&& (int) $row_result_disabled[0] === 1
) {
$result_disabled_ext_all = true;
}
@ -1560,10 +1552,18 @@ class Tracking
api_get_self().'?action=stats&extend_id='.$my_item_id.'&extend_attempt_id='.$row['iv_id'].$url_suffix
);
}
$lesson_status = $row['mystatus'];
$score = $row['myscore'];
$subtotal_time = $row['mytime'];
// This is necessary for fix the total time
$h5pImportEnable = api_get_plugin_setting('h5pimport', 'tool_enable');
if ($row['item_type'] === 'h5p' && 'true' === $h5pImportEnable) {
$subtotal_time = H5pImportPlugin::fixTotalTimeInLpItemView(
$row['iv_id'],
$user_id
);
}
while ($tmp_row = Database::fetch_array($result)) {
$subtotal_time += $tmp_row['mytime'];
}
@ -1606,27 +1606,28 @@ class Tracking
$sql = "SELECT iid, score
FROM $TBL_LP_ITEM_VIEW
WHERE
c_id = $course_id AND
lp_item_id = '".(int) $my_id."' AND
lp_view_id = '".(int) $my_lp_view_id."'
c_id = ".(int) $course_id." AND
lp_item_id = ".(int) $my_id." AND
lp_view_id = ".(int) $my_lp_view_id."
ORDER BY view_count DESC
LIMIT 1";
$res_score = Database::query($sql);
$row_score = Database::fetch_array($res_score);
$sql = "SELECT SUM(total_time) as total_time
$sql = "SELECT SUM(total_time) AS total_time
FROM $TBL_LP_ITEM_VIEW
WHERE
c_id = $course_id AND
lp_item_id = '".(int) $my_id."' AND
lp_view_id = '".(int) $my_lp_view_id."'";
c_id = ".(int) $course_id." AND
lp_item_id = ".(int) $my_id." AND
lp_view_id = ".(int) $my_lp_view_id;
$res_time = Database::query($sql);
$row_time = Database::fetch_array($res_time);
$score = 0;
$subtotal_time = 0;
if (Database::num_rows($res_score) > 0 &&
Database::num_rows($res_time) > 0
if (Database::num_rows($res_score) > 0
&& Database::num_rows($res_time) > 0
) {
$score = (float) $row_score['score'];
$subtotal_time = (int) $row_time['total_time'];
@ -1662,9 +1663,9 @@ class Tracking
$durationRow = Database::fetch_array($sumScoreResult, 'ASSOC');
if (!empty($durationRow['exe_duration'])) {
$exeDuration = $durationRow['exe_duration'];
if ($exeDuration != $subtotal_time &&
!empty($row_score['iid']) &&
!empty($exeDuration)
if ($exeDuration != $subtotal_time
&& !empty($row_score['iid'])
&& !empty($exeDuration)
) {
$subtotal_time = $exeDuration;
// Update c_lp_item_view.total_time
@ -1674,6 +1675,22 @@ class Tracking
}
}
break;
case 'h5p':
if ($row['item_type'] === 'h5p' && 'true' === $h5pImportEnable) {
$sql = "SELECT iid, score
FROM $TBL_LP_ITEM_VIEW
WHERE
c_id = ".(int) $course_id." AND
lp_item_id = ".(int) $my_id." AND
lp_view_id = ".(int) $my_lp_view_id."
ORDER BY view_count DESC
LIMIT 1";
$res_score = Database::query($sql);
$row_score = Database::fetch_array($res_score);
H5pImportPlugin::fixTotalTimeInLpItemView($row_score['iid'], $user_id);
}
break;
default:
$maxscore = $row['mymaxscore'];
break;
@ -1706,8 +1723,8 @@ class Tracking
} else {
$correct_test_link = '-';
$showRowspan = false;
if ($row['item_type'] === 'quiz') {
$my_url_suffix = '&course='.$courseCode.'&student_id='.$user_id.'&lp_id='.intval($row['mylpid']).'&origin='.$origin;
if ($row['item_type'] === 'quiz') {
$sql = 'SELECT * FROM '.$tbl_stats_exercices.'
WHERE
exe_exo_id="'.$row['path'].'" AND
@ -1724,9 +1741,9 @@ class Tracking
$showRowspan = false;
if ($num > 0) {
$linkId = 'link_'.$my_id;
if ($extendedAttempt == 1 &&
$lp_id == $my_lp_id &&
$lp_item_id == $my_id
if ($extendedAttempt == 1
&& $lp_id == $my_lp_id
&& $lp_item_id == $my_id
) {
$showRowspan = true;
$correct_test_link = Display::url(
@ -1751,7 +1768,41 @@ class Tracking
}
}
}
if ($row['item_type'] === 'h5p' && 'true' === $h5pImportEnable) {
$em = Database::getManager();
$cLpItemViewRepo = $em->getRepository('ChamiloPluginBundle:H5pImport\H5pImportResults');
$count = $cLpItemViewRepo->count(['user' => $user_id, 'cLpItemView' => $row['iv_id']]);
$showRowspan = false;
if ($count > 0) {
$linkId = 'link_'.$my_id;
if ($extendedAttempt == 1
&& $lp_id == $my_lp_id
&& $lp_item_id == $my_id
) {
$showRowspan = true;
$correct_test_link = Display::url(
Display::return_icon(
'view_less_stats.gif',
get_lang('HideAllAttempts')
),
api_get_self().'?action=stats'.$my_url_suffix.'&session_id='.$session_id.'&lp_item_id='.$my_id.'#'.$linkId,
['id' => $linkId]
);
} else {
$correct_test_link = Display::url(
Display::return_icon(
'view_more_stats.gif',
get_lang(
'ShowAllAttemptsByExercise'
)
),
api_get_self().'?action=stats&extend_attempt=1'.$my_url_suffix.'&session_id='.$session_id.'&lp_item_id='.$my_id.'#'.$linkId,
['id' => $linkId]
);
}
}
}
$title = Security::remove_XSS($title);
$action = null;
if ($type === 'classic') {
@ -1884,10 +1935,9 @@ class Tracking
// Attempts listing by exercise.
if ($lp_id == $my_lp_id && $lp_item_id == $my_id && $extendedAttempt) {
// Get attempts of a exercise.
if (!empty($lp_id) &&
!empty($lp_item_id) &&
'quiz' === $row['item_type']
// Get attempts of an exercise.
if (!empty($lp_id)
&& !empty($lp_item_id)
) {
$sql = "SELECT path FROM $TBL_LP_ITEM
WHERE
@ -1898,13 +1948,14 @@ class Tracking
$row_path = Database::fetch_array($res_path);
if (Database::num_rows($res_path) > 0) {
if ('quiz' === $row['item_type']) {
$sql = 'SELECT * FROM '.$tbl_stats_exercices.'
WHERE
exe_exo_id="'.(int) $row_path['path'].'" AND
exe_exo_id = '.(int) $row_path['path'].' AND
status <> "incomplete" AND
exe_user_id="'.$user_id.'" AND
orig_lp_id = "'.(int) $lp_id.'" AND
orig_lp_item_id = "'.(int) $lp_item_id.'" AND
exe_user_id='.$user_id.' AND
orig_lp_id = '.(int) $lp_id.' AND
orig_lp_item_id = '.(int) $lp_item_id.' AND
c_id = '.$course_id.' AND
session_id = '.$session_id.'
ORDER BY exe_date';
@ -1995,11 +2046,102 @@ class Tracking
$n++;
}
}
}
elseif (
'h5p' === $row['item_type']
&& 'true' === $h5pImportEnable
) {
$em = Database::getManager();
$h5pImportResultsRepo = $em
->getRepository('ChamiloPluginBundle:H5pImport\H5pImportResults');
$h5pResults = $h5pImportResultsRepo
->findBy(
[
'user' => $user_id, 'cLpItemView' => $row['iv_id'],
]
);
if (count($h5pResults) > 0) {
foreach ($h5pResults as $result) {
$timeAttempt = ' - ';
if ($result->getTotalTime()) {
$timeAttempt = gmdate('H:i:s', $result->getTotalTime());
}
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$view_score = Display::return_icon(
'invisible.png',
get_lang(
'ResultsHiddenByExerciseSetting'
)
);
} else {
// Show only float when need it
if ($result->getScore() == 0) {
$view_score = ExerciseLib::show_score(
0,
$result->getMaxScore(),
false
);
} else {
if ($result->getMaxScore() == 0) {
$view_score = $result->getScore();
} else {
$view_score = ExerciseLib::show_score(
$result->getScore(),
$result->getMaxScore(),
false
);
}
}
}
$my_lesson_status = learnpathitem::humanize_status($row['status']);
$timeRow = '<td class="lp_time" colspan="2">'.$timeAttempt.'</td>';
if ($hideTime) {
$timeRow = '';
}
$output .= '<tr class="'.$oddclass.'" >
<td></td>
<td>'.$extend_attempt_link.'</td>
<td colspan="3">'.get_lang('Attempt').' '.$n.'</td>
<td colspan="2">'.$my_lesson_status.'</td>
<td colspan="2">'.$view_score.'</td>'.$timeRow;
if ($action == 'classic') {
if ($origin != 'tracking') {
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$output .= '<td>
<img src="'.Display::returnIconPath('quiz_na.gif').'" alt="'.get_lang('ShowAttempt').'" title="'.get_lang('ShowAttempt').'">
</td>';
} else {
$output .= '<td>
<a href="../exercise/exercise_show.php?origin='.$origin.'&id='.$result->getIid().'&cidReq='.$courseCode.'" target="_parent">
<img src="'.Display::returnIconPath('quiz.png').'" alt="'.get_lang('ShowAttempt').'" title="'.get_lang('ShowAttempt').'">
</a></td>';
}
} else {
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$output .= '<td>
<img src="'.Display::returnIconPath('quiz_na.gif').'" alt="'.get_lang('ShowAndQualifyAttempt').'" title="'.get_lang('ShowAndQualifyAttempt').'"></td>';
} else {
$output .= '<td>
<a href="../exercise/exercise_show.php?cidReq='.$courseCode.'&origin=correct_exercise_in_lp&id='.$result->getIid().'" target="_parent">
<img src="'.Display::returnIconPath('quiz.gif').'" alt="'.get_lang('ShowAndQualifyAttempt').'" title="'.get_lang('ShowAndQualifyAttempt').'"></a></td>';
}
}
}
$output .= '</tr>';
$n++;
}
}
}
else {
$output .= '<tr><td colspan="12">&nbsp;</td></tr>';
}
}
}
}
}
$total_time += $time_for_total;
// QUIZZ IN LP
@ -2793,7 +2935,7 @@ class Tracking
$currentTimestamp = time();
// If the last connection is > than 7 days, the text is red
//345600 = 7 days in seconds
// 604800 = 7 days in seconds
if ($currentTimestamp - $timestamp > 604800) {
return '<span style="color: #F00;">'.api_format_date($last_login_date, $dateFormat).'</span>';
} else {
@ -2937,7 +3079,7 @@ class Tracking
$last_login_date_timestamp = api_strtotime($last_login_date);
$now = time();
// If the last connection is > than 7 days, the text is red
//345600 = 7 days in seconds
// 604800 = 7 days in seconds
if ($now - $last_login_date_timestamp > 604800) {
if ($convert_date) {
$last_login_date = api_convert_and_format_date($last_login_date, DATE_FORMAT_SHORT);
@ -3069,8 +3211,8 @@ class Tracking
$apc = apcu_cache_info(true);
$apc_end = $apc['start_time'] + $apc['ttl'];
$apc_var = api_get_configuration_value('apc_prefix').'course_access_'.$courseId.'_'.$session_id.'_'.strtotime($roundedStart).'_'.strtotime($roundedStop);
if (apcu_exists($apc_var) && (time() < $apc_end) &&
apcu_fetch($apc_var) > 0
if (apcu_exists($apc_var) && (time() < $apc_end)
&& apcu_fetch($apc_var) > 0
) {
$count = apcu_fetch($apc_var);
} else {
@ -4084,7 +4226,7 @@ class Tracking
if ($lp_with_quiz != 0) {
if (!$return_array) {
$score_of_scorm_calculate = round(($global_result / $lp_with_quiz), 2);
$score_of_scorm_calculate = round($global_result / $lp_with_quiz, 2);
if ($debug) {
var_dump($score_of_scorm_calculate);
}
@ -4301,9 +4443,9 @@ class Tracking
$durationRow = Database::fetch_array($sumScoreResult, 'ASSOC');
if (!empty($durationRow['exe_duration'])) {
$exeDuration = $durationRow['exe_duration'];
if ($exeDuration != $totalTimeInLpItemView &&
!empty($lpItemViewId) &&
!empty($exeDuration)
if ($exeDuration != $totalTimeInLpItemView
&& !empty($lpItemViewId)
&& !empty($exeDuration)
) {
// Update c_lp_item_view.total_time
$sqlUpdate = "UPDATE $lpItemViewTable SET total_time = '$exeDuration'
@ -4732,8 +4874,6 @@ class Tracking
* @param string $orderByName
* @param string $orderByDirection
* @param array $options
*
* @return mixed
*/
public static function get_sessions_coached_by_user(
$coach_id,
@ -5971,8 +6111,8 @@ class Tracking
$progress = $progress.'%';
}
$filterByCourse = isset($_GET['course']) && $course_code == $_GET['course'] &&
empty($_GET['session_id']);
$filterByCourse = isset($_GET['course']) && $course_code == $_GET['course']
&& empty($_GET['session_id']);
$url = api_get_course_url($course_code, $session_id);
$course_url = Display::url($course_title, $url, ['target' => SESSION_LINK_TARGET]);
@ -6274,9 +6414,9 @@ class Tracking
'details' => get_lang('Details'),
],
function ($column, $key) use ($trackingColumns) {
if (isset($trackingColumns['course_session']) &&
in_array($key, $trackingColumns['course_session']) &&
$trackingColumns['course_session'][$key]
if (isset($trackingColumns['course_session'])
&& in_array($key, $trackingColumns['course_session'])
&& $trackingColumns['course_session'][$key]
) {
return true;
}
@ -6409,8 +6549,8 @@ class Tracking
$last_connection = '';
}
if ($course_code == $courseCodeFromGet &&
$_GET['session_id'] == $session_id_from_get
if ($course_code == $courseCodeFromGet
&& $_GET['session_id'] == $session_id_from_get
) {
$details = Display::url(
Display::return_icon('2rightarrow_na.png', get_lang('Details')),
@ -6628,7 +6768,7 @@ class Tracking
$sum = 0;
}
$min = ($i - 1) * $part + $sum;
$max = ($i) * $part;
$max = $i * $part;
$x_axis[] = $min." - ".$max;
$count = 0;
foreach ($exercise_result as $result) {
@ -6815,7 +6955,7 @@ class Tracking
$sum = 0;
}
$min = ($i - 1) * $part + $sum;
$max = ($i) * $part;
$max = $i * $part;
$x_axis[] = $min." - ".$max;
$count = 0;
foreach ($exercise_result as $result) {
@ -6956,8 +7096,6 @@ class Tracking
/**
* @param FormValidator $form
*
* @return mixed
*/
public static function setUserSearchForm($form, $displayExtraFields = false)
{
@ -7469,6 +7607,7 @@ class Tracking
* @param string If defined and return_as_link if true, will be used as the text to be shown as the link
*
* @return string IP address (or false on error)
*
* @assert (0,0) === false
*/
public static function get_ip_from_user_event(
@ -7493,7 +7632,7 @@ class Tracking
$row_ip = Database::fetch_row($res_ip);
if ($return_as_link) {
$ip = Display::url(
(empty($body_replace) ? $row_ip[1] : $body_replace),
empty($body_replace) ? $row_ip[1] : $body_replace,
'http://www.whatsmyip.org/ip-geo-location/?ip='.$row_ip[1],
['title' => get_lang('TraceIP'), 'target' => '_blank']
);
@ -7605,11 +7744,11 @@ class Tracking
public static function isAllowToTrack($sessionId)
{
return
api_is_platform_admin(true, true) ||
SessionManager::user_is_general_coach(api_get_user_id(), $sessionId) ||
api_is_allowed_to_create_course() ||
api_is_course_tutor() ||
api_is_course_admin();
api_is_platform_admin(true, true)
|| SessionManager::user_is_general_coach(api_get_user_id(), $sessionId)
|| api_is_allowed_to_create_course()
|| api_is_course_tutor()
|| api_is_course_admin();
}
public static function getCourseLpProgress($userId, $sessionId)
@ -8400,11 +8539,6 @@ class Tracking
/**
* Get results of user in exercises by dates.
*
* @param $userId
* @param $courseId
* @param $startDate
* @param $endDate
*
* @return array
*/
public static function getUserTrackExerciseByDates(

@ -14,6 +14,7 @@ use Chamilo\CourseBundle\Entity\CLpCategory;
use Chamilo\CourseBundle\Entity\CLpItem;
use Chamilo\CourseBundle\Entity\CLpItemView;
use Chamilo\CourseBundle\Entity\CTool;
use Chamilo\PluginBundle\Entity\H5pImport\H5pImport;
use Chamilo\PluginBundle\Entity\XApi\ToolLaunch;
use Chamilo\UserBundle\Entity\User;
use ChamiloSession as Session;
@ -3665,7 +3666,7 @@ class learnpath
// then change the lp type to thread it as a normal Chamilo LP not a SCO.
if (in_array(
$lp_item_type,
['quiz', 'document', 'final_item', 'link', 'forum', 'thread', 'student_publication', 'xapi', 'survey']
['quiz', 'document', 'final_item', 'link', 'forum', 'thread', 'student_publication', 'xapi', 'h5p', 'survey']
)
) {
$lp_type = 1;
@ -6394,6 +6395,8 @@ class learnpath
$icon = Display::return_icon('flag_checkered.png');
} elseif (TOOL_XAPI === $arrLP[$i]['item_type']) {
$icon = Display::return_icon('import_scorm.png');
} elseif (TOOL_H5P) {
$icon = Display::return_icon('plugin_h5p_import.png');
} elseif (TOOL_SURVEY === $arrLP[$i]['item_type']) {
$icon = Display::return_icon('survey.gif');
} else {
@ -7764,6 +7767,17 @@ class learnpath
$items[] = $xApiPlugin->getLpResourceBlock($this->lp_id);
}
$h5pImportPlugin = H5pImportPlugin::create();
if ($h5pImportPlugin->isEnabled()) {
$headers[] = Display::return_icon(
'plugin_h5p_import_upload.png',
$h5pImportPlugin->get_lang('plugin_title'),
[],
ICON_SIZE_BIG
);
$items[] = $h5pImportPlugin->getLpResourceBlock($this->lp_id);
}
$headers[] = Display::return_icon('flag_checkered.png', get_lang('Certificate'), [], ICON_SIZE_BIG);
$items[] = $finish;
@ -13939,6 +13953,17 @@ EOD;
return api_get_path(WEB_PLUGIN_PATH).'xapi/'
.('cmi5' === $toolLaunch->getActivityType() ? 'cmi5/view.php' : 'tincan/view.php')
."?id=$id&$extraParams";
case TOOL_H5P:
if ('true' === api_get_plugin_setting('h5pimport', 'tool_enable')){
$toolLaunch = $em->find(H5pImport::class, $id);
if (empty($toolLaunch)) {
break;
}
return api_get_path(WEB_PLUGIN_PATH).'h5pimport/view.php'."?id=$id&$extraParams";
}
break;
case TOOL_SURVEY:
$table = Database::get_course_table(TABLE_SURVEY);
$sql = "SELECT code FROM $table WHERE c_id = $course_id AND survey_id =".(int) $id;

@ -266,7 +266,7 @@ class learnpathItem
error_log("get_id: ".$this->get_id());
}
if ($type !== 'sco') {
if ($type == TOOL_QUIZ || $type == TOOL_HOTPOTATOES) {
if ($type == TOOL_QUIZ || $type == TOOL_HOTPOTATOES || $type == TOOL_H5P) {
$this->get_status(
true,
true
@ -954,6 +954,7 @@ class learnpathItem
switch ($type) {
case TOOL_DOCUMENT:
case TOOL_QUIZ:
case TOOL_H5P:
case 'sco':
// Get the document and, if HTML, open it.
if (!is_file($abs_path)) {
@ -2339,7 +2340,7 @@ class learnpathItem
/** @var learnpathItem $itemToCheck */
$itemToCheck = $items[$refs_list[$prereqs_string]];
if ($itemToCheck->type === 'quiz') {
if ($itemToCheck->type === 'quiz' || $itemToCheck->type === 'h5p') {
// 1. Checking the status in current items.
$status = $itemToCheck->get_status(true);
$returnstatus = $status == $this->possible_status[2] || $status == $this->possible_status[3];
@ -2722,7 +2723,7 @@ class learnpathItem
$this->objectives_count = 0;
$this->objectives = [];
$this->lesson_location = '';
if ($this->type != TOOL_QUIZ) {
if ($this->type != TOOL_QUIZ || $this->type != TOOL_H5P) {
$this->write_to_db();
}
} else {
@ -2889,6 +2890,7 @@ class learnpathItem
break;
case TOOL_HOTPOTATOES:
break;
case TOOL_H5P:
case TOOL_QUIZ:
return false;
break;
@ -3716,7 +3718,7 @@ class learnpathItem
} else {
// Check the row exists.
// This a special case for multiple attempts and Chamilo exercises.
if ($this->type === 'quiz' &&
if (($this->type === 'quiz' || $this->type === 'h5p') &&
$this->get_prevent_reinit() == 0 &&
$this->get_status() === 'completed'
) {
@ -3819,7 +3821,7 @@ class learnpathItem
Database::update($item_view_table, $params, $where);
} else {
// For all other content types...
if ($this->type === 'quiz') {
if ($this->type === 'quiz' || $this->type === 'h5p') {
$my_status = ' ';
$total_time = ' ';
if (!empty($_REQUEST['exeId'])) {

@ -660,7 +660,7 @@ $frameReady = Display::getFrameReadyBlock(
'#content_id, #content_id_blank',
$itemType,
'function () {
var arr = ["link", "sco", "xapi", "quiz"];
var arr = ["link", "sco", "xapi", "quiz", "h5p"];
return $.inArray(olms.lms_item_type, arr) !== -1;
}'

@ -353,7 +353,7 @@ function LMSInitialize() {
xajax_start_timer();
}
if (olms.lms_item_type == 'quiz') {
if (olms.lms_item_type == 'quiz' || olms.lms_item_type == 'h5p') {
update_toc(olms.lesson_status, olms.lms_item_id);
}
@ -1208,7 +1208,7 @@ function lms_save_asset() {
olms.execute_stats = false;
}
if (olms.lms_item_type == 'quiz') {
if (olms.lms_item_type == 'quiz' || olms.lms_item_type == 'h5p') {
olms.execute_stats = true;
}

@ -0,0 +1,255 @@
<?php
// For licensing terms, see /license.txt
namespace Chamilo\PluginBundle\Entity\H5pImport;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Session;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* Class H5pImport.
*
* @ORM\Entity()
*
* @ORM\Table(name="plugin_h5p_import")
*/
class H5pImport
{
/**
* @var string
*
* @ORM\Column(name="path", type="text", nullable=false)
*/
protected $path;
/**
* @var string
*
* @ORM\Column(name="relative_path", type="text", nullable=false)
*/
protected $relativePath;
/**
* @var DateTime
*
* @Gedmo\Timestampable(on="create")
*
* @ORM\Column(name="created_at", type="datetime", nullable=false)
*/
protected $createdAt;
/**
* @var DateTime
*
* @Gedmo\Timestampable(on="update")
*
* @ORM\Column(name="modified_at", type="datetime", nullable=false)
*/
protected $modifiedAt;
/**
* @var int
*
* @ORM\Column(name="iid", type="integer")
*
* @ORM\Id
*
* @ORM\GeneratedValue
*/
private $iid;
/**
* @var Course
*
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Course")
*
* @ORM\JoinColumn(name="c_id", referencedColumnName="id", nullable=false)
*/
private $course;
/**
* @var null|Session
*
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Session")
*
* @ORM\JoinColumn(name="session_id", referencedColumnName="id")
*/
private $session;
/**
* @var null|string
*
* @ORM\Column(name="name", type="text", nullable=true)
*/
private $name;
/**
* @var null|string
*
* @ORM\Column(name="description", type="text", nullable=true)
*/
private $description;
/**
* @var Collection<int, H5pImportLibrary>
*
* @ORM\ManyToMany(targetEntity="H5pImportLibrary", mappedBy="h5pImports", cascade={"persist"})
*/
private $libraries;
/**
* @var H5pImportLibrary
*
* @ORM\ManyToOne(targetEntity="H5pImportLibrary")
*
* @ORM\JoinColumn(name="main_library_id", referencedColumnName="iid", onDelete="SET NULL")
*/
private $mainLibrary;
public function __construct()
{
$this->libraries = new ArrayCollection();
}
public function getIid(): int
{
return $this->iid;
}
public function setIid(int $iid): void
{
$this->iid = $iid;
}
public function getCourse(): Course
{
return $this->course;
}
public function setCourse(Course $course): H5pImport
{
$this->course = $course;
return $this;
}
public function getSession(): ?Session
{
return $this->session;
}
public function setSession(?Session $session): H5pImport
{
$this->session = $session;
return $this;
}
public function getName(): string
{
return $this->name;
}
public function setName(string $name): H5pImport
{
$this->name = $name;
return $this;
}
public function getPath(): string
{
return $this->path;
}
public function setPath(string $path): H5pImport
{
$this->path = $path;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): H5pImport
{
$this->description = $description;
return $this;
}
public function getRelativePath(): string
{
return $this->relativePath;
}
public function setRelativePath(string $relativePath): H5pImport
{
$this->relativePath = $relativePath;
return $this;
}
public function getCreatedAt(): DateTime
{
return $this->createdAt;
}
public function setCreatedAt(DateTime $createdAt): H5pImport
{
$this->createdAt = $createdAt;
return $this;
}
public function getModifiedAt(): DateTime
{
return $this->modifiedAt;
}
public function setModifiedAt(DateTime $modifiedAt): void
{
$this->modifiedAt = $modifiedAt;
}
public function addLibraries(H5pImportLibrary $library): self
{
$library->addH5pImport($this);
$this->libraries[] = $library;
return $this;
}
public function removeLibraries(H5pImportLibrary $library): self
{
$this->libraries->removeElement($library);
return $this;
}
public function getLibraries(): Collection
{
return $this->libraries;
}
public function setMainLibrary(H5pImportLibrary $library): self
{
$this->mainLibrary = $library;
return $this;
}
public function getMainLibrary(): ?H5pImportLibrary
{
return $this->mainLibrary;
}
}

@ -0,0 +1,383 @@
<?php
// For licensing terms, see /license.txt
namespace Chamilo\PluginBundle\Entity\H5pImport;
use Chamilo\CoreBundle\Entity\Course;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* Class H5pImportLibrary.
*
* @ORM\Entity()
*
* @ORM\Table(name="plugin_h5p_import_library")
*/
class H5pImportLibrary extends EntityRepository
{
/**
* @var \DateTime
*
* @Gedmo\Timestampable(on="create")
*
* @ORM\Column(name="created_at", type="datetime", nullable=false)
*/
protected $createdAt;
/**
* @var \DateTime
*
* @Gedmo\Timestampable(on="update")
*
* @ORM\Column(name="modified_at", type="datetime", nullable=false)
*/
protected $modifiedAt;
/**
* @var int
*
* @ORM\Column(name="iid", type="integer")
*
* @ORM\Id
*
* @ORM\GeneratedValue
*/
private $iid;
/**
* @ORM\Column(name="title", type="string", nullable=true)
*/
private $title;
/**
* @ORM\Column(name="machine_name", type="string")
*/
private $machineName;
/**
* @ORM\Column(name="major_version", type="integer")
*/
private $majorVersion;
/**
* @ORM\Column(name="minor_version", type="integer")
*/
private $minorVersion;
/**
* @ORM\Column(name="patch_version", type="integer")
*/
private $patchVersion;
/**
* @ORM\Column(name="runnable", type="integer", nullable=true)
*/
private $runnable;
/**
* @ORM\Column(name="embed_types", type="array", nullable=true)
*/
private $embedTypes;
/**
* @ORM\Column(name="preloaded_js" , type="array", nullable=true)
*/
private $preloadedJs;
/**
* @ORM\Column(name="preloaded_css", type="array", nullable=true)
*/
private $preloadedCss;
/**
* @ORM\Column(name="library_path", type="string", length=255)
*/
private $libraryPath;
/**
* @var Collection<int, H5pImport>
*
* @ORM\ManyToMany(targetEntity="H5pImport", inversedBy="libraries")
*
* @ORM\JoinTable(
* name="plugin_h5p_import_rel_libraries",
* joinColumns={@ORM\JoinColumn(name="h5p_import_library_id", referencedColumnName="iid", onDelete="CASCADE")},
* inverseJoinColumns={@ORM\JoinColumn(name="h5p_import_id", referencedColumnName="iid", onDelete="CASCADE")}
* )
*/
private $h5pImports;
/**
* @var Course
*
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Course")
*
* @ORM\JoinColumn(name="c_id", referencedColumnName="id", nullable=false)
*/
private $course;
public function __construct()
{
$this->h5pImports = new ArrayCollection();
}
public function getIid(): int
{
return $this->iid;
}
public function setIid(int $iid): H5pImportLibrary
{
$this->iid = $iid;
return $this;
}
public function getMachineName(): string
{
return $this->machineName;
}
public function setMachineName(string $machineName): H5pImportLibrary
{
$this->machineName = $machineName;
return $this;
}
public function getTitle(): string
{
return $this->title;
}
public function setTitle(string $title): H5pImportLibrary
{
$this->title = $title;
return $this;
}
public function getMajorVersion(): int
{
return $this->majorVersion;
}
public function setMajorVersion(int $majorVersion): H5pImportLibrary
{
$this->majorVersion = $majorVersion;
return $this;
}
public function getMinorVersion(): int
{
return $this->minorVersion;
}
public function setMinorVersion(int $minorVersion): H5pImportLibrary
{
$this->minorVersion = $minorVersion;
return $this;
}
public function getPatchVersion(): int
{
return $this->patchVersion;
}
public function setPatchVersion(int $patchVersion): H5pImportLibrary
{
$this->patchVersion = $patchVersion;
return $this;
}
public function getRunnable(): int
{
return $this->runnable;
}
public function setRunnable(?int $runnable): H5pImportLibrary
{
$this->runnable = $runnable;
return $this;
}
/**
* @return array
*/
public function getPreloadedJs(): ?array
{
return $this->preloadedJs;
}
public function setPreloadedJs(?array $preloadedJs): H5pImportLibrary
{
$this->preloadedJs = $preloadedJs;
return $this;
}
/**
* @return array
*/
public function getPreloadedCss(): ?array
{
return $this->preloadedCss;
}
public function setPreloadedCss(?array $preloadedCss): H5pImportLibrary
{
$this->preloadedCss = $preloadedCss;
return $this;
}
public function getEmbedTypes(): ?array
{
return $this->embedTypes;
}
public function setEmbedTypes(?array $embedTypes): H5pImportLibrary
{
$this->embedTypes = $embedTypes;
return $this;
}
public function getLibraryPath(): string
{
return $this->libraryPath;
}
public function setLibraryPath(string $libraryPath): H5pImportLibrary
{
$this->libraryPath = $libraryPath;
return $this;
}
public function addH5pImport(H5pImport $h5pImport): self
{
if (!$this->h5pImports->contains($h5pImport)) {
$this->h5pImports[] = $h5pImport;
}
return $this;
}
public function removeH5pImport(H5pImport $h5pImport): self
{
$this->h5pImports->removeElement($h5pImport);
return $this;
}
public function getH5pImports(): Collection
{
return $this->h5pImports;
}
public function getCourse(): Course
{
return $this->course;
}
public function setCourse(Course $course): self
{
$this->course = $course;
return $this;
}
public function getCreatedAt(): \DateTime
{
return $this->createdAt;
}
public function setCreatedAt(\DateTime $createdAt): H5pImportLibrary
{
$this->createdAt = $createdAt;
return $this;
}
public function getModifiedAt(): \DateTime
{
return $this->modifiedAt;
}
public function setModifiedAt(\DateTime $modifiedAt): H5pImportLibrary
{
$this->modifiedAt = $modifiedAt;
return $this;
}
public function getLibraryByMachineNameAndVersions(string $machineName, int $majorVersion, int $minorVersion)
{
if (
$this->machineName === $machineName
&& $this->majorVersion === $majorVersion
&& $this->minorVersion === $minorVersion
) {
return $this;
}
return false;
}
/**
* Get the preloaded JS array of the imported library formatted as a comma-separated string.
*
* @return string the preloaded JS array of the imported library formatted as a comma-separated string
*/
public function getPreloadedJsFormatted(): string
{
$formattedJs = [];
foreach ($this->preloadedJs as $value) {
if (is_string($value->path)) {
$formattedJs[] = $value->path;
}
}
return implode(',', $formattedJs);
}
/**
* Get the preloaded CSS array of the imported library formatted as a comma-separated string.
*
* @return string the preloaded CSS array of the imported library formatted as a comma-separated string
*/
public function getPreloadedCssFormatted(): string
{
$formattedJCss = [];
foreach ($this->preloadedCss as $value) {
if (is_string($value->path)) {
$formattedJCss[] = $value->path;
}
}
return implode(',', $formattedJCss);
}
/**
* Get the embed types array formatted as a comma-separated string.
*
* @return string the embed types array formatted as a comma-separated string
*/
public function getEmbedTypesFormatted(): string
{
return implode(',', $this->getEmbedTypes());
}
}

@ -0,0 +1,267 @@
<?php
namespace Chamilo\PluginBundle\Entity\H5pImport;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CourseBundle\Entity\CLpItemView;
use Chamilo\UserBundle\Entity\User;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* Class H5pImportResults.
*
* @ORM\Entity()
*
* @ORM\Table(name="plugin_h5p_import_results")
*/
class H5pImportResults
{
/**
* @var int
*
* @ORM\Column(name="start_time", type="integer", nullable=false)
*/
protected $startTime;
/**
* @var int
*
* @ORM\Column(name="total_time", type="integer", nullable=false)
*/
protected $totalTime;
/**
* @var int
*
* @ORM\Column(name="iid", type="integer")
*
* @ORM\Id
*
* @ORM\GeneratedValue
*/
private $iid;
/**
* @var int
*
* @ORM\Column(name="score", type="integer")
*/
private $score;
/**
* @var int
*
* @ORM\Column(name="max_score", type="integer")
*/
private $maxScore;
/**
* @var Course
*
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Course")
*
* @ORM\JoinColumn(name="c_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
*/
private $course;
/**
* @var null|Session
*
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Session")
*
* @ORM\JoinColumn(name="session_id", referencedColumnName="id")
*/
private $session;
/**
* @var H5pImport
*
* @ORM\ManyToOne(targetEntity="Chamilo\PluginBundle\Entity\H5pImport\H5pImport")
*
* @ORM\JoinColumn(name="plugin_h5p_import_id", referencedColumnName="iid", nullable=false, onDelete="CASCADE")
*/
private $h5pImport;
/**
* @var User
*
* @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User")
*
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
*/
private $user;
/**
* @var CLpItemView
*
* @ORM\ManyToOne(targetEntity="Chamilo\CourseBundle\Entity\CLpItemView")
*
* @ORM\JoinColumn(name="c_lp_item_view_id", referencedColumnName="iid", nullable=true, onDelete="CASCADE")
*/
private $cLpItemView;
/**
* @var \DateTime
*
* @Gedmo\Timestampable(on="create")
*
* @ORM\Column(name="created_at", type="datetime", nullable=false)
*/
private $createdAt;
/**
* @var \DateTime
*
* @Gedmo\Timestampable(on="update")
*
* @ORM\Column(name="modified_at", type="datetime", nullable=false)
*/
private $modifiedAt;
public function getIid(): int
{
return $this->iid;
}
public function setIid(int $iid): H5pImportResults
{
$this->iid = $iid;
return $this;
}
public function getScore(): int
{
return $this->score;
}
public function setScore(int $score): H5pImportResults
{
$this->score = $score;
return $this;
}
public function getMaxScore(): int
{
return $this->maxScore;
}
public function setMaxScore(int $maxScore): H5pImportResults
{
$this->maxScore = $maxScore;
return $this;
}
public function getCourse(): Course
{
return $this->course;
}
public function setCourse(Course $course): H5pImportResults
{
$this->course = $course;
return $this;
}
public function getSession(): ?Session
{
return $this->session;
}
public function setSession(?Session $session): H5pImportResults
{
$this->session = $session;
return $this;
}
public function getH5pImport(): H5pImport
{
return $this->h5pImport;
}
public function setH5pImport(H5pImport $h5pImport): H5pImportResults
{
$this->h5pImport = $h5pImport;
return $this;
}
public function getUser(): User
{
return $this->user;
}
public function setUser(User $user): H5pImportResults
{
$this->user = $user;
return $this;
}
public function getCreatedAt(): \DateTime
{
return $this->createdAt;
}
public function getCLpItemView(): CLpItemView
{
return $this->cLpItemView;
}
public function setCLpItemView(CLpItemView $cLpItemView): H5pImportResults
{
$this->cLpItemView = $cLpItemView;
return $this;
}
public function getStartTime(): int
{
return $this->startTime;
}
public function setStartTime(int $startTime): H5pImportResults
{
$this->startTime = $startTime;
return $this;
}
public function getTotalTime(): int
{
return $this->totalTime;
}
public function setTotalTime(int $totalTime): H5pImportResults
{
$this->totalTime = $totalTime;
return $this;
}
public function setCreatedAt(\DateTime $createdAt): H5pImportResults
{
$this->createdAt = $createdAt;
return $this;
}
public function getModifiedAt(): \DateTime
{
return $this->modifiedAt;
}
public function setModifiedAt(\DateTime $modifiedAt): H5pImportResults
{
$this->modifiedAt = $modifiedAt;
return $this;
}
}

@ -0,0 +1,307 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\PluginBundle\Entity\H5pImport\H5pImport;
use Chamilo\PluginBundle\Entity\H5pImport\H5pImportLibrary;
use Chamilo\PluginBundle\Entity\H5pImport\H5pImportResults;
use Doctrine\ORM\Tools\SchemaTool;
use Doctrine\ORM\Tools\ToolsException;
use Symfony\Component\Filesystem\Filesystem;
/**
* Define the H5pImportPlugin class as an extension of Plugin
* install/uninstall the plugin.
*/
class H5pImportPlugin extends Plugin
{
public const TBL_H5P_IMPORT = 'plugin_h5p_import';
public const TBL_H5P_IMPORT_LIBRARY = 'plugin_h5p_import_library';
public const TBL_H5P_IMPORT_RESULTS = 'plugin_h5p_import_results';
protected function __construct()
{
$settings = [
'tool_enable' => 'boolean',
'frame' => 'boolean',
'embed' => 'boolean',
'copyright' => 'boolean',
'icon' => 'boolean',
];
parent::__construct(
'0.1',
'Borja Sanchez',
$settings
);
}
public static function create(): ?H5pImportPlugin
{
static $result = null;
return $result ? $result : $result = new self();
}
/**
* Updates and returns the total duration in the view of an H5P learning path item in a course.
*
* @param int $lpItemId The ID of the learning path item
* @param int $userId The user ID
*
* @return int The updated total duration in the learning path item view
*/
public static function fixTotalTimeInLpItemView(
int $lpItemId,
int $userId
): int {
$lpItemViewTable = Database::get_course_table(TABLE_LP_ITEM_VIEW);
$sql = "SELECT iid, score
FROM $lpItemViewTable
WHERE
iid = $lpItemId
ORDER BY view_count DESC
LIMIT 1";
$responseItemView = Database::query($sql);
$lpItemView = Database::fetch_array($responseItemView);
// Get the total execution duration of the user in the learning path item view
$sql = 'SELECT SUM(total_time) AS exe_duration
FROM plugin_h5p_import_results
WHERE
user_id = '.$userId.' AND
c_lp_item_view_id = '.$lpItemView['iid'].
' ORDER BY total_time DESC';
$sumScoreResult = Database::query($sql);
$durationRow = Database::fetch_array($sumScoreResult, 'ASSOC');
if (!empty($durationRow['exe_duration'])) {
// Update the total duration in the learning path item view
$sqlUpdate = 'UPDATE '.$lpItemViewTable.'
SET total_time = '.$durationRow['exe_duration'].'
WHERE iid = '.$lpItemView['iid'];
Database::query($sqlUpdate);
return (int) $durationRow['exe_duration'];
} else {
// Update c_lp_item_view status
$sqlUpdate = 'UPDATE '.$lpItemViewTable.'
SET status = "not attempted",
total_time = 0
WHERE iid = '.$lpItemView['iid'];
Database::query($sqlUpdate);
return 0;
}
}
public function getToolTitle(): string
{
$title = $this->get_lang('plugin_title');
if (!empty($title)) {
return $title;
}
return $this->get_title();
}
/**
* @throws ToolsException
*/
public function install()
{
$em = Database::getManager();
if ($em->getConnection()
->getSchemaManager()
->tablesExist(
[
self::TBL_H5P_IMPORT,
self::TBL_H5P_IMPORT_LIBRARY,
self::TBL_H5P_IMPORT_RESULTS,
]
)
) {
return;
}
$schemaTool = new SchemaTool($em);
$schemaTool->createSchema(
[
$em->getClassMetadata(H5pImport::class),
$em->getClassMetadata(H5pImportLibrary::class),
$em->getClassMetadata(H5pImportResults::class),
]
);
$this->addCourseTools();
}
public function addCourseTool(int $courseId)
{
// The $link param is set to "../plugin" as a hack to link correctly to the plugin URL in course tool.
// Otherwise, the link en the course tool will link to "/main/" URL.
$this->createLinkToCourseTool(
$this->get_lang('plugin_title'),
$courseId,
'plugin_h5p_import.png',
'../plugin/h5pimport/start.php',
0,
'authoring'
);
}
public function uninstall()
{
$em = Database::getManager();
if (!$em->getConnection()
->getSchemaManager()
->tablesExist(
[
self::TBL_H5P_IMPORT,
self::TBL_H5P_IMPORT_LIBRARY,
self::TBL_H5P_IMPORT_RESULTS,
]
)
) {
return;
}
$schemaTool = new SchemaTool($em);
$schemaTool->dropSchema(
[
$em->getClassMetadata(H5pImport::class),
$em->getClassMetadata(H5pImportLibrary::class),
$em->getClassMetadata(H5pImportResults::class),
]
);
$this->deleteCourseToolLinks();
$this->removeH5pDirectories();
}
/**
* Perform actions after configuring the H5P import plugin.
*
* @return H5pImportPlugin The H5P import plugin instance.
*/
public function performActionsAfterConfigure(): H5pImportPlugin
{
$this->deleteCourseToolLinks();
if ('true' === $this->get('tool_enable')) {
$this->addCourseTools();
}
return $this;
}
/**
* Get the view URL for an H5P import.
*
* @param H5pImport $h5pImport The H5P import object.
*
* @return string The view URL for the H5P import.
*/
public function getViewUrl(H5pImport $h5pImport): string
{
return api_get_path(WEB_PLUGIN_PATH).'h5pimport/view.php?id='.$h5pImport->getIid().'&'.api_get_cidreq();
}
/**
* Generates the LP resource block for H5P imports.
*
* @param int $lpId The LP ID.
*
* @return string The HTML for the LP resource block.
*/
public function getLpResourceBlock(int $lpId): string
{
$cidReq = api_get_cidreq(true, true, 'lp');
$webPath = api_get_path(WEB_PLUGIN_PATH).'h5pimport/';
$course = api_get_course_entity();
$session = api_get_session_entity();
$tools = Database::getManager()
->getRepository(H5pImport::class)
->findBy(['course' => $course, 'session' => $session]);
$importIcon = Display::return_icon('plugin_h5p_import_upload.png');
$moveIcon = Display::url(
Display::return_icon('move_everywhere.png', get_lang('Move'), [], ICON_SIZE_TINY),
'#',
['class' => 'moved']
);
$return = '<ul class="lp_resource">';
$return .= '<li class="lp_resource_element">';
$return .= $importIcon;
$return .= Display::url(
get_lang('Import'),
$webPath."start.php?action=add&$cidReq&".http_build_query(['lp_id' => $lpId])
);
$return .= '</li>';
/** @var H5pImport $tool */
foreach ($tools as $tool) {
$toolAnchor = Display::url(
Security::remove_XSS($tool->getName()),
api_get_self()."?$cidReq&"
.http_build_query(
['action' => 'add_item', 'type' => TOOL_H5P, 'file' => $tool->getIid(), 'lp_id' => $lpId]
),
['class' => 'moved']
);
$return .= Display::tag(
'li',
$moveIcon.$importIcon.$toolAnchor,
[
'class' => 'lp_resource_element',
'data_id' => $tool->getIid(),
'data_type' => TOOL_H5P,
'title' => $tool->getName(),
]
);
}
$return .= '</ul>';
return $return;
}
/**
* Add course tools for all courses.
*/
private function addCourseTools(): void
{
$courses = Database::getManager()
->createQuery('SELECT c.id FROM ChamiloCoreBundle:Course c')
->getResult();
foreach ($courses as $course) {
$this->addCourseTool($course['id']);
}
}
private function deleteCourseToolLinks()
{
Database::getManager()
->createQuery('DELETE FROM ChamiloCourseBundle:CTool t WHERE t.category = :category AND t.link LIKE :link')
->execute(['category' => 'authoring', 'link' => '../plugin/h5pimport/start.php%']);
}
/**
* Removes H5P directories for all courses.
*/
private function removeH5pDirectories(): void
{
$fs = new Filesystem();
$table = Database::get_main_table(TABLE_MAIN_COURSE);
$sql = "SELECT id FROM $table ORDER BY id";
$res = Database::query($sql);
while ($row = Database::fetch_assoc($res)) {
$courseInfo = api_get_course_info_by_id($row['id']);
$fs->remove($courseInfo['course_sys_path'].'/h5p');
}
}
}

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

@ -0,0 +1,26 @@
# H5P Import Plugin for Chamilo
## Overview
This plugin enables the loading and display of H5P packages within the Chamilo Learning Management System (LMS). With this plugin, users can import and view interactive H5P content seamlessly within Chamilo courses.
Please note that this plugin is currently in beta phase and may have some limitations or bugs. Feedback and bug reports are welcome to help improve the plugin.
## Requirements
- The 'h5p/h5p-php-library' library is required. It is already included in the composer.json file, so no additional steps are needed to install it.
## Installation
1. Update the Chamilo library and namespace by running `composer update` within the Chamilo root directory.
2. Add the plugin to your Chamilo installation's `main/admin/settings.php?category=Plugins` url.
3. If the namespace has not been updated, run`composer dump-autoload`.
## Configuration
1. Activate the plugin in the Chamilo administration panel.
2. Configure the plugin options. The only required option is to enable the plugin. The remaining options are optional and can be customized based on your needs.
## Usage
1. Once the plugin is activated and configured, users will be able to import and display H5P packages within Chamilo courses.
2. Inside a course, select the H5P Import tool to add H5P content to the course.
3. Users can interact with the H5P content directly within the course interface.
## Support and Feedback
For any issues, questions, or feedback, please create an issue on the Chamilo-lms's GitHub repository.

@ -0,0 +1,5 @@
<?php
// For licensing terms, see /license.txt
require_once __DIR__.'/../../main/inc/global.inc.php';

@ -0,0 +1,8 @@
<?php
// For license terms, see /license.txt
if (!api_is_platform_admin()) {
exit('You must have admin permissions to install plugins');
}
H5pImportPlugin::create()->install();

@ -0,0 +1,23 @@
<?php
$strings['plugin_title'] = "H5P import";
$strings['plugin_comment'] = "Import H5P contents and use it in learnpaths. Open README.md for installation instructions.";
$strings['tool_enable'] = "Enable plugin";
$strings['frame'] = "Frame";
$strings['frame_help'] = "Show frame and buttons below H5P";
$strings['embed'] = "Embed";
$strings['embed_help'] = "Display embed button";
$strings['copyright'] = "Copyright";
$strings['copyright_help'] = "Display copyright button";
$strings['icon'] = "Icon";
$strings['icon_help'] = "Display H5P icon";
$strings['attempts'] = "Number of attempts";
$strings['upload_h5p'] = "Upload";
$strings['import_h5p_package'] = "Upload H5P package";
$strings['h5p_package'] = "H5P package";
$strings['h5p_error_loading'] = "Error loading the H5P package";
$strings['h5p_error_invalid_token'] = "Invalid security token";
$strings['h5p_error_missing_core_asset'] = "Error loading H5P core assets";
$strings['h5p_save_content_state'] = "Save user results";
$strings['h5p_save_content_freq'] = "Save frequency";
$strings['h5p_save_freq_help'] = "How often current content state should be saved, in seconds";
$strings['start_attempt'] = "Start attempt";

@ -0,0 +1,23 @@
<?php
$strings['plugin_title'] = "H5P import";
$strings['plugin_comment'] = "Ce plugin permet d'importer des contenus H5P. Ouvrez le fichier README.md pour des instructions d'installation.";
$strings['tool_enable'] = "Activer le plugin";
$strings['frame'] = "Frame";
$strings['frame_help'] = "Afficher le cadre et les boutons en dessous de H5P";
$strings['embed'] = "Incorporer";
$strings['embed_help'] = "Afficher le bouton d\'incorporation";
$strings['copyright'] = "Droits d\'auteur";
$strings['copyright_help'] = "Afficher le bouton de droits d\'auteur";
$strings['icon'] = "Icône";
$strings['icon_help'] = "Afficher l\'icône H5P";
$strings['attempts'] = "Number of attempts";
$strings['import_h5p_package'] = "Importer un package H5P";
$strings['upload_h5p'] = "Importer";
$strings['h5p_package'] = "Package H5P";
$strings['h5p_error_loading'] = "Error loading the H5P package";
$strings['h5p_error_missing_core_asset'] = "Error loading H5P core assets";
$strings['h5p_error_invalid_token'] = "Invalid security token";
$strings['h5p_save_content_state'] = "Enregistrer les résultats de l'utilisateur";
$strings['h5p_save_content_freq'] = "Fréquence d'enregistrement";
$strings['h5p_save_freq_help'] = "À quelle fréquence l'état actuel du contenu doit être enregistré, en secondes";
$strings['start_attempt'] = "Commencer la tentative";

@ -0,0 +1,23 @@
<?php
$strings['plugin_title'] = "H5P import";
$strings['plugin_comment'] = "Este plugin permite importar paquetes en formato H5P e insertarlos como elementos en una lección. Abra el README.md para instrucciones de instalación.";
$strings['tool_enable'] = "Activar plugin";
$strings['frame'] = "Frame";
$strings['frame_help'] = "Mostrar marco y botones debajo de H5P";
$strings['embed'] = "Insertar";
$strings['embed_help'] = "Mostrar botón de inserción";
$strings['copyright'] = "Derechos de autor";
$strings['copyright_help'] = "Mostrar botón de derechos de autor";
$strings['icon'] = "Icono";
$strings['icon_help'] = "Mostrar icono de H5P";
$strings['attempts'] = "Número de intentos";
$strings['import_h5p_package'] = "Subir paquete H5P";
$strings['upload_h5p'] = "Subir";
$strings['h5p_package'] = "Paquete H5P";
$strings['h5p_error_loading'] = "Error cargando el paquete H5P";
$strings['h5p_error_missing_core_asset'] = "Error cargando dependencias H5P";
$strings['h5p_error_invalid_token'] = "Token no valido";
$strings['h5p_save_content_state'] = "Guardar resultados del usuario";
$strings['h5p_save_content_freq'] = "Frecuencia guardado";
$strings['h5p_save_freq_help'] = "Con qué frecuencia se debe guardar el estado actual del contenido, en segundos";
$strings['start_attempt'] = "Comenzar intento";

@ -0,0 +1,5 @@
<?php
// For license terms, see /license.txt
$plugin_info = H5pImportPlugin::create()->get_info();

@ -0,0 +1,375 @@
<?php
// For licensing terms, see /license.txt
namespace Chamilo\PluginBundle\H5pImport\H5pImporter;
use Chamilo\PluginBundle\Entity\H5pImport\H5pImport;
use Chamilo\PluginBundle\Entity\H5pImport\H5pImportLibrary;
class H5pImplementation implements \H5PFrameworkInterface
{
private $h5pImport;
private $h5pImportLibraries;
public function __construct(H5pImport $h5pImport)
{
$this->h5pImport = $h5pImport;
$this->h5pImportLibraries = $h5pImport->getLibraries();
}
public function getPlatformInfo()
{
// TODO: Implement getPlatformInfo() method.
}
public function fetchExternalData($url, $data = null, $blocking = true, $stream = null)
{
// TODO: Implement fetchExternalData() method.
}
public function setLibraryTutorialUrl($machineName, $tutorialUrl)
{
// TODO: Implement setLibraryTutorialUrl() method.
}
public function setErrorMessage($message, $code = null)
{
// TODO: Implement setErrorMessage() method.
}
public function setInfoMessage($message)
{
// TODO: Implement setInfoMessage() method.
}
public function getMessages($type)
{
// TODO: Implement getMessages() method.
}
public function t($message, $replacements = [])
{
return get_lang($message);
}
public function getLibraryFileUrl($libraryFolderName, $fileName)
{
// TODO: Implement getLibraryFileUrl() method.
}
public function getUploadedH5pFolderPath()
{
// TODO: Implement getUploadedH5pFolderPath() method.
}
public function getUploadedH5pPath()
{
// TODO: Implement getUploadedH5pPath() method.
}
public function loadAddons()
{
$addons = [];
$sql = "
SELECT l1.machine_name, l1.major_version, l1.minor_version, l1.patch_version,
l1.iid, l1.preloaded_js, l1.preloaded_css
FROM plugin_h5p_import_library AS l1
LEFT JOIN plugin_h5p_import_library AS l2
ON l1.machine_name = l2.machine_name AND
(l1.major_version < l2.major_version OR
(l1.major_version = l2.major_version AND
l1.minor_version < l2.minor_version))
WHERE l2.machine_name IS null
";
$result = \Database::query($sql);
while ($row = \Database::fetch_array($result)) {
$addons[] = \H5PCore::snakeToCamel($row);
}
return $addons;
}
public function getLibraryConfig($libraries = null)
{
// TODO: Implement getLibraryConfig() method.
}
public function loadLibraries()
{
// TODO: Implement loadLibraries() method.
}
public function getAdminUrl()
{
// TODO: Implement getAdminUrl() method.
}
public function getLibraryId($machineName, $majorVersion = null, $minorVersion = null)
{
// TODO: Implement getLibraryId() method.
}
public function getWhitelist($isLibrary, $defaultContentWhitelist, $defaultLibraryWhitelist)
{
// TODO: Implement getWhitelist() method.
}
public function isPatchedLibrary($library)
{
// TODO: Implement isPatchedLibrary() method.
}
public function isInDevMode()
{
// TODO: Implement isInDevMode() method.
}
public function mayUpdateLibraries()
{
// TODO: Implement mayUpdateLibraries() method.
}
public function saveLibraryData(&$libraryData, $new = true)
{
// TODO: Implement saveLibraryData() method.
}
public function insertContent($content, $contentMainId = null)
{
// TODO: Implement insertContent() method.
}
public function updateContent($content, $contentMainId = null)
{
// TODO: Implement updateContent() method.
}
public function resetContentUserData($contentId)
{
// TODO: Implement resetContentUserData() method.
}
public function saveLibraryDependencies($libraryId, $dependencies, $dependency_type)
{
// TODO: Implement saveLibraryDependencies() method.
}
public function copyLibraryUsage($contentId, $copyFromId, $contentMainId = null)
{
// TODO: Implement copyLibraryUsage() method.
}
public function deleteContentData($contentId)
{
// TODO: Implement deleteContentData() method.
}
public function deleteLibraryUsage($contentId)
{
// TODO: Implement deleteLibraryUsage() method.
}
public function saveLibraryUsage($contentId, $librariesInUse)
{
// TODO: Implement saveLibraryUsage() method.
}
public function getLibraryUsage($libraryId, $skipContent = false)
{
// TODO: Implement getLibraryUsage() method.
}
public function loadLibrary($machineName, $majorVersion, $minorVersion)
{
if ($this->h5pImportLibraries) {
$foundLibrary = $this->h5pImportLibraries->filter(
function (H5pImportLibrary $library) use ($machineName, $majorVersion, $minorVersion) {
return $library->getLibraryByMachineNameAndVersions($machineName, $majorVersion, $minorVersion);
}
)->first();
if ($foundLibrary) {
return [
'libraryId' => $foundLibrary->getIid(),
'title' => $foundLibrary->getTitle(),
'machineName' => $foundLibrary->getMachineName(),
'majorVersion' => $foundLibrary->getMajorVersion(),
'minorVersion' => $foundLibrary->getMinorVersion(),
'patchVersion' => $foundLibrary->getPatchVersion(),
'runnable' => $foundLibrary->getRunnable(),
'preloadedJs' => $foundLibrary->getPreloadedJsFormatted(),
'preloadedCss' => $foundLibrary->getPreloadedCssFormatted(),
];
}
}
return false;
}
public function loadLibrarySemantics($machineName, $majorVersion, $minorVersion)
{
// TODO: Implement loadLibrarySemantics() method.
}
public function alterLibrarySemantics(&$semantics, $machineName, $majorVersion, $minorVersion)
{
// TODO: Implement alterLibrarySemantics() method.
}
public function deleteLibraryDependencies($libraryId)
{
// TODO: Implement deleteLibraryDependencies() method.
}
public function lockDependencyStorage()
{
// TODO: Implement lockDependencyStorage() method.
}
public function unlockDependencyStorage()
{
// TODO: Implement unlockDependencyStorage() method.
}
public function deleteLibrary($library)
{
// TODO: Implement deleteLibrary() method.
}
public function loadContent($id): array
{
$contentJson = H5pPackageTools::getJson($this->h5pImport->getPath().'/content.json');
$h5pJson = H5pPackageTools::getJson($this->h5pImport->getPath().'/h5p.json');
if ($contentJson && $h5pJson) {
$params = json_encode($contentJson);
$embedType = implode(',', $h5pJson->embedTypes);
$title = $this->h5pImport->getName();
$language = $h5pJson->language;
$libraryId = $this->h5pImport->getMainLibrary()->getIid();
$libraryName = $this->h5pImport->getMainLibrary()->getMachineName();
$libraryMajorVersion = $this->h5pImport->getMainLibrary()->getMajorVersion();
$libraryMinorVersion = $this->h5pImport->getMainLibrary()->getMinorVersion();
$libraryEmbedTypes = $this->h5pImport->getMainLibrary()->getEmbedTypesFormatted();
// Create the associative array with the loaded content information. Use the unique folder name as id.
return [
'contentId' => basename($this->h5pImport->getPath()),
'params' => $params,
'embedType' => $embedType,
'title' => $title,
'language' => $language,
'libraryId' => $libraryId,
'libraryName' => $libraryName,
'libraryMajorVersion' => $libraryMajorVersion,
'libraryMinorVersion' => $libraryMinorVersion,
'libraryEmbedTypes' => $libraryEmbedTypes,
'libraryFullscreen' => 0,
];
}
return [];
}
public function loadContentDependencies($id, $type = null): array
{
$h5pImportLibraries = $this->h5pImportLibraries;
$dependencies = [];
/** @var H5pImportLibrary|null $library */
foreach ($h5pImportLibraries as $library) {
$dependencies[] = [
'libraryId' => $library->getIid(),
'machineName' => $library->getMachineName(),
'majorVersion' => $library->getMajorVersion(),
'minorVersion' => $library->getMinorVersion(),
'patchVersion' => $library->getPatchVersion(),
'preloadedJs' => $library->getPreloadedJsFormatted(),
'preloadedCss' => $library->getPreloadedCssFormatted(),
];
}
return $dependencies;
}
public function getOption($name, $default = null)
{
return api_get_course_plugin_setting('h5pimport', $name);
}
public function setOption($name, $value)
{
// TODO: Implement setOption() method.
}
public function updateContentFields($id, $fields)
{
// TODO: Implement updateContentFields() method.
}
public function clearFilteredParameters($library_ids)
{
// TODO: Implement clearFilteredParameters() method.
}
public function getNumNotFiltered()
{
// TODO: Implement getNumNotFiltered() method.
}
public function getNumContent($libraryId, $skip = null)
{
// TODO: Implement getNumContent() method.
}
public function isContentSlugAvailable($slug)
{
return true;
}
public function getLibraryStats($type)
{
// TODO: Implement getLibraryStats() method.
}
public function getNumAuthors()
{
// TODO: Implement getNumAuthors() method.
}
public function saveCachedAssets($key, $libraries)
{
// TODO: Implement saveCachedAssets() method.
}
public function deleteCachedAssets($library_id)
{
// TODO: Implement deleteCachedAssets() method.
}
public function getLibraryContentCount()
{
// TODO: Implement getLibraryContentCount() method.
}
public function afterExportCreated($content, $filename)
{
// TODO: Implement afterExportCreated() method.
}
public function hasPermission($permission, $id = null)
{
// TODO: Implement hasPermission() method.
}
public function replaceContentTypeCache($contentTypeCache)
{
// TODO: Implement replaceContentTypeCache() method.
}
public function libraryHasUpgrade($library)
{
// TODO: Implement libraryHasUpgrade() method.
}
}

@ -0,0 +1,78 @@
<?php
// For licensing terms, see /license.txt
namespace Chamilo\PluginBundle\H5pImport\H5pImporter;
use Chamilo\CoreBundle\Entity\Course;
/**
* Class H5pPackageImporter.
*/
abstract class H5pPackageImporter
{
/**
* @var Course
*/
protected $course;
/**
* Path to course directory.
*
* @var string
*/
protected $courseDirectoryPath;
/**
* @var array
*/
protected $packageFileInfo;
/**
* The package type is usually a MIME type.
*
* @var string
*/
protected $packageType;
protected $h5pJsonContent;
/**
* H5pPackageImporter constructor.
*/
protected function __construct(array $fileInfo, Course $course)
{
$this->packageFileInfo = $fileInfo;
$this->course = $course;
$this->courseDirectoryPath = api_get_path(SYS_COURSE_PATH).$this->course->getDirectory();
$this->packageType = $fileInfo['type'];
}
/**
* @throws \Exception
*/
public static function create(array $fileInfo, Course $course): ZipPackageImporter
{
if (
'application/octet-stream' !== $fileInfo['type']
&& 'h5p' !== pathinfo($fileInfo['name'], PATHINFO_EXTENSION)
) {
throw new \Exception('Not a H5P package');
}
return new ZipPackageImporter($fileInfo, $course);
}
/**
* Check the package and unzip it, checking if it has the 'h5p.json' file or some php script.
*
* @return mixed
*
* @throws \Exception
*/
abstract public function import(): string;
public function getPackageType(): string
{
return $this->packageType;
}
}

@ -0,0 +1,327 @@
<?php
// For licensing terms, see /license.txt
namespace Chamilo\PluginBundle\H5pImport\H5pImporter;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\PluginBundle\Entity\H5pImport\H5pImport;
use Chamilo\PluginBundle\Entity\H5pImport\H5pImportLibrary;
use Database;
use H5PCore;
use Symfony\Component\Filesystem\Filesystem;
class H5pPackageTools
{
/**
* Help read JSON from the archive.
*
* @return mixed JSON content if valid or FALSE for invalid
*/
public static function getJson(string $file, bool $assoc = false)
{
$fs = new Filesystem();
$json = false;
if ($fs->exists($file)) {
$contents = file_get_contents($file);
// Decode the data
$json = json_decode($contents, $assoc);
if (null === $json) {
// JSON cannot be decoded or the recursion limit has been reached.
return false;
}
}
return $json;
}
/**
* Checks the integrity of an H5P package by verifying the existence of libraries
* and moves them to the "libraries" directory.
*
* @param object $h5pJson the H5P JSON object
* @param string $extractedDir the path to the extracted directory
*
* @return bool true if the package integrity is valid, false otherwise
*/
public static function checkPackageIntegrity(object $h5pJson, string $extractedDir): bool
{
$filesystem = new Filesystem();
$h5pDir = dirname($extractedDir, 2);
$sharedLibrariesDir = $h5pDir.'/libraries';
// Move 'content' directory one level back (H5P specification)
$filesystem->mirror($extractedDir.'/content', $extractedDir, null, ['override' => true]);
$filesystem->remove($extractedDir.'/content');
// Get the list of preloaded dependencies
$preloadedDependencies = $h5pJson->preloadedDependencies;
// Check the existence of each library in the extracted directory
foreach ($preloadedDependencies as $dependency) {
$libraryName = $dependency->machineName;
$majorVersion = $dependency->majorVersion;
$minorVersion = $dependency->minorVersion;
$libraryFolderName = api_replace_dangerous_char($libraryName.'-'.$majorVersion.'.'.$minorVersion);
$libraryPath = $extractedDir.'/'.$libraryFolderName;
// Check if the library folder exists
if (!$filesystem->exists($libraryPath)) {
return false;
}
// Move the entire folder to the "libraries" directory
$targetPath = $sharedLibrariesDir.'/'.$libraryFolderName;
$filesystem->rename($libraryPath, $targetPath, true);
}
return true;
}
/**
* Stores the H5P package information in the database.
*
* @param string $packagePath the path to the H5P package file
* @param object $h5pJson the parsed H5P JSON object
* @param Course $course the course entity related to the package
* @param null|Session $session the session entity related to the package
* @param null|array $values the advance options in upload form
*/
public static function storeH5pPackage(
string $packagePath,
object $h5pJson,
Course $course,
Session $session = null,
array $values = null
) {
$entityManager = \Database::getManager();
// Go back 2 directories
$h5pDir = dirname($packagePath, 2);
$sharedLibrariesDir = $h5pDir.'/libraries';
$mainLibraryName = $h5pJson->mainLibrary;
$relativePath = api_get_path(REL_COURSE_PATH).$course->getDirectory().'/h5p/';
$h5pImport = new H5pImport();
$h5pImport->setName($h5pJson->title);
$h5pImport->setPath($packagePath);
if ($values) {
$h5pImport->setDescription($values['description']);
}
$h5pImport->setRelativePath($relativePath);
$h5pImport->setCourse($course);
$h5pImport->setSession($session);
$entityManager->persist($h5pImport);
$libraries = $h5pJson->preloadedDependencies;
foreach ($libraries as $libraryData) {
$library = $entityManager
->getRepository(H5pImportLibrary::class)
->findOneBy(
[
'machineName' => $libraryData->machineName,
'majorVersion' => $libraryData->majorVersion,
'minorVersion' => $libraryData->minorVersion,
'course' => $course,
]
)
;
if (null === $library) {
$auxFullName = $libraryData->machineName.'-'.$libraryData->majorVersion.'.'.$libraryData->minorVersion;
$libraryOwnJson = self::getJson($sharedLibrariesDir.'/'.$auxFullName.'/library.json');
$library = new H5pImportLibrary();
$library->setMachineName($libraryData->machineName);
$library->setTitle($libraryOwnJson->title);
$library->setMajorVersion($libraryData->majorVersion);
$library->setMinorVersion($libraryData->minorVersion);
$library->setPatchVersion($libraryOwnJson->patchVersion);
$library->setRunnable($libraryOwnJson->runnable);
$library->setEmbedTypes($libraryOwnJson->embedTypes);
$library->setPreloadedJs($libraryOwnJson->preloadedJs);
$library->setPreloadedCss($libraryOwnJson->preloadedCss);
$library->setLibraryPath($sharedLibrariesDir.'/'.$auxFullName);
$library->setCourse($course);
$entityManager->persist($library);
$entityManager->flush();
}
$h5pImport->addLibraries($library);
if ($mainLibraryName === $libraryData->machineName) {
$h5pImport->setMainLibrary($library);
}
$entityManager->persist($h5pImport);
$entityManager->flush();
}
}
/**
* Deletes an H5P package from the database and the disk.
*
* @param H5pImport $h5pImport the H5P import entity representing the package to delete
*
* @return bool true if the package was successfully deleted, false otherwise
*/
public static function deleteH5pPackage(H5pImport $h5pImport): bool
{
$packagePath = $h5pImport->getPath();
$entityManager = \Database::getManager();
$entityManager->remove($h5pImport);
$entityManager->flush();
$filesystem = new Filesystem();
if ($filesystem->exists($packagePath)) {
try {
$filesystem->remove($packagePath);
} catch (\Exception $e) {
return false;
}
}
return true;
}
/**
* Get core settings for H5P content.
*
* @param H5pImport $h5pImport the H5pImport object
* @param \H5PCore $h5pCore the H5PCore object
*
* @return array the core settings for H5P content
*/
public static function getCoreSettings(H5pImport $h5pImport, \H5PCore $h5pCore): array
{
$originIsLearnpath = 'learnpath' === api_get_origin();
$settings = [
'baseUrl' => api_get_path(WEB_PATH),
'url' => $h5pImport->getRelativePath(),
'postUserStatistics' => true,
'ajax' => [
'setFinished' => api_get_path(WEB_PLUGIN_PATH).'h5pimport/src/ajax.php?action=set_finished&h5pId='.$h5pImport->getIid().'&learnpath='.$originIsLearnpath.'&token='.\H5PCore::createToken('result'),
'contentUserData' => api_get_path(WEB_PLUGIN_PATH).'h5pimport/src/ajax.php?action=content_user_data&h5pId='.$h5pImport->getIid().'&token='.\H5PCore::createToken('content'),
],
'saveFreq' => false,
'l10n' => [
'H5P' => $h5pCore->getLocalization(),
],
// 'hubIsEnabled' => variable_get('h5p_hub_is_enabled', TRUE) ? TRUE : FALSE,
'crossorigin' => false,
// 'crossoriginCacheBuster' => variable_get('h5p_crossorigin_cache_buster', NULL),
// 'libraryConfig' => $core->h5pF->getLibraryConfig(),
'pluginCacheBuster' => '?0',
'libraryUrl' => $h5pImport->getMainLibrary()->getLibraryPath().'/js',
];
$loggedUser = api_get_user_info();
if ($loggedUser) {
$settings['user'] = [
'name' => $loggedUser['complete_name'],
'mail' => $loggedUser['email'],
];
}
return $settings;
}
/**
* Get the core assets.
*
* @return array[]|bool an array containing CSS and JS assets or false if some core assets missing
*/
public static function getCoreAssets()
{
$assets = [
'css' => [],
'js' => [],
];
// Add CSS assets
foreach (\H5PCore::$styles as $style) {
$auxAssetPath = 'vendor/h5p/h5p-core/'.$style;
$assets['css'][] = api_get_path(WEB_PATH).$auxAssetPath;
if (!file_exists(api_get_path(SYS_PATH).$auxAssetPath)) {
return false;
}
}
// Add JS assets
foreach (\H5PCore::$scripts as $script) {
$auxAssetPath = 'vendor/h5p/h5p-core/'.$script;
$auxUrl = api_get_path(WEB_PATH).$auxAssetPath;
$assets['js'][] = $auxUrl;
if (!file_exists(api_get_path(SYS_PATH).$auxAssetPath)) {
return false;
}
}
return $assets;
}
/**
* Return the content body for the H5PIntegration javascript object.
*
* @param mixed $h5pNode
*/
public static function getContentSettings($h5pNode, \H5PCore $h5pCore): array
{
$filtered = $h5pCore->filterParameters($h5pNode);
$contentUserData = [
0 => [
'state' => '{}',
],
];
// ToDo Use $h5pCore->getDisplayOptionsForView() function
$displayOptions = [
'frame' => api_get_course_plugin_setting('h5pimport', 'frame'),
'embed' => api_get_course_plugin_setting('h5pimport', 'embed'),
'copyright' => api_get_course_plugin_setting('h5pimport', 'copyright'),
'icon' => api_get_course_plugin_setting('h5pimport', 'icon'),
];
return [
'library' => \H5PCore::libraryToString($h5pNode['library']),
'jsonContent' => $h5pNode['params'],
'fullScreen' => $h5pNode['library']['fullscreen'],
'exportUrl' => '',
'language' => 'en',
'filtered' => $filtered,
'embedCode' => '<iframe src="'.api_get_course_url().'h5p/embed/'.$h5pNode['mainId'].'" width=":w" height=":h" frameborder="0" allowfullscreen="allowfullscreen" allow="geolocation *; microphone *; camera *; midi *; encrypted-media *" title="'.$h5pNode['title'].'"></iframe>',
'resizeCode' => '',
'mainId' => $h5pNode['mainId'],
'url' => $h5pNode['url'],
'contentUserData' => $contentUserData,
'displayOptions' => $displayOptions,
'metadata' => $h5pNode['metadata'],
];
}
/**
* Convert H5P dependencies to a library list.
*
* @param array $dependencies the H5P dependencies
*
* @return array the library list with machine names as keys and version information as values
*/
public static function h5pDependenciesToLibraryList(array $dependencies): array
{
$libraryList = [];
foreach ($dependencies as $dependency) {
$libraryList[$dependency['machineName']] = [
'majorVersion' => $dependency['majorVersion'],
'minorVersion' => $dependency['minorVersion'],
];
}
return $libraryList;
}
}

@ -0,0 +1,183 @@
<?php
// For licensing terms, see /license.txt
namespace Chamilo\PluginBundle\H5pImport\H5pImporter;
use Exception;
use Symfony\Component\Filesystem\Filesystem;
/**
* Class ZipPackageImporter.
*/
class ZipPackageImporter extends H5pPackageImporter
{
/*
* Allowed file extensions
* List obtained from H5P: https://h5p.org/allowed-file-extensions
* */
private const ALLOWED_EXTENSIONS = [
'json',
'png',
'jpg',
'jpeg',
'gif',
'bmp',
'tif',
'tiff',
'svg',
'eot',
'ttf',
'woff',
'woff2',
'otf',
'webm',
'mp4',
'ogg',
'mp3',
'm4a',
'wav',
'txt',
'pdf',
'rtf',
'doc',
'docx',
'xls',
'xlsx',
'ppt',
'pptx',
'odt',
'ods',
'odp',
'xml',
'csv',
'diff',
'patch',
'swf',
'md',
'textile',
'vtt',
'webvtt',
'gltf',
'gl',
'js',
'css',
];
/**
* Import an H5P package. No DB change.
*
* @return string The path to the extracted package directory.
*
* @throws Exception When the H5P package is invalid.
*/
public function import(): string
{
$zipFile = new \PclZip($this->packageFileInfo['tmp_name']);
$zipContent = $zipFile->listContent();
if ($this->validateH5pPackageContent($zipContent)) {
$packageSize = array_reduce(
$zipContent,
function ($accumulator, $zipEntry) {
return $accumulator + $zipEntry['size'];
}
);
$this->validateEnoughSpace($packageSize);
$pathInfo = pathinfo($this->packageFileInfo['name']);
$packageDirectoryPath = $this->generatePackageDirectory($pathInfo['filename']);
$zipFile->extract($packageDirectoryPath);
return "{$packageDirectoryPath}";
}
throw new Exception('Invalid H5P package');
}
/**
* @throws Exception
*/
protected function validateEnoughSpace(int $packageSize)
{
$courseSpaceQuota = \DocumentManager::get_course_quota($this->course->getCode());
if (!enough_size($packageSize, $this->courseDirectoryPath, $courseSpaceQuota)) {
throw new Exception('Not enough space to store package.');
}
}
/**
* Validate an H5P package.
* Check if 'h5p.json' or 'content/content.json' files exist
* and if the files are in a file whitelist (ALLOWED_EXTENSIONS).
*
* @param array $h5pPackageContent the content of the H5P package
*
* @return bool whether the H5P package is valid or not
*/
private function validateH5pPackageContent(array $h5pPackageContent): bool
{
$validPackage = false;
if (!empty($h5pPackageContent)) {
foreach ($h5pPackageContent as $content) {
$filename = $content['filename'];
if (0 !== preg_match('/(^[\._]|\/[\._]|\\\[\._])/', $filename)) {
// Skip any file or folder starting with a . or _
continue;
}
$fileExtension = pathinfo($filename, PATHINFO_EXTENSION);
if (in_array($fileExtension, self::ALLOWED_EXTENSIONS)) {
$validPackage = 'h5p.json' === $filename || 'content/content.json' === $filename;
if ($validPackage) {
break;
}
}
}
}
return $validPackage;
}
private function generatePackageDirectory(string $name): string
{
$baseDirectory = $this->courseDirectoryPath.'/h5p/content/';
$safeName = api_replace_dangerous_char($name);
$directoryPath = $baseDirectory.$safeName;
$fs = new Filesystem();
if ($fs->exists($directoryPath)) {
$counter = 1;
// Add numeric suffix to the name until a unique directory name is found
while ($fs->exists($directoryPath)) {
$modifiedName = $safeName.'_'.$counter;
$directoryPath = $baseDirectory.$modifiedName;
++$counter;
}
}
$fs->mkdir(
$directoryPath,
api_get_permissions_for_new_directories()
);
$sharedLibrariesDir = $this->courseDirectoryPath.'/h5p/libraries';
if (!$fs->exists($sharedLibrariesDir)) {
$fs->mkdir(
$sharedLibrariesDir,
api_get_permissions_for_new_directories()
);
}
return $directoryPath;
}
}

@ -0,0 +1,90 @@
<?php
// For licensing terms, see /license.txt
use Chamilo\CourseBundle\Entity\CLpItem;
use Chamilo\CourseBundle\Entity\CLpItemView;
use Chamilo\PluginBundle\Entity\H5pImport\H5pImport;
use Chamilo\PluginBundle\Entity\H5pImport\H5pImportResults;
use ChamiloSession as Session;
require_once __DIR__.'/../../../main/inc/global.inc.php';
$action = $_REQUEST['action'] ?? null;
$h5pId = isset($_REQUEST['h5pId']) ? intval($_REQUEST['h5pId']) : 0;
$course = api_get_course_entity(api_get_course_int_id());
$session = api_get_session_entity(api_get_session_id());
$plugin = H5pImportPlugin::create();
$em = Database::getManager();
$h5pImportRepo = $em->getRepository('ChamiloPluginBundle:H5pImport\H5pImport');
$user = api_get_user_entity(api_get_user_id());
if ('set_finished' === $action && 0 !== $h5pId) {
if (!H5PCore::validToken('result', filter_input(INPUT_GET, 'token'))) {
H5PCore::ajaxError($plugin->get_lang('h5p_error_invalid_token'));
}
if (is_numeric($_POST['score']) && is_numeric($_POST['maxScore'])) {
/** @var null|H5pImport $h5pImport */
$h5pImport = $h5pImportRepo->find($h5pId);
$entityManager = Database::getManager();
$h5pImportResults = new H5pImportResults();
$h5pImportResults->setH5pImport($h5pImport);
$h5pImportResults->setCourse($course);
$h5pImportResults->setSession($session);
$h5pImportResults->setUser($user);
$h5pImportResults->setScore((int) $_POST['score']);
$h5pImportResults->setMaxScore((int) $_POST['maxScore']);
$h5pImportResults->setStartTime((int) $_POST['opened']);
$h5pImportResults->setTotalTime(time() - $_POST['opened']);
$entityManager->persist($h5pImportResults);
// If it comes from an LP, update in c_lp_item_view
if (1 == $_REQUEST['learnpath'] && Session::has('oLP')) {
$lpObject = Session::read('oLP');
$clpItemViewRepo = $em->getRepository('ChamiloCourseBundle:CLpItemView');
/** @var null|CLpItemView $lpItemView */
$lpItemView = $clpItemViewRepo->findOneBy(
[
'lpViewId' => $lpObject->lp_view_id,
'lpItemId' => $lpObject->current,
]
);
/** @var null|CLpItem $lpItem */
$lpItem = $entityManager->find('ChamiloCourseBundle:CLpItem', $lpItemView->getLpItemId());
if ('h5p' !== $lpItem->getItemType()) {
return null;
}
$lpItemView->setScore($_POST['score']);
$lpItemView->setMaxScore($_POST['maxScore']);
$lpItemView->setStatus('completed');
$lpItemView->setTotalTime($lpItemView->getTotalTime() + $h5pImportResults->getTotalTime());
$lpItem->setMaxScore($_POST['maxScore']);
$h5pImportResults->setCLpItemView($lpItemView);
$entityManager->persist($h5pImportResults);
$entityManager->persist($lpItem);
$entityManager->persist($lpItemView);
}
$entityManager->flush();
H5PCore::ajaxSuccess();
} else {
H5PCore::ajaxError();
}
} elseif ('content_user_data' === $action && 0 !== $h5pId) {
if (!H5PCore::validToken('content', filter_input(INPUT_GET, 'token'))) {
H5PCore::ajaxError($plugin->get_lang('h5p_error_invalid_token'));
}
/** @var null|H5pImport $h5pImport */
$h5pImport = $h5pImportRepo->find($h5pId);
} else {
H5PCore::ajaxError(get_lang('InvalidAction'));
}

@ -0,0 +1,240 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\PluginBundle\Entity\H5pImport\H5pImport;
use Chamilo\PluginBundle\H5pImport\H5pImporter\H5pPackageImporter;
use Chamilo\PluginBundle\H5pImport\H5pImporter\H5pPackageTools;
require_once __DIR__.'/../../main/inc/global.inc.php';
api_block_anonymous_users();
api_protect_course_script(true);
$cidReq = api_get_cidreq();
$pluginIndex = "./start.php?$cidReq";
$plugin = H5pImportPlugin::create();
if ('false' === $plugin->get('tool_enable')) {
api_not_allowed(true);
}
$isAllowedToEdit = api_is_allowed_to_edit(true);
$action = $_REQUEST['action'] ?? null;
$em = Database::getManager();
$h5pRepo = $em->getRepository('ChamiloPluginBundle:H5pImport\H5pImport');
$h5pResultsRepo = $em->getRepository('ChamiloPluginBundle:H5pImport\H5pImportResults');
$course = api_get_course_entity(api_get_course_int_id());
$session = api_get_session_entity(api_get_session_id());
$user = api_get_user_entity(api_get_user_id());
$actions = [];
$view = new Template($plugin->getToolTitle());
$view->assign('is_allowed_to_edit', $isAllowedToEdit);
switch ($action) {
case 'add':
if (!$isAllowedToEdit) {
api_not_allowed(true);
}
$actions[] = Display::url(
Display::return_icon('back.png', get_lang('Back'), [], ICON_SIZE_MEDIUM),
api_get_self()
);
// Set the max upload size in php.ini in the file uploader
$maxFileSize = getIniMaxFileSizeInBytes();
$form = new FormValidator('frm_edit');
$form->addFile('file', $plugin->get_lang('h5p_package'), ['accept' => '.h5p']);
$form->addRule(
'file',
'The file size cannot exceed: '.$maxFileSize.' bytes',
'maxfilesize',
$maxFileSize,
'client'
);
$form->addButtonAdvancedSettings('advanced_params');
$form->addHtml('<div id="advanced_params_options" style="display:none">');
$form->addTextarea('description', get_lang('Description'));
$form->applyFilter('description', 'trim');
$form->addHtml('</div>');
$form->addButtonUpdate(get_lang('Add'));
$form->addHidden('action', 'add');
$form->protect();
if ($form->validate()) {
$values = $form->exportValues();
$zipFileInfo = $_FILES['file'];
try {
$importer = H5pPackageImporter::create($zipFileInfo, $course);
$packageFile = $importer->import();
// Get the h5p.json and content.json contents
$h5pJson = H5pPackageTools::getJson($packageFile.DIRECTORY_SEPARATOR.'h5p.json');
$contentJson = H5pPackageTools::getJson(
$packageFile.DIRECTORY_SEPARATOR.'content'.DIRECTORY_SEPARATOR.'content.json'
);
if ($h5pJson && $contentJson) {
if (H5pPackageTools::checkPackageIntegrity($h5pJson, $packageFile)) {
H5pPackageTools::storeH5pPackage($packageFile, $h5pJson, $course, $session, $values);
Display::addFlash(
Display::return_message(get_lang('Added'), 'success')
);
} else {
Display::addFlash(
Display::return_message(get_lang('Error'), 'error')
);
break;
}
header('Location: '.api_get_self());
}
exit;
} catch (Exception $e) {
Display::addFlash(
Display::return_message($e->getMessage(), 'error')
);
header("Location: $pluginIndex");
exit;
}
}
$view->assign('header', $plugin->get_lang('import_h5p_package'));
$view->assign('form', $form->returnForm());
break;
case 'delete':
$h5pImportId = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0;
if (!$h5pImportId && !Security::check_token('get')) {
break;
}
/** @var H5pImport|null $h5pImport */
$h5pImport = $h5pRepo->find($h5pImportId);
if (!$h5pImport) {
Display::addFlash(Display::return_message($plugin->get_lang('ContentNotFound'), 'danger'));
break;
}
if (H5pPackageTools::deleteH5pPackage($h5pImport)) {
Display::addFlash(
Display::return_message(get_lang('Deleted'), 'success')
);
} else {
Display::addFlash(
Display::return_message(get_lang('Error'), 'danger')
);
}
header('Location: '.api_get_self());
exit;
default:
/** @var array|H5pImport[] $h5pImports */
$h5pImports = $h5pRepo->findBy(['course' => $course, 'session' => $session]);
$tableData = [];
/** @var H5pImport $h5pImport */
foreach ($h5pImports as $h5pImport) {
$h5pImportsResults = $h5pResultsRepo->count(
[
'course' => $course,
'session' => $session,
'user' => $user,
'h5pImport' => $h5pImport,
]
);
$data = [
Display::url(
$h5pImport->getName(),
$plugin->getViewUrl($h5pImport)
),
$h5pImport->getDescription(),
$h5pImportsResults,
];
if ($isAllowedToEdit) {
$data[] = $h5pImport;
}
$tableData[] = $data;
}
if ($isAllowedToEdit) {
$btnAdd = Display::toolbarButton(
get_lang('Upload'),
api_get_self().'?action=add',
'file-code-o',
'primary'
);
$view->assign(
'actions',
Display::toolbarAction($plugin->get_name(), [$btnAdd])
);
if (in_array($action, ['add', 'edit'])) {
$view->assign('form', $form->returnForm());
}
}
$table = new SortableTableFromArray($tableData, 0);
$table->set_header(0, get_lang('Title'));
$table->set_header(1, get_lang('Description'));
$table->set_header(2, $plugin->get_lang('attempts'));
if ($isAllowedToEdit) {
$table->set_header(
3,
get_lang('Actions'),
false,
'th-header text-right',
['class' => 'text-right']
);
$table->set_column_filter(
3,
function (H5pImport $value) use ($isAllowedToEdit) {
$actions = [];
if ($isAllowedToEdit) {
$actions[] = Display::url(
Display::return_icon('delete.png', get_lang('Delete')),
api_get_self().'?'.http_build_query([
'action' => 'delete',
'id' => $value->getIid(),
'sec_token' => Security::getTokenFromSession(),
])
);
}
return implode(PHP_EOL, $actions);
}
);
}
$view->assign('h5pImports', $h5pImports);
$view->assign('table', $table->return_table());
}
$content = $view->fetch('h5pimport/view/index.tpl');
if ($actions) {
$actions = implode(PHP_EOL, $actions);
$view->assign(
'actions',
Display::toolbarAction($plugin->get_name(), [$actions])
);
}
$view->assign('content', $content);
$view->display_one_col_template();

@ -0,0 +1,6 @@
<?php
// For license terms, see /license.txt
require_once __DIR__.'/config.php';
H5pImportPlugin::create()->uninstall();

@ -0,0 +1,189 @@
<?php
// For licensing terms, see /license.txt
use Chamilo\PluginBundle\Entity\H5pImport\H5pImport;
use Chamilo\PluginBundle\H5pImport\H5pImporter\H5pImplementation;
use Chamilo\PluginBundle\H5pImport\H5pImporter\H5pPackageTools;
require_once __DIR__.'/../../main/inc/global.inc.php';
api_block_anonymous_users();
api_protect_course_script(true);
$plugin = H5pImportPlugin::create();
if ('false' === $plugin->get('tool_enabled')) {
api_not_allowed(true);
}
$isAllowedToEdit = api_is_allowed_to_edit(true);
$em = Database::getManager();
$embedRepo = $em->getRepository('ChamiloPluginBundle:H5pImport\H5pImport');
$course = api_get_course_entity(api_get_course_int_id());
$session = api_get_session_entity(api_get_session_id());
$h5pImportId = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0;
$originIsLearnpath = 'learnpath' === api_get_origin();
if (!$h5pImportId) {
api_not_allowed(true);
}
/** @var null|H5pImport $h5pImport */
$h5pImport = $embedRepo->find($h5pImportId);
if (!$h5pImport) {
api_not_allowed(
true,
Display::return_message($plugin->get_lang('ContentNotFound'), 'danger')
);
}
if ($course->getId() !== $h5pImport->getCourse()->getId()) {
api_not_allowed(true);
}
if ($session && $h5pImport->getSession()) {
if ($session->getId() !== $h5pImport->getSession()->getId()) {
api_not_allowed(true);
}
}
if (!$originIsLearnpath) {
$interbreadcrumb[] = [
'name' => $plugin->getToolTitle(),
'url' => api_get_path(WEB_PLUGIN_PATH).$plugin->get_name().'/start.php',
];
$actions = Display::url(
Display::return_icon('back.png', get_lang('Back'), [], ICON_SIZE_MEDIUM),
api_get_path(WEB_PLUGIN_PATH).$plugin->get_name().'/start.php?'.api_get_cidreq()
);
}
$formTarget = $originIsLearnpath ? '_self' : '_blank';
$htmlContent = '';
if ($_REQUEST['view']) {
$interface = new H5pImplementation($h5pImport);
$h5pCore = new H5PCore(
$interface,
$h5pImport->getPath(),
api_get_self(),
'en',
false
);
$h5pNode = $h5pCore->loadContent($h5pImport->getIid());
if (empty($h5pNode)) {
Display::addFlash(
Display::return_message(get_lang('Error'), 'error')
);
} else {
$coreAssets = H5pPackageTools::getCoreAssets();
if (!$coreAssets) {
Display::addFlash(
Display::return_message($plugin->get_lang('h5p_error_missing_core_asset'), 'danger')
);
} else {
$htmlContent .= Display::div(
['class' => 'exercise_overview_options']
);
$integration = H5pPackageTools::getCoreSettings($h5pImport, $h5pCore);
$embedType = H5PCore::determineEmbedType($h5pNode['embedType'], $h5pNode['library']['embedTypes']);
$integration['contents']['cid-'.$h5pNode['contentId']] =
H5pPackageTools::getContentSettings($h5pNode, $h5pCore);
$preloadedDependencies = $h5pCore->loadContentDependencies($h5pNode['id'], 'preloaded');
$files = $h5pCore->getDependenciesFiles(
$preloadedDependencies,
api_get_path(WEB_COURSE_PATH).$course->getDirectory().'/h5p'
);
$libraryList = H5pPackageTools::h5pDependenciesToLibraryList($preloadedDependencies);
foreach ($coreAssets['js'] as $script) {
$htmlHeadXtra[] = api_get_js_simple($script);
}
foreach ($coreAssets['css'] as $style) {
$htmlHeadXtra[] = api_get_css($style);
}
if ('div' === $embedType) {
foreach ($files['scripts'] as $script) {
$htmlHeadXtra[] = api_get_js_simple($script->path.$script->version);
$integration['loadedJs'] = $script->path.$script->version;
}
foreach ($files['styles'] as $script) {
$htmlHeadXtra[] = api_get_css($script->path.$script->version);
$integration['loadedCss'][] = $script->path.$script->version;
}
$htmlContent = '<div class="h5p-content" data-content-id="'.$h5pNode['contentId'].'"></div>';
} elseif ('iframe' === $embedType) {
$integration['core']['scripts'] = $coreAssets['js'];
$integration['core']['styles'] = $coreAssets['css'];
$integration['contents']['cid-'.$h5pNode['contentId']]['styles'] =
$h5pCore->getAssetsUrls($files['styles']);
$integration['contents']['cid-'.$h5pNode['contentId']]['scripts'] =
$h5pCore->getAssetsUrls($files['scripts']);
$htmlContent = '<div class="h5p-iframe-wrapper">
<iframe
id="h5p-iframe-'.$h5pNode['contentId'].'"
class="h5p-iframe"
data-content-id="'.$h5pNode['contentId'].'"
style="height:1px"
src="about:blank" frameBorder="0" scrolling="no"
allowfullscreen="allowfullscreen"
allow="geolocation *; microphone *; camera *; midi *; encrypted-media *"
title="'.$h5pNode['title'].'">
</iframe>
</div>';
}
if (!isset($htmlContent)) {
Display::addFlash(
Display::return_message($plugin->get_lang('h5p_error_loading'), 'danger')
);
} else {
$htmlContent .= '<script> H5PIntegration = '.json_encode($integration).'</script>';
}
}
}
} else {
$frmNewAttempt = new FormValidator(
'view',
'post',
$plugin->getViewUrl($h5pImport).'&view=1',
'',
['target' => $formTarget],
FormValidator::LAYOUT_INLINE
);
$frmNewAttempt->addHidden('id', $h5pImport->getIid());
$frmNewAttempt->addButton(
'submit',
$plugin->get_lang('start_attempt'),
'external-link fa-fw',
'success'
);
$htmlContent = Display::div(
$frmNewAttempt->returnForm(),
['class' => 'exercise_overview_options']
);
}
$view = new Template($h5pImport->getName());
$view->assign('header', $h5pImport->getName());
if (!$originIsLearnpath) {
$view->assign('actions', Display::toolbarAction($plugin->get_name(), [$actions]));
}
$view->assign(
'content',
$htmlContent
);
$view->display_one_col_template();

@ -0,0 +1,6 @@
{% if is_allowed_to_edit %}
{% if form is defined %}
{{ form }}
{% endif %}
{% endif %}
{{ table }}

@ -19,6 +19,7 @@ use Chamilo\CourseBundle\Component\CourseCopy\Resources\ForumPost;
use Chamilo\CourseBundle\Component\CourseCopy\Resources\ForumTopic;
use Chamilo\CourseBundle\Component\CourseCopy\Resources\Glossary;
use Chamilo\CourseBundle\Component\CourseCopy\Resources\GradeBookBackup;
use Chamilo\CourseBundle\Component\CourseCopy\Resources\H5pTool;
use Chamilo\CourseBundle\Component\CourseCopy\Resources\LearnPathCategory;
use Chamilo\CourseBundle\Component\CourseCopy\Resources\Link;
use Chamilo\CourseBundle\Component\CourseCopy\Resources\LinkCategory;
@ -107,6 +108,7 @@ class CourseBuilder
public $itemListToAdd = [];
public $isXapiEnabled = false;
public $isH5pEnabled = false;
/**
* Create a new CourseBuilder.
@ -248,6 +250,13 @@ class CourseBuilder
$this->isXapiEnabled = $xapiEnabled;
}
$h5pEnabled = \H5pImportPlugin::create()->isEnabled();
if ($h5pEnabled) {
$this->tools_to_build[] = 'h5p_tool';
$this->toolToName['h5p_tool'] = RESOURCE_H5P_TOOL;
$this->isH5pEnabled = $h5pEnabled;
}
foreach ($this->tools_to_build as $tool) {
if (!empty($parseOnlyToolList) && !in_array($this->toolToName[$tool], $parseOnlyToolList)) {
continue;
@ -1766,6 +1775,15 @@ class CourseBuilder
);
}
if (isset($itemList['h5p']) && $this->isH5pEnabled) {
$this->buildH5pTool(
$sessionId,
$courseId,
true,
$itemList['h5p']
);
}
if (!empty($itemList['student_publication'])) {
$this->build_works(
$sessionId,
@ -1969,6 +1987,34 @@ class CourseBuilder
}
}
public function buildH5pTool(
$sessionId = 0,
$courseId = 0,
$withBaseContent = false,
$idList = []
) {
if (!$this->isH5pEnabled) {
return false;
}
$courseId = (int) $courseId;
$sessionId = (int) $sessionId;
$sessionCondition = api_get_session_condition($sessionId, true, $withBaseContent);
$idCondition = '';
if (!empty($idList)) {
$idList = array_map('intval', $idList);
$idCondition = ' AND iid IN ("'.implode('","', $idList).'") ';
}
$sql = "SELECT * FROM plugin_h5p_import WHERE c_id = $courseId $sessionCondition $idCondition";
$rs = Database::query($sql);
while ($row = Database::fetch_array($rs, 'ASSOC')) {
$h5pTool = new H5pTool($row);
$this->course->add_resource($h5pTool);
}
}
/**
* Build the Surveys.
*

@ -56,6 +56,7 @@ class CourseRestorer
'links',
'works',
'xapi_tool',
'h5p_tool',
'surveys',
'learnpath_category',
'learnpaths',
@ -70,6 +71,7 @@ class CourseRestorer
/** Setting per tool */
public $tool_copy_settings = [];
public $isXapiEnabled = false;
public $isH5pEnabled = false;
/**
* If true adds the text "copy" in the title of an item (only for LPs right now).
@ -159,6 +161,7 @@ class CourseRestorer
$teacher_list = CourseManager::get_teacher_list_from_course_code($course_info['code']);
$this->first_teacher_id = api_get_user_id();
$this->isXapiEnabled = \XApiPlugin::create()->isEnabled();
$this->isH5pEnabled = \H5pImportPlugin::create()->isEnabled();
if (!empty($teacher_list)) {
foreach ($teacher_list as $teacher) {
@ -198,6 +201,9 @@ class CourseRestorer
if ('xapi_tool' == $tool && !$this->isXapiEnabled) {
continue;
}
if ('h5p_tool' == $tool && !$this->isH5pEnabled) {
continue;
}
$function_build = 'restore_'.$tool;
$this->$function_build(
$session_id,
@ -3341,6 +3347,10 @@ class CourseRestorer
$tool = RESOURCE_XAPI_TOOL;
}
if ('h5p' === $tool && $this->isH5pEnabled) {
$tool = RESOURCE_H5P_TOOL;
}
if (isset($this->course->resources[$tool][$ref]) &&
isset($this->course->resources[$tool][$ref]->destination_id) &&
!empty($this->course->resources[$tool][$ref]->destination_id)

@ -0,0 +1,31 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CourseBundle\Component\CourseCopy\Resources;
/**
* H5P tool backup script.
*
* @package chamilo.backup
*/
class H5pTool extends Resource
{
public $params = [];
/**
* Create a new H5P tool.
*
* @param array $params
*/
public function __construct($params)
{
parent::__construct($params['iid'], RESOURCE_H5P_TOOL);
$this->params = $params;
}
public function show()
{
parent::show();
echo $this->params['name'];
}
}
Loading…
Cancel
Save