diff --git a/main/badge/issued.php b/main/badge/issued.php
index eb4327449b..9d9caf30ad 100644
--- a/main/badge/issued.php
+++ b/main/badge/issued.php
@@ -59,8 +59,15 @@ $skillInfo = [
'courses' => []
];
+
+
// Open Graph Markup
$htmlHeadXtra[] = "
+
diff --git a/main/inc/lib/template.lib.php b/main/inc/lib/template.lib.php
index 0bd0c2f65c..cd67c0c5d6 100755
--- a/main/inc/lib/template.lib.php
+++ b/main/inc/lib/template.lib.php
@@ -976,25 +976,32 @@ class Template
$metaTitle = api_get_setting('meta_title');
if (!empty($metaTitle)) {
$socialMeta .= '' . "\n";
- $socialMeta .= '' . "\n";
- $socialMeta .= '' . "\n";
- $metaDescription = api_get_setting('meta_description');
- if (!empty($metaDescription)) {
- $socialMeta .= '' . "\n";
- }
- $metaSite = api_get_setting('meta_twitter_site');
- if (!empty($metaSite)) {
- $socialMeta .= '' . "\n";
- $metaCreator = api_get_setting('meta_twitter_creator');
- if (!empty($metaCreator)) {
- $socialMeta .= '' . "\n";
+
+ // The following code is for user badge page if the twitter:card is enable
+ $userId = isset($_GET['user']) ? intval($_GET['user']) : 0;
+ $skillId = isset($_GET['skill']) ? intval($_GET['skill']) : 0;
+
+ if (!$userId && !$skillId) {
+ $socialMeta .= '' . "\n";
+ $socialMeta .= '' . "\n";
+ $metaDescription = api_get_setting('meta_description');
+ if (!empty($metaDescription)) {
+ $socialMeta .= '' . "\n";
}
- }
- $metaImage = api_get_setting('meta_image_path');
- if (!empty($metaImage)) {
- if (is_file(api_get_path(SYS_PATH) . $metaImage)) {
- $path = api_get_path(WEB_PATH) . $metaImage;
- $socialMeta .= '' . "\n";
+ $metaSite = api_get_setting('meta_twitter_site');
+ if (!empty($metaSite)) {
+ $socialMeta .= '' . "\n";
+ $metaCreator = api_get_setting('meta_twitter_creator');
+ if (!empty($metaCreator)) {
+ $socialMeta .= '' . "\n";
+ }
+ }
+ $metaImage = api_get_setting('meta_image_path');
+ if (!empty($metaImage)) {
+ if (is_file(api_get_path(SYS_PATH) . $metaImage)) {
+ $path = api_get_path(WEB_PATH) . $metaImage;
+ $socialMeta .= '' . "\n";
+ }
}
}
}
diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php
index 6e857d08f0..310fb7e012 100755
--- a/main/newscorm/learnpath.class.php
+++ b/main/newscorm/learnpath.class.php
@@ -5603,9 +5603,6 @@ class learnpath
$_SESSION['pathItem'] = $arrLP[$i]['path'];
}
-
-
-
if (($i % 2) == 0) {
$oddClass = 'row_odd';
} else {
@@ -6386,12 +6383,13 @@ class learnpath
// Get all the links.
$links = $this->get_links();
- // Get al the student publications.
+ // Get all the student publications.
$works = $this->get_student_publications();
- // Get al the forums.
+ // Get all the forums.
$forums = $this->get_forums(null, $course_code);
+ // Get the final item form (see BT#11048) .
$finish = $this->getFinalItemForm();
$headers = array(
diff --git a/main/newscorm/lp_final_item.php b/main/newscorm/lp_final_item.php
index 23d7ef825f..42e3727095 100644
--- a/main/newscorm/lp_final_item.php
+++ b/main/newscorm/lp_final_item.php
@@ -9,8 +9,8 @@ api_protect_course_script(true);
$courseCode = api_get_course_id();
$userId = api_get_user_id();
$sessionId = api_get_session_id();
-$id = isset($_GET['id']) ? $_GET['id'] : 0;
-$lpId = isset($_GET['lp_id']) ? $_GET['lp_id'] : 0;
+$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
+$lpId = isset($_GET['lp_id']) ? intval($_GET['lp_id']) : 0;
if (!$id && !$lpId) {
Display::display_warning_message(get_lang('FileNotFound'));