Skip to content

Commit c879da2

Browse files
committed
Merge branch '1.11.x' of github.com:chamilo/chamilo-lms into 1.11.x
2 parents 8b60d7d + eb2483a commit c879da2

File tree

8 files changed

+52
-22
lines changed

8 files changed

+52
-22
lines changed

main/admin/index.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,6 @@
535535
}
536536

537537
if (!api_get_configuration_value('disable_gdpr')) {
538-
539538
// Data protection
540539
$blocks['data_privacy']['icon'] = Display::return_icon(
541540
'platform.png',
@@ -549,7 +548,6 @@
549548
$blocks['data_privacy']['editable'] = false;
550549

551550
$items = [];
552-
553551
$items[] = [
554552
'url' => api_get_path(WEB_CODE_PATH).'admin/user_list_consent.php',
555553
'label' => get_lang('UserList'),

main/coursecopy/copy_course_session.php

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -294,17 +294,22 @@ function checkSelected(id_select,id_radio,id_title,id_destination) {
294294
$destination_session = $_POST['destination_session'];
295295
$origin_session = $_POST['origin_session'];
296296

297-
$course = CourseSelectForm::get_posted_course(
298-
'copy_course',
299-
$origin_session,
300-
$origin_course
301-
);
297+
if ($course_code != $origin_course) {
298+
$course = CourseSelectForm::get_posted_course(
299+
'copy_course',
300+
$origin_session,
301+
$origin_course
302+
);
302303

303-
$cr = new CourseRestorer($course);
304-
//$cr->set_file_option($_POST['same_file_name_option']);
305-
$cr->restore($destination_course, $destination_session);
306-
echo Display::return_message(get_lang('CopyFinished'), 'confirmation');
307-
display_form();
304+
$cr = new CourseRestorer($course);
305+
//$cr->set_file_option($_POST['same_file_name_option']);
306+
$cr->restore($destination_course, $destination_session);
307+
echo Display::return_message(get_lang('CopyFinished'), 'confirmation');
308+
display_form();
309+
} else {
310+
echo Display::return_message(get_lang('PleaseSelectACourse'), 'confirm');
311+
display_form();
312+
}
308313
} else {
309314
$arr_course_origin = [];
310315
$arr_course_destination = [];
@@ -333,14 +338,20 @@ function checkSelected(id_select,id_radio,id_title,id_destination) {
333338
$course_code = $arr_course_origin[0];
334339
$course_destinatination = $arr_course_destination[0];
335340

336-
$course_origin = api_get_course_info($course_code);
337-
$cb = new CourseBuilder('', $course_origin);
338-
$course = $cb->build($origin_session, $course_code, $with_base_content);
339-
$cr = new CourseRestorer($course);
340-
$cr->restore($course_destinatination, $destination_session);
341+
if ($course_code != $course_destinatination) {
342+
$course_origin = api_get_course_info($course_code);
343+
$cb = new CourseBuilder('', $course_origin);
344+
$course = $cb->build($origin_session, $course_code, $with_base_content);
345+
$cr = new CourseRestorer($course);
346+
$cr->restore($course_destinatination, $destination_session);
347+
348+
echo Display::return_message(get_lang('CopyFinished'), 'confirm');
349+
display_form();
350+
} else {
351+
echo Display::return_message(get_lang('PleaseSelectACourse'), 'confirm');
352+
display_form();
353+
}
341354
}
342-
echo Display::return_message(get_lang('CopyFinished'), 'confirm');
343-
display_form();
344355
} else {
345356
echo Display::return_message(get_lang('YouMustSelectACourseFromOriginalSession'), 'error');
346357
display_form();

main/document/showinframes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
$browser_display_title = 'Documents - '.Security::remove_XSS($_GET['cidReq']).' - '.$file;
170170
// Only admins get to see the "no frames" link in pageheader.php, so students get a header that's not so high
171171
$frameheight = 135;
172-
if ($is_courseAdmin) {
172+
if (api_is_course_admin()) {
173173
$frameheight = 165;
174174
}
175175

main/exercise/admin.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
Session::write('objQuestion', $objQuestion);
111111
}
112112
$objAnswer = Session::read('objAnswer');
113+
$_course = api_get_course_info();
113114

114115
// document path
115116
$documentPath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';

main/inc/lib/template.lib.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,9 @@ public function setCssFiles()
621621

622622
if (!empty($features) && isset($features['features'])) {
623623
foreach ($features['features'] as $feature) {
624+
if ($feature === 'vrview') {
625+
continue;
626+
}
624627
$bowerCSSFiles[] = "mediaelement/plugins/$feature/$feature.css";
625628
$defaultFeatures[] = $feature;
626629
}
@@ -771,6 +774,9 @@ public function set_js_files()
771774
$features = api_get_configuration_value('video_features');
772775
if (!empty($features) && isset($features['features'])) {
773776
foreach ($features['features'] as $feature) {
777+
if ($feature === 'vrview') {
778+
continue;
779+
}
774780
$bowerJsFiles[] = "mediaelement/plugins/$feature/$feature.js";
775781
}
776782
}

main/lp/lp_edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ function activate_end_date() {
241241
</script>';
242242
}
243243

244-
$htmlHeadXtra[] = '<script>'.$learnPath->get_js_dropdown_array()."</sript>";
244+
$htmlHeadXtra[] = '<script>'.$learnPath->get_js_dropdown_array().'</script>';
245245

246246
$defaults['publicated_on'] = !empty($publicated_on) && $publicated_on !== '0000-00-00 00:00:00'
247247
? api_get_local_time($publicated_on)

src/Chamilo/CoreBundle/Component/Editor/CkEditor/CkEditor.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ public function createHtml()
5555
public function createHtmlStyle()
5656
{
5757
$style = '';
58-
if (trim($this->value) == '<html><head><title></title></head><body></body></html>' || $this->value == '') {
58+
59+
if (trim($this->value) == '<html><head><title></title></head><body></body></html>' ||
60+
trim($this->value) == '<!DOCTYPE html><html><head><title></title></head><body></body></html>' ||
61+
$this->value == ''
62+
) {
5963
$style = api_get_css_asset('bootstrap/dist/css/bootstrap.min.css');
6064
$style .= api_get_css_asset('fontawesome/css/font-awesome.min.css');
6165
$style .= api_get_css(ChamiloApi::getEditorDocStylePath());

src/Chamilo/UserBundle/Entity/User.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2586,4 +2586,14 @@ public function setCommentedUserSkills($commentedUserSkills)
25862586

25872587
return $this;
25882588
}
2589+
2590+
/**
2591+
* @return string
2592+
*/
2593+
public function getPictureLegacy()
2594+
{
2595+
$id = $this->id;
2596+
2597+
return 'users/'.substr((string) $id, 0, 1).'/'.$id.'/'.'small_'.$this->getPictureUri();
2598+
}
25892599
}

0 commit comments

Comments
 (0)