Minor - format code

pull/2487/head
jmontoyaa 7 years ago
parent 4a324b2892
commit 1ed0a04442
  1. 21
      main/admin/course_request_accepted.php
  2. 27
      main/admin/course_request_edit.php
  3. 56
      main/admin/course_request_rejected.php
  4. 31
      main/admin/course_request_review.php
  5. 7
      main/admin/extra_field_workflow.php
  6. 6
      main/admin/filler.php
  7. 11
      main/admin/grade_models.php
  8. 4
      main/admin/gradebook_dependency.php
  9. 19
      main/admin/languages.php

@ -60,7 +60,10 @@ if ($course_validation_feature) {
}
} else {
$link_to_setting = api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Platform#course_validation';
$message = sprintf(get_lang('PleaseActivateCourseValidationFeature'), sprintf('<strong><a href="%s">%s</a></strong>', $link_to_setting, get_lang('EnableCourseValidation')));
$message = sprintf(
get_lang('PleaseActivateCourseValidationFeature'),
sprintf('<strong><a href="%s">%s</a></strong>', $link_to_setting, get_lang('EnableCourseValidation'))
);
$is_error_message = true;
}
@ -125,7 +128,15 @@ function modify_filter($id)
$result = '<a href="course_request_edit.php?id='.$id.'&caller=1">'.
Display::return_icon('edit.png', get_lang('Edit'), array('style' => 'vertical-align: middle;')).'</a>'.
'&nbsp;<a href="?delete_course_request='.$id.'">'.
Display::return_icon('delete.png', get_lang('DeleteThisCourseRequest'), array('style' => 'vertical-align: middle;', 'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('ACourseRequestWillBeDeleted'), $code), ENT_QUOTES)).'\')) return false;')).'</a>';
Display::return_icon(
'delete.png',
get_lang('DeleteThisCourseRequest'),
array(
'style' => 'vertical-align: middle;',
'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('ACourseRequestWillBeDeleted'), $code), ENT_QUOTES)).'\')) return false;',
)
).
'</a>';
return $result;
}
@ -159,8 +170,10 @@ $form->addButtonSearch(get_lang('Search'));
// The action bar.
echo '<div style="float: right; margin-top: 5px; margin-right: 5px;">';
echo ' <a href="course_request_review.php">'.Display::return_icon('course_request_pending.png', get_lang('ReviewCourseRequests')).get_lang('ReviewCourseRequests').'</a>';
echo ' <a href="course_request_rejected.php">'.Display::return_icon('course_request_rejected.gif', get_lang('RejectedCourseRequests')).get_lang('RejectedCourseRequests').'</a>';
echo ' <a href="course_request_review.php">'.
Display::return_icon('course_request_pending.png', get_lang('ReviewCourseRequests')).get_lang('ReviewCourseRequests').'</a>';
echo ' <a href="course_request_rejected.php">'.
Display::return_icon('course_request_rejected.gif', get_lang('RejectedCourseRequests')).get_lang('RejectedCourseRequests').'</a>';
echo '</div>';
echo '<div class="actions">';
$form->display();

