Fix legacy PHP code, add more files to psalm.xml

pull/3924/head
Julio Montoya 4 years ago
parent 38641a14c5
commit 95aea79d62
  1. 7
      psalm.xml
  2. 3
      public/main/admin/user_add.php
  3. 3
      public/main/admin/user_edit.php
  4. 3
      public/main/admin/user_list_consent.php
  5. 3
      public/main/course_progress/index.php
  6. 6
      public/main/coursecopy/import_backup.php
  7. 3
      public/main/exercise/TestCategory.php
  8. 4
      public/main/exercise/category.php
  9. 10
      public/main/exercise/exercise.class.php
  10. 2
      public/main/exercise/export/exercise_import.inc.php
  11. 10
      public/main/exercise/fill_blanks.class.php
  12. 3
      public/main/exercise/question_create.php
  13. 2
      public/main/exercise/tests_category.php
  14. 3
      public/main/inc/lib/agenda.lib.php
  15. 12
      public/main/inc/lib/api.lib.php
  16. 34
      public/main/inc/lib/course_description.lib.php
  17. 10
      public/main/inc/lib/display.lib.php
  18. 2
      public/main/inc/lib/events.lib.php
  19. 3
      public/main/inc/lib/exercise.lib.php
  20. 14
      public/main/inc/lib/export.lib.inc.php
  21. 7
      public/main/inc/lib/extra_field.lib.php
  22. 2
      public/main/inc/lib/formvalidator/FormValidator.class.php
  23. 3
      public/main/inc/lib/gradebook.lib.php
  24. 2
      public/main/inc/lib/pear/HTML/QuickForm/button.php
  25. 6
      public/main/inc/lib/tracking.lib.php
  26. 2
      public/main/lp/learnpath.class.php
  27. 2
      public/main/lp/lp_add_audio.php
  28. 2
      public/main/lp/lp_edit_item_prereq.php
  29. 2
      public/main/lp/lp_final_item.php
  30. 4
      public/main/lp/lp_list_search.php
  31. 4
      public/main/lp/lp_view.php
  32. 3
      public/main/mySpace/access_details.php
  33. 3
      public/main/mySpace/users.php
  34. 4
      public/main/survey/survey.php
  35. 9
      public/main/ticket/new_ticket.php
  36. 3
      public/main/tracking/lp_results_by_user.php
  37. 6
      public/main/tracking/question_course_report.php
  38. 3
      public/plugin/buycourses/src/buycourses.ajax.php
  39. 6
      public/plugin/customcertificate/src/index.php

@ -63,7 +63,7 @@
<file name="public/main/inc/lib/agenda.lib.php"/>
<file name="public/main/inc/lib/AnnouncementEmail.php"/>
<file name="public/main/inc/lib/AnnouncementManager.php"/>
<!-- <file name="public/main/inc/lib/api.lib.php"/>-->
<file name="public/main/inc/lib/api.lib.php"/>
<file name="public/main/inc/lib/array.lib.php"/>
<file name="public/main/inc/lib/attendance.lib.php"/>
<file name="public/main/inc/lib/auth.lib.php"/>
@ -86,7 +86,7 @@
<!-- <file name="public/main/inc/lib/exercise.lib.php"/>-->
<file name="public/main/inc/lib/exercise_show_functions.lib.php"/>
<file name="public/main/inc/lib/ExerciseCategoryManager.php"/>
<!-- <file name="public/main/inc/lib/export.lib.inc.php"/>-->
<file name="public/main/inc/lib/export.lib.inc.php"/>
<file name="public/main/inc/lib/extra_field.lib.php"/>
<file name="public/main/inc/lib/extra_field_option.lib.php"/>
@ -165,6 +165,8 @@
<directory name="public/main/inc/lib/search" />
<directory name="public/main/inc/lib/svg-edit" />
<directory name="public/main/inc/lib/zombie" />
<directory name="public/main/exercise/export/qti2" />
<file name="public/main/lp/openoffice_presentation.class.php"/>
<file name="public/main/lp/openoffice_document.class.php"/>
@ -187,6 +189,7 @@
<file name="public/main/admin/ldap_*"/>
<file name="public/main/admin/special_exports.php"/>
<file name="public/main/exercise/admin.php"/>
<file name="src/CoreBundle/Controller/EditorController.php"/>
<file name="src/CoreBundle/Controller/ResourceController.php"/>

