diff --git a/app/Resources/public/css/themes/academica/default.css b/app/Resources/public/css/themes/academica/default.css index cdf4350a4d..f8b4cd854c 100644 --- a/app/Resources/public/css/themes/academica/default.css +++ b/app/Resources/public/css/themes/academica/default.css @@ -33,12 +33,19 @@ html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Open Sans', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #185B8E; } diff --git a/app/Resources/public/css/themes/baby_orange/default.css b/app/Resources/public/css/themes/baby_orange/default.css index 39b118d951..39d9afe575 100644 --- a/app/Resources/public/css/themes/baby_orange/default.css +++ b/app/Resources/public/css/themes/baby_orange/default.css @@ -32,12 +32,19 @@ html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Open Sans', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #666666; } diff --git a/app/Resources/public/css/themes/beach/default.css b/app/Resources/public/css/themes/beach/default.css index 15d69bb14d..0d4e2f83d3 100644 --- a/app/Resources/public/css/themes/beach/default.css +++ b/app/Resources/public/css/themes/beach/default.css @@ -29,16 +29,22 @@ src: local('Open Sans Bold'), local('OpenSans-Bold'), url(fonts/OpenSans-Bold.woff2) format('woff2'), url(fonts/OpenSans-Bold.woff) format('woff'); } - html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Open Sans', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a { color: #2E75A3; diff --git a/app/Resources/public/css/themes/blue_lagoon/default.css b/app/Resources/public/css/themes/blue_lagoon/default.css index f5d2e110b5..f530cd6783 100644 --- a/app/Resources/public/css/themes/blue_lagoon/default.css +++ b/app/Resources/public/css/themes/blue_lagoon/default.css @@ -33,12 +33,19 @@ html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Open Sans', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #185B8E; } diff --git a/app/Resources/public/css/themes/chamilo/default.css b/app/Resources/public/css/themes/chamilo/default.css index 7d8d32286d..13e20be3b7 100755 --- a/app/Resources/public/css/themes/chamilo/default.css +++ b/app/Resources/public/css/themes/chamilo/default.css @@ -6,8 +6,17 @@ * Based on Bootstrap v3 */ +html { + position: relative; +} body { - margin: 0; + margin: 0 0 60px; +} +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; } a { @@ -116,4 +125,4 @@ a:focus { } .bgfooter a{ color: #ffffff; -} \ No newline at end of file +} diff --git a/app/Resources/public/css/themes/chamilo_electric_blue/default.css b/app/Resources/public/css/themes/chamilo_electric_blue/default.css index a6f64deaa3..24e2ada117 100644 --- a/app/Resources/public/css/themes/chamilo_electric_blue/default.css +++ b/app/Resources/public/css/themes/chamilo_electric_blue/default.css @@ -30,6 +30,18 @@ font-weight: 700; src: local('Open Sans Bold'), local('OpenSans-Bold'), url(../chamilo/fonts/OpenSans-Bold.woff2) format('woff2'), url(../chamilo/fonts/OpenSans-Bold.woff) format('woff'); } +html { + position: relative; +} +body { + margin: 0 0 60px; +} +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; diff --git a/app/Resources/public/css/themes/chamilo_green/default.css b/app/Resources/public/css/themes/chamilo_green/default.css index 69ba659260..8006596b42 100644 --- a/app/Resources/public/css/themes/chamilo_green/default.css +++ b/app/Resources/public/css/themes/chamilo_green/default.css @@ -32,12 +32,19 @@ html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Open Sans', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #004600; } diff --git a/app/Resources/public/css/themes/chamilo_orange/default.css b/app/Resources/public/css/themes/chamilo_orange/default.css index 011ee2049d..25b2bc7f8a 100644 --- a/app/Resources/public/css/themes/chamilo_orange/default.css +++ b/app/Resources/public/css/themes/chamilo_orange/default.css @@ -32,12 +32,19 @@ html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Open Sans', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #666666; diff --git a/app/Resources/public/css/themes/chamilo_red/default.css b/app/Resources/public/css/themes/chamilo_red/default.css index bbf8fe4f9e..54338e6fd9 100644 --- a/app/Resources/public/css/themes/chamilo_red/default.css +++ b/app/Resources/public/css/themes/chamilo_red/default.css @@ -31,14 +31,21 @@ src: local('Open Sans Bold'), local('OpenSans-Bold'), url(../chamilo/fonts/OpenSans-Bold.woff2) format('woff2'), url(../chamilo/fonts/OpenSans-Bold.woff) format('woff'); } html { + position: relative; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Open Sans', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #666666; } diff --git a/app/Resources/public/css/themes/chamilo_sport_red/default.css b/app/Resources/public/css/themes/chamilo_sport_red/default.css index 073061b2b5..1c910742c2 100644 --- a/app/Resources/public/css/themes/chamilo_sport_red/default.css +++ b/app/Resources/public/css/themes/chamilo_sport_red/default.css @@ -32,12 +32,19 @@ html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Open Sans', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #666666; } diff --git a/app/Resources/public/css/themes/cool_blue/default.css b/app/Resources/public/css/themes/cool_blue/default.css index a546e367c2..821686445b 100644 --- a/app/Resources/public/css/themes/cool_blue/default.css +++ b/app/Resources/public/css/themes/cool_blue/default.css @@ -30,13 +30,20 @@ src: local('Open Sans Bold'), local('OpenSans-Bold'), url(../chamilo/fonts/OpenSans-Bold.woff2) format('woff2'), url(../chamilo/fonts/OpenSans-Bold.woff) format('woff'); } html { - -ms-text-size-adjust: 100%; - -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; - font-family: 'Open Sans', sans-serif; - line-height: 1.72222; + margin: 0 0 60px; + font-family: 'Open Sans', sans-serif; + line-height: 1.72222; +} +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; } a{ color: #666666; diff --git a/app/Resources/public/css/themes/corporate/default.css b/app/Resources/public/css/themes/corporate/default.css index b0c22fe742..50c9d5746f 100644 --- a/app/Resources/public/css/themes/corporate/default.css +++ b/app/Resources/public/css/themes/corporate/default.css @@ -30,14 +30,21 @@ src: local('Open Sans Bold'), local('OpenSans-Bold'), url(../chamilo/fonts/OpenSans-Bold.woff2) format('woff2'), url(../chamilo/fonts/OpenSans-Bold.woff) format('woff'); } html { + position: relative; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Open Sans', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #666666; } diff --git a/app/Resources/public/css/themes/cosmic_campus/default.css b/app/Resources/public/css/themes/cosmic_campus/default.css index 6594a3e68e..9269c53567 100644 --- a/app/Resources/public/css/themes/cosmic_campus/default.css +++ b/app/Resources/public/css/themes/cosmic_campus/default.css @@ -31,14 +31,21 @@ src: local('Open Sans Bold'), local('OpenSans-Bold'), url(../chamilo/fonts/OpenSans-Bold.woff2) format('woff2'), url(../chamilo/fonts/OpenSans-Bold.woff) format('woff'); } html { + position: relative; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Open Sans', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #185B8E; } diff --git a/app/Resources/public/css/themes/delicious_bordeaux/default.css b/app/Resources/public/css/themes/delicious_bordeaux/default.css index a3bfd0911e..2ed5981fe6 100644 --- a/app/Resources/public/css/themes/delicious_bordeaux/default.css +++ b/app/Resources/public/css/themes/delicious_bordeaux/default.css @@ -30,14 +30,21 @@ src: local('Open Sans Bold'), local('OpenSans-Bold'), url(../chamilo/fonts/OpenSans-Bold.woff2) format('woff2'), url(../chamilo/fonts/OpenSans-Bold.woff) format('woff'); } html { + position: relative; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Open Sans', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #666666; } diff --git a/app/Resources/public/css/themes/empire_green/default.css b/app/Resources/public/css/themes/empire_green/default.css index 98391c4f99..ddf58dd814 100644 --- a/app/Resources/public/css/themes/empire_green/default.css +++ b/app/Resources/public/css/themes/empire_green/default.css @@ -29,12 +29,20 @@ font-weight: 700; src: local('Open Sans Bold'), local('OpenSans-Bold'), url(../chamilo/fonts/OpenSans-Bold.woff2) format('woff2'), url(../chamilo/fonts/OpenSans-Bold.woff) format('woff'); } - +html { + position: relative; +} body { - margin: 0; + margin: 0 0 60px; font-family: 'Open Sans', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #666666; } diff --git a/app/Resources/public/css/themes/fruity_orange/default.css b/app/Resources/public/css/themes/fruity_orange/default.css index 5b8e593804..263172c4e8 100644 --- a/app/Resources/public/css/themes/fruity_orange/default.css +++ b/app/Resources/public/css/themes/fruity_orange/default.css @@ -32,12 +32,19 @@ html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Open Sans', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #666666; } diff --git a/app/Resources/public/css/themes/holi/default.css b/app/Resources/public/css/themes/holi/default.css index 2418198a96..222543e3e0 100644 --- a/app/Resources/public/css/themes/holi/default.css +++ b/app/Resources/public/css/themes/holi/default.css @@ -29,16 +29,22 @@ src: local('Open Sans Bold'), local('OpenSans-Bold'), url(fonts/OpenSans-Bold.woff2) format('woff2'), url(fonts/OpenSans-Bold.woff) format('woff'); } - html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Open Sans', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a { color: #3D91CA; diff --git a/app/Resources/public/css/themes/journal/default.css b/app/Resources/public/css/themes/journal/default.css index 5c06c767ff..7c1923800a 100644 --- a/app/Resources/public/css/themes/journal/default.css +++ b/app/Resources/public/css/themes/journal/default.css @@ -29,17 +29,22 @@ font-weight: 700; src: local('Arimo Bold Italic'), local('Arimo-BoldItalic'), url(fonts/Arimo-BoldItalic.woff2) format('woff2'); } - - html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Arimo', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #666666; } diff --git a/app/Resources/public/css/themes/kiddy/default.css b/app/Resources/public/css/themes/kiddy/default.css index 4a7b5d61d6..dd03073cbc 100644 --- a/app/Resources/public/css/themes/kiddy/default.css +++ b/app/Resources/public/css/themes/kiddy/default.css @@ -24,15 +24,21 @@ src: local('Roboto Condensed Bold'), local('RobotoCondensed-Bold'), url(fonts/RobotoCondensed-Bold.woff2) format('woff2'); } - html { - -ms-text-size-adjust: 100%; - -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; - font-family: 'Roboto Condensed', sans-serif; - line-height: 1.72222; + margin: 0 0 60px; + font-family: 'Roboto Condensed', sans-serif; + line-height: 1.72222; +} +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; } a{ color: #666666; diff --git a/app/Resources/public/css/themes/medical/default.css b/app/Resources/public/css/themes/medical/default.css index 5941e61bed..552252c7e9 100644 --- a/app/Resources/public/css/themes/medical/default.css +++ b/app/Resources/public/css/themes/medical/default.css @@ -36,13 +36,20 @@ } html { - -ms-text-size-adjust: 100%; - -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; - font-family: 'Lato', sans-serif; - line-height: 1.72222; + margin: 0 0 60px; + font-family: 'Lato', sans-serif; + line-height: 1.72222; +} +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; } a{ color: #2D9DB5; diff --git a/app/Resources/public/css/themes/readable/default.css b/app/Resources/public/css/themes/readable/default.css index ee7557cae2..9a7697d54a 100644 --- a/app/Resources/public/css/themes/readable/default.css +++ b/app/Resources/public/css/themes/readable/default.css @@ -28,13 +28,20 @@ html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Roboto Slab', serif; line-height: 1.72222; background-color: #E3E3E3; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #666666; } diff --git a/app/Resources/public/css/themes/royal_purple/default.css b/app/Resources/public/css/themes/royal_purple/default.css index d3979e3ad5..cbb91e59a4 100644 --- a/app/Resources/public/css/themes/royal_purple/default.css +++ b/app/Resources/public/css/themes/royal_purple/default.css @@ -32,12 +32,19 @@ html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Open Sans', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #666666; } diff --git a/app/Resources/public/css/themes/silver_line/default.css b/app/Resources/public/css/themes/silver_line/default.css index 744116b828..be4201115c 100644 --- a/app/Resources/public/css/themes/silver_line/default.css +++ b/app/Resources/public/css/themes/silver_line/default.css @@ -26,12 +26,19 @@ html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Titillium Web', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #666666; } diff --git a/app/Resources/public/css/themes/simplex/default.css b/app/Resources/public/css/themes/simplex/default.css index c933863dc8..36b97ff265 100644 --- a/app/Resources/public/css/themes/simplex/default.css +++ b/app/Resources/public/css/themes/simplex/default.css @@ -26,12 +26,19 @@ html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Lato', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #111111; } diff --git a/app/Resources/public/css/themes/sober_brown/default.css b/app/Resources/public/css/themes/sober_brown/default.css index 2d978b85b4..edcc327390 100644 --- a/app/Resources/public/css/themes/sober_brown/default.css +++ b/app/Resources/public/css/themes/sober_brown/default.css @@ -32,12 +32,19 @@ html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Open Sans', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #666666; } diff --git a/app/Resources/public/css/themes/spacelab/default.css b/app/Resources/public/css/themes/spacelab/default.css index 1270f807c6..344dda2275 100644 --- a/app/Resources/public/css/themes/spacelab/default.css +++ b/app/Resources/public/css/themes/spacelab/default.css @@ -33,12 +33,19 @@ html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Open Sans', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #185B8E; } diff --git a/app/Resources/public/css/themes/steel_grey/default.css b/app/Resources/public/css/themes/steel_grey/default.css index 596909fd97..66b0f610b4 100644 --- a/app/Resources/public/css/themes/steel_grey/default.css +++ b/app/Resources/public/css/themes/steel_grey/default.css @@ -32,12 +32,19 @@ html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Open Sans', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #666666; } diff --git a/app/Resources/public/css/themes/tasty_olive/default.css b/app/Resources/public/css/themes/tasty_olive/default.css index f709cb8702..2afde8574b 100644 --- a/app/Resources/public/css/themes/tasty_olive/default.css +++ b/app/Resources/public/css/themes/tasty_olive/default.css @@ -32,12 +32,19 @@ html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + position: relative; } body { - margin: 0; + margin: 0 0 60px; font-family: 'Open Sans', sans-serif; line-height: 1.72222; } +body > main footer.footer { + bottom: 0; + left: 0; + position: absolute; + right: 0; +} a{ color: #666666; } diff --git a/plugin/bbb/lib/bbb_plugin.class.php b/plugin/bbb/lib/bbb_plugin.class.php index cc69e8fe9c..1a0f0e59bd 100755 --- a/plugin/bbb/lib/bbb_plugin.class.php +++ b/plugin/bbb/lib/bbb_plugin.class.php @@ -360,7 +360,9 @@ class BBBPlugin extends Plugin $destinationDir = api_get_path(SYS_CODE_PATH).'img/icons/'; foreach ($iconsList as $icon) { $dest = $destinationDir.$icon; - unlink($dest); + if (is_file($dest)) { + @unlink($dest); + } } } } diff --git a/plugin/google_meet/src/google_meet_plugin.class.php b/plugin/google_meet/src/google_meet_plugin.class.php index 982ba2a1c9..da2301219e 100644 --- a/plugin/google_meet/src/google_meet_plugin.class.php +++ b/plugin/google_meet/src/google_meet_plugin.class.php @@ -146,7 +146,9 @@ class GoogleMeetPlugin extends Plugin $destinationDir = api_get_path(SYS_CODE_PATH).'img/icons/'; foreach ($iconsList as $icon) { $dest = $destinationDir.$icon; - unlink($dest); + if (is_file($dest)) { + @unlink($dest); + } } } diff --git a/plugin/mindmap/mindmap_plugin.class.php b/plugin/mindmap/mindmap_plugin.class.php index e1f56f3f6e..15db33ee37 100644 --- a/plugin/mindmap/mindmap_plugin.class.php +++ b/plugin/mindmap/mindmap_plugin.class.php @@ -100,7 +100,9 @@ class MindmapPlugin extends Plugin $destinationDir = api_get_path(SYS_CODE_PATH).'img/icons/'; foreach ($iconsList as $icon) { $dest = $destinationDir.$icon; - unlink($dest); + if (is_file($dest)) { + @unlink($dest); + } } // Deleting course settings and course home icons diff --git a/plugin/xapi/src/Entity/LrsAuth.php b/plugin/xapi/src/Entity/LrsAuth.php index fe74737044..77c14f7d00 100644 --- a/plugin/xapi/src/Entity/LrsAuth.php +++ b/plugin/xapi/src/Entity/LrsAuth.php @@ -2,6 +2,8 @@ /* For licensing terms, see /license.txt */ +namespace Chamilo\PluginBundle\Entity\XApi; + use Doctrine\ORM\Mapping as ORM; /** diff --git a/plugin/xapi/src/Entity/ToolLaunch.php b/plugin/xapi/src/Entity/ToolLaunch.php index 099e3481cd..28ee0d2179 100644 --- a/plugin/xapi/src/Entity/ToolLaunch.php +++ b/plugin/xapi/src/Entity/ToolLaunch.php @@ -21,7 +21,7 @@ class ToolLaunch /** * @var int * - * @ORM\Column(type="integer") + * @ORM\Column(type="integer", name="id") * @ORM\Id() * @ORM\GeneratedValue() */ diff --git a/plugin/xapi/src/XApiPlugin.php b/plugin/xapi/src/XApiPlugin.php index 1797ebd921..d85af9d1d3 100644 --- a/plugin/xapi/src/XApiPlugin.php +++ b/plugin/xapi/src/XApiPlugin.php @@ -2,6 +2,7 @@ /* For licensing terms, see /license.txt */ +use Chamilo\PluginBundle\Entity\XApi\LrsAuth; use Chamilo\PluginBundle\Entity\XApi\SharedStatement; use Chamilo\PluginBundle\Entity\XApi\ToolLaunch; use Doctrine\ORM\EntityManager; @@ -331,18 +332,19 @@ class XApiPlugin extends Plugin implements HookPluginInterface { $iso = self::findLanguageIso($languageMap->languageTags(), $language); - if (isset($languageMap[$iso])) { - return $languageMap[$iso]; - } + $text = current($languageMap); - if (isset($languageMap['und'])) { - return $languageMap['und']; + if (isset($languageMap[$iso])) { + $text = trim($languageMap[$iso]); + } elseif (isset($languageMap['und'])) { + $text = $languageMap['und']; } - return array_pop($languageMap); + return $text; } /** + * @param array $haystack * @param string $needle * * @return string @@ -359,7 +361,7 @@ class XApiPlugin extends Plugin implements HookPluginInterface } } - return 'en'; + return $haystack[0]; } public function generateLaunchUrl( diff --git a/plugin/xapi/tincan/stats.php b/plugin/xapi/tincan/stats.php index 2b46deea35..46e8875c58 100644 --- a/plugin/xapi/tincan/stats.php +++ b/plugin/xapi/tincan/stats.php @@ -85,10 +85,12 @@ $students = CourseManager::get_student_list_from_course_code( $content = ''; $content .= '