@ -78,15 +78,15 @@ if ($course_validation_feature) {
$titular = $form->addText('tutor_name', get_lang('Professor'), null, array('size' => '60', 'disabled' => 'disabled'));
// Description of the requested course.
$form->addElement('textarea', 'description', get_lang('Description'), array('style' => 'border:#A5ACB2 solid 1px; font-family:arial,verdana,helvetica,sans-serif; font-size:12px', 'rows' => '3', 'cols' => '116'));
$form->addElement('textarea', 'description', get_lang('Description'));
$form->addRule('description', get_lang('ThisFieldIsRequired'), 'required');
// Objectives of the requested course.
$form->addElement('textarea', 'objetives', get_lang('Objectives'), array('style' => 'border:#A5ACB2 solid 1px; font-family:arial,verdana,helvetica,sans-serif; font-size:12px', 'rows' => '3', 'cols' => '116'));
$form->addElement('textarea', 'objetives', get_lang('Objectives'));
$form->addRule('objetives', get_lang('ThisFieldIsRequired'), 'required');
// Target audience of the requested course.
$form->addElement('textarea', 'target_audience', get_lang('TargetAudience'), array('style' => 'border:#A5ACB2 solid 1px; font-family:arial,verdana,helvetica,sans-serif; font-size:12px', 'rows' => '3', 'cols' => '116'));
$form->addElement('textarea', 'target_audience', get_lang('TargetAudience'));
$form->addRule('target_audience', get_lang('ThisFieldIsRequired'), 'required');
// Course language.
@ -325,21 +325,28 @@ Display :: display_header($tool_name);
if (!$course_validation_feature) {
// Disabled course validation feature - show nothing after the error message.
Display :: display_footer();
Display::display_footer();
exit;
}
// The action bar.
echo '<div class="actions">';
echo '<a href="course_list.php">'.Display::return_icon('courses.gif', get_lang('CourseList')).get_lang('CourseList').'</a>';
echo '<a href="course_request_review.php">'.Display::return_icon('course_request_pending.png', get_lang('ReviewCourseRequests')).get_lang('ReviewCourseRequests').'</a>';
echo '<a href="course_request_accepted.php">'.Display::return_icon('course_request_accepted.gif', get_lang('AcceptedCourseRequests')).get_lang('AcceptedCourseRequests').'</a>';
echo '<a href="course_request_rejected.php">'.Display::return_icon('course_request_rejected.gif', get_lang('RejectedCourseRequests')).get_lang('RejectedCourseRequests').'</a>';
echo '<a href="course_list.php">'.
Display::return_icon('courses.gif', get_lang('CourseList')).get_lang('CourseList').'</a>';
echo '<a href="course_request_review.php">'.
Display::return_icon('course_request_pending.png', get_lang('ReviewCourseRequests')).get_lang('ReviewCourseRequests').
'</a>';
echo '<a href="course_request_accepted.php">'.
Display::return_icon('course_request_accepted.gif', get_lang('AcceptedCourseRequests')).get_lang('AcceptedCourseRequests').
'</a>';
echo '<a href="course_request_rejected.php">'.
Display::return_icon('course_request_rejected.gif', get_lang('RejectedCourseRequests')).get_lang('RejectedCourseRequests').
'</a>';
echo '</div>';
if (!is_array($course_request_info)) {
// Not accessible database record - show the error message and the action bar.
Display :: display_footer();
Display::display_footer();
exit;
}
@ -347,4 +354,4 @@ if (!is_array($course_request_info)) {
$form->display();
// The footer.
Display :: display_footer();
Display::display_footer();

@ -91,7 +91,10 @@ if ($course_validation_feature) {
}
} else {
$link_to_setting = api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Platform#course_validation';
$message = sprintf(get_lang('PleaseActivateCourseValidationFeature'), sprintf('<strong><a href="%s">%s</a></strong>', $link_to_setting, get_lang('EnableCourseValidation')));
$message = sprintf(
get_lang('PleaseActivateCourseValidationFeature'),
sprintf('<strong><a href="%s">%s</a></strong>', $link_to_setting, get_lang('EnableCourseValidation'))
);
$is_error_message = true;
}
@ -150,14 +153,43 @@ function get_request_data($from, $number_of_items, $column, $direction)
/**
* Actions in the list: edit, accept, delete, request additional information.
*/
function modify_filter($id) {
function modify_filter($id)
{
$code = CourseRequestManager::get_course_request_code($id);
$result = '<a href="course_request_edit.php?id='.$id.'&caller=2">'.Display::return_icon('edit.png', get_lang('Edit'), array('style' => 'vertical-align: middle;')).'</a>'.
'&nbsp;<a href="?accept_course_request='.$id.'">'.Display::return_icon('accept.png', get_lang('AcceptThisCourseRequest'), array('style' => 'vertical-align: middle;', 'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('ANewCourseWillBeCreated'), $code), ENT_QUOTES)).'\')) return false;')).'</a>';
$result = '<a href="course_request_edit.php?id='.$id.'&caller=2">'.
Display::return_icon('edit.png', get_lang('Edit'), array('style' => 'vertical-align: middle;')).'</a>'.
'&nbsp;<a href="?accept_course_request='.$id.'">'.
Display::return_icon(
'accept.png',
get_lang('AcceptThisCourseRequest'),
array(
'style' => 'vertical-align: middle;',
'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('ANewCourseWillBeCreated'), $code), ENT_QUOTES)).'\')) return false;',
)
).
'</a>';
if (!CourseRequestManager::additional_info_asked($id)) {
$result .= '&nbsp;<a href="?request_info='.$id.'">'.Display::return_icon('request_info.gif', get_lang('AskAdditionalInfo'), array('style' => 'vertical-align: middle;', 'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('AdditionalInfoWillBeAsked'), $code), ENT_QUOTES)).'\')) return false;')).'</a>';
$result .= '&nbsp;<a href="?request_info='.$id.'">'.
Display::return_icon(
'request_info.gif',
get_lang('AskAdditionalInfo'),
array(
'style' => 'vertical-align: middle;',
'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('AdditionalInfoWillBeAsked'), $code), ENT_QUOTES)).'\')) return false;',
)
).
'</a>';
}
$result .= '&nbsp;<a href="?delete_course_request='.$id.'">'.Display::return_icon('delete.png', get_lang('DeleteThisCourseRequest'), array('style' => 'vertical-align: middle;', 'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('ACourseRequestWillBeDeleted'), $code), ENT_QUOTES)).'\')) return false;')).'</a>';
$result .= '&nbsp;<a href="?delete_course_request='.$id.'">'.
Display::return_icon(
'delete.png',
get_lang('DeleteThisCourseRequest'),
array(
'style' => 'vertical-align: middle;',
'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('ACourseRequestWillBeDeleted'), $code), ENT_QUOTES)).'\')) return false;',
)
).
'</a>';
return $result;
}
@ -192,8 +224,12 @@ $form->addButtonSearch(get_lang('Search'));
// The action bar.
echo '<div style="float: right; margin-top: 5px; margin-right: 5px;">';
echo ' <a href="course_request_review.php">'.Display::return_icon('course_request_pending.png', get_lang('ReviewCourseRequests')).get_lang('ReviewCourseRequests').'</a>';
echo ' <a href="course_request_accepted.php">'.Display::return_icon('course_request_accepted.gif', get_lang('AcceptedCourseRequests')).get_lang('AcceptedCourseRequests').'</a>';
echo ' <a href="course_request_review.php">'.
Display::return_icon('course_request_pending.png', get_lang('ReviewCourseRequests')).get_lang('ReviewCourseRequests').
'</a>';
echo ' <a href="course_request_accepted.php">'.
Display::return_icon('course_request_accepted.gif', get_lang('AcceptedCourseRequests')).get_lang('AcceptedCourseRequests').
'</a>';
echo '</div>';
echo '<div class="actions">';
$form->display();
@ -212,6 +248,4 @@ $table->set_column_filter(6, 'modify_filter');
$table->set_form_actions(array('delete_course_requests' => get_lang('DeleteCourseRequests')), 'course_request');
$table->display();
/* FOOTER */
Display :: display_footer();
Display::display_footer();

@ -108,7 +108,10 @@ if ($course_validation_feature) {
}
} else {
$link_to_setting = api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Platform#course_validation';
$message = sprintf(get_lang('PleaseActivateCourseValidationFeature'), sprintf('<strong><a href="%s">%s</a></strong>', $link_to_setting, get_lang('EnableCourseValidation')));
$message = sprintf(
get_lang('PleaseActivateCourseValidationFeature'),
sprintf('<strong><a href="%s">%s</a></strong>', $link_to_setting, get_lang('EnableCourseValidation'))
);
$is_error_message = true;
}
@ -175,7 +178,8 @@ function get_request_data($from, $number_of_items, $column, $direction)
*/
function email_filter($teacher)
{
$sql = "SELECT user_id FROM ".Database::get_main_table(TABLE_MAIN_COURSE_REQUEST)." WHERE tutor_name LIKE '".$teacher."'";
$sql = "SELECT user_id FROM ".Database::get_main_table(TABLE_MAIN_COURSE_REQUEST)."
WHERE tutor_name LIKE '".$teacher."'";
$res = Database::query($sql);
$info = Database::fetch_array($res);
return '<a href="./user_information.php?user_id='.$info[0].'">'.$teacher.'</a>';
@ -187,14 +191,19 @@ function email_filter($teacher)
function modify_filter($id)
{
$code = CourseRequestManager::get_course_request_code($id);
$result = '<a href="course_request_edit.php?id='.$id.'&caller=0">'.Display::return_icon('edit.png', get_lang('Edit'), array('style' => 'vertical-align: middle;')).'</a>'.
'&nbsp;<a href="?accept_course_request='.$id.'">'.Display::return_icon('accept.png', get_lang('AcceptThisCourseRequest'), array('style' => 'vertical-align: middle;', 'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('ANewCourseWillBeCreated'), $code), ENT_QUOTES)).'\')) return false;'), 16).'</a>'.
'&nbsp;<a href="?reject_course_request='.$id.'">'.Display::return_icon('error.png', get_lang('RejectThisCourseRequest'), array('style' => 'vertical-align: middle;', 'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('ACourseRequestWillBeRejected'), $code), ENT_QUOTES)).'\')) return false;'), 16).'</a>';
$result = '<a href="course_request_edit.php?id='.$id.'&caller=0">'.
Display::return_icon('edit.png', get_lang('Edit'), array('style' => 'vertical-align: middle;')).'</a>'.
'&nbsp;<a href="?accept_course_request='.$id.'">'.
Display::return_icon('accept.png', get_lang('AcceptThisCourseRequest'), array('style' => 'vertical-align: middle;', 'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('ANewCourseWillBeCreated'), $code), ENT_QUOTES)).'\')) return false;'), 16).'</a>'.
'&nbsp;<a href="?reject_course_request='.$id.'">'.
Display::return_icon('error.png', get_lang('RejectThisCourseRequest'), array('style' => 'vertical-align: middle;', 'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('ACourseRequestWillBeRejected'), $code), ENT_QUOTES)).'\')) return false;'), 16).'</a>';
if (!CourseRequestManager::additional_info_asked($id)) {
$result .= '&nbsp;<a href="?request_info='.$id.'">'.Display::return_icon('request_info.gif', get_lang('AskAdditionalInfo'), array('style' => 'vertical-align: middle;', 'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('AdditionalInfoWillBeAsked'), $code), ENT_QUOTES)).'\')) return false;')).'</a>';
$result .= '&nbsp;<a href="?request_info='.$id.'">'.
Display::return_icon('request_info.gif', get_lang('AskAdditionalInfo'), array('style' => 'vertical-align: middle;', 'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('AdditionalInfoWillBeAsked'), $code), ENT_QUOTES)).'\')) return false;')).'</a>';
}
if (DELETE_ACTION_ENABLED) {
$result .= '&nbsp;<a href="?delete_course_request='.$id.'">'.Display::return_icon('delete.png', get_lang('DeleteThisCourseRequest'), array('style' => 'vertical-align: middle;', 'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('ACourseRequestWillBeDeleted'), $code), ENT_QUOTES)).'\')) return false;')).'</a>';
$result .= '&nbsp;<a href="?delete_course_request='.$id.'">'
.Display::return_icon('delete.png', get_lang('DeleteThisCourseRequest'), array('style' => 'vertical-align: middle;', 'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('ACourseRequestWillBeDeleted'), $code), ENT_QUOTES)).'\')) return false;')).'</a>';
}
return $result;
@ -231,8 +240,10 @@ $form->addButtonSearch(get_lang('Search'));
// The action bar.
echo '<div style="float: right; margin-top: 5px; margin-right: 5px;">';
//echo '<a href="course_list.php">'.Display::return_icon('courses.gif', get_lang('CourseList')).get_lang('CourseList').'</a>';
echo ' <a href="course_request_accepted.php">'.Display::return_icon('course_request_accepted.gif', get_lang('AcceptedCourseRequests')).get_lang('AcceptedCourseRequests').'</a>';
echo ' <a href="course_request_rejected.php">'.Display::return_icon('course_request_rejected.gif', get_lang('RejectedCourseRequests')).get_lang('RejectedCourseRequests').'</a>';
echo ' <a href="course_request_accepted.php">'.
Display::return_icon('course_request_accepted.gif', get_lang('AcceptedCourseRequests')).get_lang('AcceptedCourseRequests').'</a>';
echo ' <a href="course_request_rejected.php">'.
Display::return_icon('course_request_rejected.gif', get_lang('RejectedCourseRequests')).get_lang('RejectedCourseRequests').'</a>';
echo '</div>';
echo '<div class="actions">';
$form->display();
@ -258,4 +269,4 @@ if (DELETE_ACTION_ENABLED) {
}
$table->display();
Display :: display_footer();
Display::display_footer();

@ -150,7 +150,9 @@ $options[0] = get_lang('SelectAnOption');
ksort($options);
$form->addElement('select', 'status', get_lang('SelectRole'), $options, array('onclick' => 'changeStatus(this)'));
$checks = $app['orm.em']->getRepository('ChamiloLMS\Entity\ExtraFieldOptionRelFieldOption')->findBy(array('fieldId' => $field_id, 'roleId' => $roleId));
$checks = $app['orm.em']->getRepository('ChamiloLMS\Entity\ExtraFieldOptionRelFieldOption')->findBy(
array('fieldId' => $field_id, 'roleId' => $roleId)
);
$includedFields = array();
if (!empty($checks)) {
foreach ($checks as $availableField) {
@ -215,7 +217,7 @@ if ($form->validate()) {
if ($value == 1) {
if (empty($extraFieldOptionRelFieldOption)) {
$extraFieldOptionRelFieldOption = new \ChamiloLMS\Entity\ExtraFieldOptionRelFieldOption();
$extraFieldOptionRelFieldOption = new \Chamilo\CoreBundle\Entity\ExtraFieldOptionRelFieldOption();
$extraFieldOptionRelFieldOption->setFieldId($field_id);
$extraFieldOptionRelFieldOption->setFieldOptionId($subItemId);
$extraFieldOptionRelFieldOption->setRelatedFieldOptionId($id);
@ -223,7 +225,6 @@ if ($form->validate()) {
$app['orm.ems']['db_write']->persist($extraFieldOptionRelFieldOption);
}
} else {
if ($extraFieldOptionRelFieldOption) {
$app['orm.ems']['db_write']->remove($extraFieldOptionRelFieldOption);
}

@ -80,9 +80,9 @@ if (count($output) > 0) {
<li>
<a href="filler.php?fill=courses">
<?php
echo Display::return_icon('new-course.png', get_lang('FillCourses'), null, ICON_SIZE_SMALL).' '.
get_lang('FillCourses');
?>
echo Display::return_icon('new-course.png', get_lang('FillCourses'), null, ICON_SIZE_SMALL).
' '.get_lang('FillCourses');
?>
</a>
</li>
</ul>

@ -104,6 +104,7 @@ $column_model = array(
'sortable' => 'false'
)
);
//Autowidth
$extra_params['autowidth'] = 'true';
//height auto
@ -157,7 +158,9 @@ switch ($action) {
$obj->display();
} else {
echo '<div class="actions">';
echo '<a href="'.api_get_self().'">'.Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
echo '<a href="'.api_get_self().'">'.
Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).
'</a>';
echo '</div>';
$form->addElement('hidden', 'sec_token');
$form->setConstants(array('sec_token' => $token));
@ -179,7 +182,9 @@ switch ($action) {
$obj->display();
} else {
echo '<div class="actions">';
echo '<a href="'.api_get_self().'">'.Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
echo '<a href="'.api_get_self().'">'.
Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).
'</a>';
echo '</div>';
$form->addElement('hidden', 'sec_token');
$form->setConstants(array('sec_token' => $token));
@ -201,4 +206,4 @@ switch ($action) {
break;
}
echo '<script> $(document).ready(function(){ $("input").removeClass("form-control"); }); </script>';
Display :: display_footer();
Display::display_footer();

@ -152,8 +152,6 @@ foreach ($dependencyList as $courseId => $courseInfo) {
$userResult[$userId]['result_dependencies'][$courseCode] = $result;
$userResult[$userId]['user_info'] = $userInfo;
//var_dump("$courseCode : $result");
if (in_array($courseId, $mandatoryList)) {
if ($userResult[$userId]['result_mandatory_20'] < 20 && $result) {
$userResult[$userId]['result_mandatory_20'] += 10;
@ -161,7 +159,6 @@ foreach ($dependencyList as $courseId => $courseInfo) {
} else {
if ($userResult[$userId]['result_not_mandatory_80'] < 80 && $result) {
$userResult[$userId]['result_not_mandatory_80'] += 10;
//var_dump($userResult[$userId]['result_80'] );
}
}
}
@ -190,7 +187,6 @@ $tpl->assign(
)
);
$tpl->assign('mandatory_courses', $mandatoryListCompleteList);
$tpl->assign('min_to_validate', $min);
$tpl->assign('gradebook_category', $category);

@ -26,7 +26,8 @@ $action = isset($_GET['action']) ? $_GET['action'] : null;
//Ajax request
if (isset($_POST['sent_http_request'])) {
if (isset($_POST['visibility']) && $_POST['visibility'] == strval(intval($_POST['visibility'])) && $_POST['visibility'] == 0) {
if (isset($_POST['visibility']) &&
$_POST['visibility'] == strval(intval($_POST['visibility'])) && $_POST['visibility'] == 0) {
if (isset($_POST['id']) && $_POST['id'] == strval(intval($_POST['id']))) {
if (SubLanguageManager::check_if_language_is_used($_POST['id']) == false) {
SubLanguageManager::make_unavailable_language($_POST['id']);
@ -36,7 +37,9 @@ if (isset($_POST['sent_http_request'])) {
}
}
}
if (isset($_POST['visibility']) && $_POST['visibility'] == strval(intval($_POST['visibility'])) && $_POST['visibility'] == 1) {
if (isset($_POST['visibility']) &&
$_POST['visibility'] == strval(intval($_POST['visibility'])) && $_POST['visibility'] == 1
) {
if (isset($_POST['id']) && $_POST['id'] == strval(intval($_POST['id']))) {
SubLanguageManager::make_available_language($_POST['id']);
echo 'set_visible';
@ -193,9 +196,9 @@ if ($action == 'disable_all_except_default') {
if (isset($_POST['Submit']) && $_POST['Submit']) {
// changing the name
$sql_update = "UPDATE $tbl_admin_languages SET original_name='{$_POST['txt_name']}'
WHERE id='{$_POST['edit_id']}'";
$result = Database::query($sql_update);
$sql = "UPDATE $tbl_admin_languages SET original_name='{$_POST['txt_name']}'
WHERE id='{$_POST['edit_id']}'";
$result = Database::query($sql);
// changing the Platform language
if ($_POST['platformlanguage'] && $_POST['platformlanguage'] <> '') {
//$sql_update_2 = "UPDATE $tbl_settings_current SET selected_value='{$_POST['platformlanguage']}' WHERE variable='platformLanguage'";
@ -204,7 +207,7 @@ if (isset($_POST['Submit']) && $_POST['Submit']) {
}
} elseif (isset($_POST['action'])) {
switch ($_POST['action']) {
case 'makeavailable' :
case 'makeavailable':
if (count($_POST['id']) > 0) {
$ids = array();
foreach ($_POST['id'] as $index => $id) {
@ -214,7 +217,7 @@ if (isset($_POST['Submit']) && $_POST['Submit']) {
Database::query($sql);
}
break;
case 'makeunavailable' :
case 'makeunavailable':
if (count($_POST['id']) > 0) {
$ids = array();
foreach ($_POST['id'] as $index => $id) {
@ -290,9 +293,7 @@ while ($row = Database::fetch_array($result_select)) {
$allow_delete_sub_language = null;
$allow_add_term_sub_language = null;
if (api_get_setting('allow_use_sub_language') == 'true') {
$verified_if_is_sub_language = SubLanguageManager::check_if_language_is_sub_language($row['id']);
if ($verified_if_is_sub_language === false) {

Loading…
Cancel
Save