diff --git a/documentation/changelog.html b/documentation/changelog.html
index d68108060db..122b52327ec 100755
--- a/documentation/changelog.html
+++ b/documentation/changelog.html
@@ -48,7 +48,7 @@
Chamilo Changelog
- Chamilo 1.10.2 - Alsted, 21st of December 2015
+ Chamilo 1.10.2 - Alsted, 22nd of December 2015
Release notes - summary
Chamilo 1.10.2 is a minor, bugfix version of the 1.10.x branch, with a few new features and bugfixes on top of 1.10.0. Notably, this version enables the migration from 1.9.x to 1.10.2 (many bugs were reported in the migration from 1.9.x to 1.10.0, which were fixed within the 2 months to this minor version).
Release name
diff --git a/main/document/showinframes.php b/main/document/showinframes.php
index dce3f188a8f..76d0f7d3990 100755
--- a/main/document/showinframes.php
+++ b/main/document/showinframes.php
@@ -104,7 +104,7 @@
}
$pathinfo = pathinfo($header_file);
-$jplayer_supported_files = array('mp4', 'ogv','flv');
+$jplayer_supported_files = array('mp4', 'ogv', 'flv', 'm4v');
$jplayer_supported = false;
if (in_array(strtolower($pathinfo['extension']), $jplayer_supported_files)) {
@@ -250,33 +250,40 @@ function init() {
}
$execute_iframe = true;
-
if ($jplayer_supported) {
$extension = api_strtolower($pathinfo['extension']);
+ if ($extension == 'mp4') {
+ $extension = 'm4v';
+ }
$js_path = api_get_path(WEB_LIBRARY_PATH).'javascript/';
$htmlHeadXtra[] = ' ';
$htmlHeadXtra[] = '';
- $jquery = ' $("#jquery_jplayer_1").jPlayer({
- ready: function() {
- $(this).jPlayer("setMedia", {
- '.$extension.' : "'.$document_data['direct_url'].'"
- });
- },
- errorAlerts: false,
- warningAlerts: false,
- swfPath: "'.$js_path.'jquery-jplayer/jplayer/",
- //supplied: "m4a, oga, mp3, ogg, wav",
- supplied: "'.$extension.'",
- //wmode: "window",
- solution: "flash, html", // Do not change this setting
- cssSelectorAncestor: "#jp_container_1",
- });';
+ $jquery = '
+ $("#jquery_jplayer_1").jPlayer({
+ ready: function() {
+ $(this).jPlayer("setMedia", {
+ '.$extension.' : "'.$document_data['direct_url'].'"
+ });
+ },
+ cssSelectorAncestor: "#jp_container_1",
+ swfPath: "'.$js_path.'jquery-jplayer/jplayer/",
+ supplied: "'.$extension.'",
+ useStateClassSkin: true,
+ autoBlur: false,
+ keyEnabled: false,
+ remainingDuration: true,
+ toggleDuration: true,
+ solution: "html, flash",
+ errorAlerts: false,
+ warningAlerts: false
+ });
+ ';
$htmlHeadXtra[] = '';
$execute_iframe = false;
@@ -356,9 +363,13 @@ function init() {
echo '';
if ($jplayer_supported) {
- echo '';
+ echo '
';
+ echo '
';
echo DocumentManager::generate_video_preview($document_data);
echo '
';
+
+ // media_element blocks jplayer disable it
+ Display::$global_template->assign('show_media_element', 0);
}
if ($is_freemind_available) {
@@ -442,7 +453,7 @@ function getMap(map){
$content = Security::remove_XSS(file_get_contents($file_url_sys));
echo $content;
} else {
- echo '
';
+ echo '
';
}
}
Display::display_footer();
diff --git a/main/inc/lib/display.lib.php b/main/inc/lib/display.lib.php
index 7c87088dd9f..077449524cb 100755
--- a/main/inc/lib/display.lib.php
+++ b/main/inc/lib/display.lib.php
@@ -20,7 +20,7 @@
*/
class Display
{
- /* The main template*/
+ /** @var Template */
public static $global_template;
public static $preview_style = null;
@@ -756,12 +756,12 @@ public static function return_icon(
}
$icon = api_get_cdn_path($icon);
-
+
if ($return_only_path) {
return $icon;
-
+
}
-
+
$img = self::img($icon, $alt_text, $additional_attributes);
if (SHOW_TEXT_NEAR_ICONS == true and !empty($alt_text)) {
if ($show_text) {
diff --git a/main/inc/lib/document.lib.php b/main/inc/lib/document.lib.php
index 763616cd4d8..887daf81b14 100755
--- a/main/inc/lib/document.lib.php
+++ b/main/inc/lib/document.lib.php
@@ -3199,15 +3199,15 @@ static function generate_media_preview($i, $type = 'simple')
* @param array $document_data
* @return string
*/
- static function generate_video_preview($document_data = array())
+ public static function generate_video_preview($document_data = array())
{
+ //
play
$html = '
-
+
@@ -3215,30 +3215,27 @@ static function generate_video_preview($document_data = array())
-
+
+
-
+
+ play
+ stop
+
+
+
+ repeat
+ full screen
+
-
-
- ' . $document_data['title'] . '
-
+
diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php
index a667ddeca90..492ab110980 100755
--- a/main/newscorm/learnpath.class.php
+++ b/main/newscorm/learnpath.class.php
@@ -1104,7 +1104,7 @@ public function delete($courseInfo = null, $id = null, $delete = 'keep')
*/
public function delete_children_items($id)
{
- $course_id = api_get_course_int_id();
+ $course_id = $this->course_info['real_id'];
if ($this->debug > 0) {
error_log('New LP - In learnpath::delete_children_items(' . $id . ')', 0);
}
@@ -4534,7 +4534,7 @@ public function set_name($name = null)
$this->name = $name;
$lp_table = Database :: get_course_table(TABLE_LP_MAIN);
$lp_id = $this->get_id();
- $course_id = api_get_course_int_id();
+ $course_id = $this->course_info['real_id'];
$sql = "UPDATE $lp_table SET
name = '" . Database::escape_string($this->name). "'
WHERE c_id = ".$course_id." AND id = '$lp_id'";
@@ -5983,18 +5983,39 @@ public function create_document($courseInfo, $content = '', $title = '', $extens
$tmp_filename = $filename . '_' . ++ $i;
$filename = $tmp_filename . '.'.$extension;
- $content = stripslashes($content);
-
- $content = str_replace(api_get_path(WEB_COURSE_PATH), api_get_path(REL_PATH).'courses/', $content);
+ if ($extension == 'html') {
+ $content = stripslashes($content);
+ $content = str_replace(
+ api_get_path(WEB_COURSE_PATH),
+ api_get_path(REL_PATH).'courses/',
+ $content
+ );
- // Change the path of mp3 to absolute.
+ // Change the path of mp3 to absolute.
- // The first regexp deals with :// urls.
- $content = preg_replace("|(flashvars=\"file=)([^:/]+)/|", "$1" . api_get_path(REL_COURSE_PATH) . $courseInfo['path'] . '/document/', $content);
- // The second regexp deals with audio/ urls.
- $content = preg_replace("|(flashvars=\"file=)([^/]+)/|", "$1" . api_get_path(REL_COURSE_PATH) . $courseInfo['path'] . '/document/$2/', $content);
- // For flv player: To prevent edition problem with firefox, we have to use a strange tip (don't blame me please).
- $content = str_replace('