@ -235,8 +235,7 @@ $status[SESSIONADMIN] = get_lang('Sessions administrator');
$status[STUDENT_BOSS] = get_lang('Student\'s superior');
$status[INVITEE] = get_lang('Invitee');
$form->addElement(
'select',
$form->addSelect(
'status',
get_lang('Profile'),
$status,

@ -241,8 +241,7 @@ $status[SESSIONADMIN] = get_lang('Sessions administrator');
$status[STUDENT_BOSS] = get_lang('Student\'s superior');
$status[INVITEE] = get_lang('Invitee');
$form->addElement(
'select',
$form->addSelect(
'status',
get_lang('Profile'),
$status,

@ -574,8 +574,7 @@ $status_options[DRH] = get_lang('Human Resources Manager');
$status_options[SESSIONADMIN] = get_lang('Sessions administrator');
$status_options[PLATFORM_ADMIN] = get_lang('Administrator');
$form->addElement(
'select',
$form->addSelect(
'keyword_status',
get_lang('Profile'),
$status_options

@ -1071,8 +1071,7 @@ switch ($action) {
}
if (count($attendance_select) > 1) {
$form->addElement(
'select',
$form->addSelect(
'attendance_select',
get_lang('Attendances'),
$attendance_select,

@ -180,12 +180,10 @@ if (Security::check_token('post') && ('course_select_form' === $action || 'full_
foreach ($backups as $index => $backup) {
$options[$backup['file']] = $backup['course_code'].' ('.$backup['date'].')';
}
$form->addElement(
'select',
$form->addSelect(
'backup_server',
'',
$options,
'style="margin-left: 50px;"'
$options
);
$form->addElement(
'html',

@ -923,8 +923,7 @@ class TestCategory
'1' => get_lang('Visible'),
'0' => get_lang('Hidden'),
];
$form->addElement(
'select',
$form->addSelect(
'visibility',
get_lang('Visibility'),
$options

@ -99,7 +99,7 @@ switch ($action) {
} else {
$actions = '<a href="'.$url.'">'.
Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
$content .= Display::toolbarAction('toolbar', [$actions]);
$content = Display::toolbarAction('toolbar', [$actions]);
$form->addElement('hidden', 'sec_token');
$form->setConstants(['sec_token' => $token]);
$content .= $form->returnForm();
@ -123,7 +123,7 @@ switch ($action) {
} else {
$actions = '<a href="'.$url.'">'.
Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
$content .= Display::toolbarAction('toolbar', [$actions]);
$content = Display::toolbarAction('toolbar', [$actions]);
$form->addElement('hidden', 'sec_token');
$form->setConstants(['sec_token' => $token]);
$content .= $form->returnForm();

@ -2036,8 +2036,7 @@ class Exercise
//EX_Q_SELECTION_CATEGORIES_ORDERED_BY_PARENT_QUESTIONS_RANDOM => get_lang('OrderedCategoriesByParentWithQuestionsRandom'),
];
$form->addElement(
'select',
$form->addSelect(
'question_selection_type',
[get_lang('Question selection type')],
$option,
@ -2107,8 +2106,7 @@ class Exercise
$option = range(0, $max);
$option[0] = get_lang('No');
$option[-1] = get_lang('All');
$form->addElement(
'select',
$form->addSelect(
'randomQuestions',
[
get_lang('Random questions'),
@ -3911,7 +3909,7 @@ class Exercise
}
}
} else {
$studentChoice = isset($choice[$answerAutoId]) ? $choice[$answerAutoId] : null;
$studentChoice = $choice[$answerAutoId] ?? null;
if (1 == $answerCorrect) {
$real_answers[$answerId] = false;
if ($studentChoice) {
@ -5729,7 +5727,7 @@ class Exercise
// Save the score attempts
if (1) {
//getting the answer 1 or 0 comes from exercise_submit_modal.php
$final_answer = isset($hotspot_delineation_result[1]) ? $hotspot_delineation_result[1] : '';
$final_answer = $hotspot_delineation_result[1] ?? '';
if (0 == $final_answer) {
$questionScore = 0;
}

@ -536,7 +536,7 @@ function parseQti2($xmlData)
}
if ('inlineChoiceInteraction' === $childNode->nodeName) {
$currentQuestionItemBody .= '**claroline_start**'.$childNode->attr('responseIdentifier')
$currentQuestionItemBody .= '**claroline_start**'.$childNode->getAttribute('responseIdentifier')
.'**claroline_end**';
continue;

@ -339,12 +339,16 @@ class FillBlanks extends Question
//added multiple answers
$form->addCheckBox('multiple_answer', '', get_lang('Allow answers order switches'));
$form->addElement(
'select',
$form->addSelect(
'select_separator',
get_lang('Select a blanks marker'),
self::getAllowedSeparatorForSelect(),
' id="select_separator" style="width:150px" class="form-control" onchange="changeBlankSeparator()" '
[
'id' => 'select_separator',
'style' => 'width:150px',
'class' => 'form-control',
'onchange' => 'changeBlankSeparator()',
]
);
$form->addLabel(
null,

@ -32,8 +32,7 @@ $question_list_options = [];
foreach ($question_list as $key => $value) {
$question_list_options[$key] = addslashes(get_lang($value[1]));
}
$form->addElement(
'select',
$form->addSelect(
'question_type_hidden',
get_lang('Question type'),
$question_list_options,

@ -64,7 +64,7 @@ switch ($action) {
if (!empty($categories)) {
foreach ($categories as $category) {
$export[] = [$category['title'], $category['description']];
$export[] = [$category->getTitle(), $category->getDescription()];
}
}

@ -2134,8 +2134,7 @@ class Agenda
'html',
'<div id="options2" style="display:none">'
);
$form->addElement(
'select',
$form->addSelect(
'repeat_type',
get_lang('Repeat type'),
self::getRepeatTypes()

@ -853,7 +853,7 @@ function api_get_path($path = '', $configuration = [])
global $virtualChamilo;
if (!empty($virtualChamilo)) {
$paths[SYS_ARCHIVE_PATH] = api_add_trailing_slash($virtualChamilo[SYS_ARCHIVE_PATH]);
$paths[SYS_UPLOAD_PATH] = api_add_trailing_slash($virtualChamilo[SYS_UPLOAD_PATH]);
//$paths[SYS_UPLOAD_PATH] = api_add_trailing_slash($virtualChamilo[SYS_UPLOAD_PATH]);
//$paths[$root_web][WEB_UPLOAD_PATH] = api_add_trailing_slash($virtualChamilo[WEB_UPLOAD_PATH]);
$paths[WEB_ARCHIVE_PATH] = api_add_trailing_slash($virtualChamilo[WEB_ARCHIVE_PATH]);
//$paths[$root_web][WEB_COURSE_PATH] = api_add_trailing_slash($virtualChamilo[WEB_COURSE_PATH]);
@ -3767,14 +3767,14 @@ function api_is_allowed($tool, $action, $task_id = 0)
// Getting the permissions of this user.
if (0 == $task_id) {
$user_permissions = get_permissions('user', $_user['user_id']);
$_SESSION['total_permissions'][$_course['code']] = $user_permissions;
//$user_permissions = get_permissions('user', $_user['user_id']);
//$_SESSION['total_permissions'][$_course['code']] = $user_permissions;
}
// Getting the permissions of the task.
if (0 != $task_id) {
$task_permissions = get_permissions('task', $task_id);
/* !!! */ $_SESSION['total_permissions'][$_course['code']] = $task_permissions;
//$task_permissions = get_permissions('task', $task_id);
//$_SESSION['total_permissions'][$_course['code']] = $task_permissions;
}
}
@ -7965,7 +7965,7 @@ function api_unserialize_content($type, $serialized, $ignoreErrors = false)
scormOrganization::class,
scormResource::class,
Link::class,
LpItem::class,
//LpItem::class,
];
break;
case 'course':

@ -79,28 +79,6 @@ class CourseDescription
$qb = $repo->getResourcesByCourse($course, $session);
return $qb->getQuery()->getResult();
/*$table = Database::get_course_table(TABLE_COURSE_DESCRIPTION);
$condition_session = api_get_session_condition(
$this->session_id,
true,
true
);
if (empty($course_id)) {
return [];
}
$sql = "SELECT * FROM $table
ORDER BY iid ";
$rs = Database::query($sql);
$data = [];
while ($description = Database::fetch_array($rs)) {
$data['descriptions'][$description['iid']] = $description;
}
return $data;*/
}
/**
@ -192,7 +170,6 @@ class CourseDescription
public function get_max_description_type()
{
$table = Database::get_course_table(TABLE_COURSE_DESCRIPTION);
$course_id = api_get_course_int_id();
$sql = "SELECT MAX(description_type) as MAX
FROM $table
@ -274,17 +251,6 @@ class CourseDescription
]
);
if ($this->id > 0) {
// Insert into item_property
api_item_property_update(
api_get_course_info(),
TOOL_COURSE_DESCRIPTION,
$this->id,
'CourseDescriptionUpdated',
api_get_user_id()
);
}
return 1;
}

@ -251,13 +251,13 @@ class Display
$tableName = 'tablename',
$tableId = ''
) {
$column = isset($sorting_options['column']) ? $sorting_options['column'] : 0;
$default_items_per_page = isset($paging_options['per_page']) ? $paging_options['per_page'] : 20;
$column = $sorting_options['column'] ?? 0;
$default_items_per_page = $paging_options['per_page'] ?? 20;
$table = new SortableTableFromArray($content, $column, $default_items_per_page, $tableName, null, $tableId);
if (is_array($query_vars)) {
$table->set_additional_parameters($query_vars);
}
if ('table' == $style) {
if ('table' === $style) {
if (is_array($header) && count($header) > 0) {
foreach ($header as $index => $header_item) {
$table->set_header(
@ -389,9 +389,9 @@ class Display
$elementCount = 0
) {
$column = 0;
$default_items_per_page = isset($paging_options['per_page']) ? $paging_options['per_page'] : 20;
$default_items_per_page = $paging_options['per_page'] ?? 20;
$table = new SortableTableFromArray($content, $column, $default_items_per_page, $name);
$table->total_number_of_items = intval($elementCount);
$table->total_number_of_items = (int) $elementCount;
if (is_array($query_vars)) {
$table->set_additional_parameters($query_vars);
}

@ -1,4 +1,5 @@
<?php
/* See license terms in /license.txt */
use Chamilo\CoreBundle\Component\Utils\ChamiloApi;
@ -2343,7 +2344,6 @@ class Event
}
if (Tracking::minimumTimeAvailable($sessionId, $courseId)) {
$workId = (int) $workId;
$sql = "SELECT id FROM track_e_access_complete
WHERE
tool = '".TOOL_STUDENTPUBLICATION."' AND

@ -1651,6 +1651,8 @@ HOTSPOT;
public static function showTestsWhereQuestionIsUsed(int $questionId, int $excludeTestId = 0)
{
$questionId = (int) $questionId;
$excludeTestId = (int) $excludeTestId;
$sql = "SELECT qz.title quiz_title,
c.title course_title,
s.name session_name,
@ -1665,7 +1667,6 @@ HOTSPOT;
(qz.session_id = s.id OR qz.session_id = 0) AND
qq.quiz_id = qz.iid AND ";
if (!empty($excludeTestId)) {
$excludeTestId = (int) $excludeTestId;
$sql .= " qz.iid != $excludeTestId AND ";
}
$sql .= " qq.question_id = $questionId

@ -1,9 +1,10 @@
<?php
/* See license terms in /license.txt */
use Chamilo\CoreBundle\Component\Editor\Connector;
use MediaAlchemyst\Alchemyst;
use MediaAlchemyst\DriversContainer;
//use Chamilo\CoreBundle\Component\Editor\Connector;
//use MediaAlchemyst\Alchemyst;
//use MediaAlchemyst\DriversContainer;
use Neutron\TemporaryFilesystem\Manager;
use Neutron\TemporaryFilesystem\TemporaryFilesystem;
use Sonata\Exporter\Handler;
@ -213,9 +214,8 @@ class Export
$table->updateRowAttributes($row, $row % 2 ? 'class="row_even"' : 'class="row_odd"', true);
$row++;
}
$table_tp_html = $table->toHtml();
return $table_tp_html;
return $table->toHtml();
}
/**
@ -236,7 +236,7 @@ class Export
}
if (!empty($html)) {
$fs = new Filesystem();
/*$fs = new Filesystem();
$paths = [
'root_sys' => api_get_path(SYS_PATH),
'path.temp' => api_get_path(SYS_ARCHIVE_PATH),
@ -279,7 +279,7 @@ class Export
} catch (Exception $e) {
// error_log($e->getMessage());
}
}
}*/
}
}
}

@ -1193,8 +1193,7 @@ class ExtraField extends Model
$options[$optionDetails['option_value']] = $optionDetails['display_text'];
}
}
$form->addElement(
'select',
$form->addSelect(
'extra_'.$variable,
$field_details['display_text'],
$options,
@ -1436,12 +1435,10 @@ class ExtraField extends Model
break;
case self::FIELD_TYPE_TIMEZONE:
$form->addElement(
'select',
$form->addSelect(
'extra_'.$variable,
$field_details['display_text'],
api_get_timezones(),
''
);
if ($freezeElement) {
$form->freeze('extra_'.$variable);

@ -892,7 +892,7 @@ EOT;
*
* @return HTML_QuickForm_select
*/
public function addSelect($name, $label, $options = [], $attributes = [])
public function addSelect(string $name, $label, array $options = [], array $attributes = [])
{
return $this->addElement('select', $name, $label, $options, $attributes);
}

@ -178,8 +178,7 @@ class Gradebook extends Model
foreach ($skills as $skill) {
$clean_skill_list[$skill['id']] = $skill['name'];
}
$form->addElement(
'select',
$form->addSelect(
'skill',
get_lang('Skills'),
$clean_skill_list,

@ -91,7 +91,7 @@ class HTML_QuickForm_button extends HTML_QuickForm_input
$icon = $this->getIcon();
if (!empty($icon)) {
$icon = '<em class="mr-1 ' . $this->getIcon() . '"></em> ';
$icon = '<em class="'.$this->getIcon().'"></em> ';
}
$class = $this->getClass().' '.$this->getStyle().' '.$this->getSize();

@ -6272,15 +6272,13 @@ class Tracking
public static function setUserSearchForm($form)
{
$form->addElement('text', 'keyword', get_lang('Keyword'));
$form->addElement(
'select',
$form->addSelect(
'active',
get_lang('Status'),
[1 => get_lang('active'), 0 => get_lang('inactive')]
);
$form->addElement(
'select',
$form->addSelect(
'sleeping_days',
get_lang('Inactive days'),
[

@ -8496,7 +8496,7 @@ class learnpath
if (!empty($itemList['thread'])) {
$threadList = [];
$em = Database::getManager();
$repo = $em->getRepository('ChamiloCourseBundle:CForumThread');
$repo = Container::getForumThreadRepository();
foreach ($itemList['thread'] as $threadId) {
/** @var CForumThread $thread */
$thread = $repo->find($threadId);

@ -136,7 +136,7 @@ $tpl->assign('filename', $lp_item->get_title().'_nano.wav');
$tpl->assign('enable_record_audio', 'true' === api_get_setting('enable_record_audio'));
$tpl->assign('cur_dir_path', '/audio');
$tpl->assign('lp_item_id', $lp_item_id);
$tpl->assign('lp_dir', api_remove_trailing_slash($lpPathInfo['dir']));
//$tpl->assign('lp_dir', api_remove_trailing_slash($lpPathInfo['dir']));
$recordVoiceForm .= $tpl->fetch('@ChamiloCore/LearnPath/record_voice.html.twig');
$form->addElement('header', '<small class="text-muted">'.get_lang('Or').'</small> '.get_lang('AudioFile'));

@ -21,7 +21,7 @@ $is_allowed_to_edit = api_is_allowed_to_edit(null, true);
$isStudentView = isset($_REQUEST['isStudentView']) ? (int) $_REQUEST['isStudentView'] : null;
$learnpath_id = isset($_REQUEST['lp_id']) ? (int) $_REQUEST['lp_id'] : null;
$submit = isset($_POST['submit_button']) ? $_POST['submit_button'] : null;
$submit = $_POST['submit_button'] ?? null;
/* MAIN CODE */
if (!$is_allowed_to_edit || $isStudentView) {

@ -230,7 +230,7 @@ function generateLPFinalItemTemplate(
function generateLPFinalItemTemplateBadgeLinks($userId, $courseId, $sessionId = 0)
{
$em = Database::getManager();
$skillRelUser = new SkillRelUser();
$skillRelUser = new SkillRelUserModel();
$userSkills = $skillRelUser->getUserSkills($userId, $courseId, $sessionId);
$skillList = '';
$badgeLink = '';

@ -111,8 +111,8 @@ if (count($term_array)) {
}
if ($query) {
list($count, $results) = chamilo_query_query(
api_convert_encoding($query, 'UTF-8', $charset),
[$count, $results] = chamilo_query_query(
$query,
0,
1000,
$fixed_queries

@ -333,7 +333,7 @@ $lp_theme_css = $lp->getTheme();
// Setting up the CSS theme if exists.
if (!empty($lp_theme_css) && !empty($mycourselptheme) && -1 != $mycourselptheme && 1 == $mycourselptheme) {
global $lp_theme_css;
//global $lp_theme_css;
} else {
$lp_theme_css = $my_style;
}
@ -364,7 +364,7 @@ if (Database::num_rows($res_media) > 0) {
$is_allowed_to_edit = api_is_allowed_to_edit(false, true, true, false);
global $interbreadcrumb;
//global $interbreadcrumb;
if ($is_allowed_to_edit) {
$interbreadcrumb[] = [
'url' => api_get_self().'?action=list&isStudentView=false&'.api_get_cidreq(true, true, 'course'),

@ -46,8 +46,7 @@ $form = new FormValidator(
);
$form->addElement('text', 'from', get_lang('From'), ['id' => 'date_from']);
$form->addElement('text', 'to', get_lang('Until'), ['id' => 'date_to']);
$form->addElement(
'select',
$form->addSelect(
'type',
get_lang('Type'),
['day' => get_lang('Day'), 'month' => get_lang('Month')],

@ -334,8 +334,7 @@ $form = new FormValidator(
'get',
$webCodePath.'mySpace/users.php'
);
$form->addElement(
'select',
$form->addSelect(
'status',
get_lang('Status'),
[

@ -370,10 +370,10 @@ while ($row = Database::fetch_array($result, 'ASSOC')) {
echo ' </td>';
$question_counter++;
if ($is_survey_type_1) {
/*if ($is_survey_type_1) {
echo '<td>'.((0 == $row['survey_group_pri']) ? get_lang('Secondary') : get_lang('Primary')).'</td>';
echo '<td>'.((0 == $row['survey_group_pri']) ? $groups[$row['survey_group_sec1']].'-'.$groups[$row['survey_group_sec2']] : $groups[$row['survey_group_pri']]).'</td>';
}
}*/
echo '</tr>';
}

@ -317,16 +317,14 @@ $form->addLabel(
)
);
$form->addElement(
'select',
$form->addSelect(
'status_id',
get_lang('Status'),
$statusList,
$statusAttributes
);
$form->addElement(
'select',
$form->addSelect(
'priority_id',
get_lang('Priority'),
$priorityList,
@ -336,8 +334,7 @@ $form->addElement(
]
);
$form->addElement(
'select',
$form->addSelect(
'source_id',
get_lang('Source'),
$sourceList,

@ -47,8 +47,7 @@ foreach ($course_list as $data) {
}
$form = new FormValidator('search_simple', 'POST', '', '', null, false);
$form->addElement(
'select',
$form->addSelect(
'course_code',
get_lang('Course'),
$new_course_select

@ -59,15 +59,13 @@ foreach ($session_list as $sesion_item) {
}
$form = new FormValidator('search_simple', 'POST', '', '', null, false);
$form->addElement(
'select',
$form->addSelect(
'session_id',
get_lang('Course sessions'),
$my_session_list,
['id' => 'session_id', 'onchange' => 'load_courses();']
);
$form->addElement(
'select',
$form->addSelect(
'course_code',
get_lang('Courses'),
$course_select_list

@ -472,8 +472,7 @@ switch ($action) {
} else {
if (BuyCoursesPlugin::SERVICE_TYPE_SESSION == $nodeType) {
$nodeType = get_lang('Session');
/** @var Session $session */
$session = $em->find('ChamiloCoreBundle:Session', $serviceSale['node_id']);
$session = api_get_session_entity($serviceSale['node_id']);
$nodeName = $session ? $session->getName() : null;
} else {
if (BuyCoursesPlugin::SERVICE_TYPE_LP_FINAL_ITEM == $nodeType) {

@ -897,15 +897,13 @@ while ($i < 298) {
$marginOptions[$i] = $i.' mm';
$i++;
}
$form->addElement(
'select',
$form->addSelect(
'margin_left',
get_lang('MarginLeft'),
$marginOptions,
['cols-size' => [4, 8, 0]]
);
$form->addElement(
'select',
$form->addSelect(
'margin_right',
get_lang('MarginRight'),
$marginOptions,

Loading…
Cancel
Save