Minor - format code, replace "else if" with "elseif".

pull/2487/head
jmontoyaa 7 years ago
parent 2b35e8125c
commit 71cfdebcf6
  1. 136
      main/admin/dashboard_add_courses_to_user.php
  2. 4
      main/admin/dashboard_add_sessions_to_user.php
  3. 2
      main/admin/index.php
  4. 2
      main/admin/user_export.php
  5. 72
      main/attendance/attendance_controller.php
  6. 8
      main/course_progress/thematic_advance.php
  7. 12
      main/course_progress/thematic_controller.php
  8. 2
      main/coursecopy/recycle_course.php
  9. 2
      main/exercise/Draggable.php
  10. 8
      main/exercise/question_pool.php
  11. 4
      main/inc/introductionSection.inc.php
  12. 4
      main/inc/lib/CourseChatUtils.php
  13. 2
      main/inc/lib/attendance.lib.php
  14. 2
      main/inc/lib/auth.lib.php
  15. 10
      main/inc/lib/course_home.lib.php
  16. 2
      main/inc/lib/myspace.lib.php

@ -36,11 +36,11 @@ $current_user_id = api_get_user_id();
// setting the name of the tool
if (UserManager::is_admin($user_id)) {
$tool_name = get_lang('AssignCoursesToPlatformAdministrator');
} else if ($user_info['status'] == SESSIONADMIN) {
$tool_name = get_lang('AssignCoursesToSessionsAdministrator');
$tool_name = get_lang('AssignCoursesToPlatformAdministrator');
} elseif ($user_info['status'] == SESSIONADMIN) {
$tool_name = get_lang('AssignCoursesToSessionsAdministrator');
} else {
$tool_name = get_lang('AssignCoursesToHumanResourcesManager');
$tool_name = get_lang('AssignCoursesToHumanResourcesManager');
}
$add_type = 'multiple';
@ -74,20 +74,20 @@ function search_courses($needle, $type)
if (api_is_multiple_url_enabled()) {
$sql = "SELECT c.code, c.title
FROM $tbl_course c
LEFT JOIN $tbl_course_rel_access_url a
LEFT JOIN $tbl_course_rel_access_url a
ON (a.c_id = c.id)
WHERE
c.code LIKE '$needle%' $without_assigned_courses AND
access_url_id = ".api_get_current_access_url_id();
WHERE
c.code LIKE '$needle%' $without_assigned_courses AND
access_url_id = ".api_get_current_access_url_id();
} else {
$sql = "SELECT c.code, c.title
FROM $tbl_course c
WHERE
c.code LIKE '$needle%'
$without_assigned_courses ";
FROM $tbl_course c
WHERE
c.code LIKE '$needle%'
$without_assigned_courses ";
}
$rs = Database::query($sql);
$rs = Database::query($sql);
$return .= '<select id="origin" name="NoAssignedCoursesList[]" multiple="multiple" size="20" >';
while ($course = Database :: fetch_array($rs)) {
@ -103,51 +103,51 @@ $xajax->processRequests();
$htmlHeadXtra[] = $xajax->getJavascript('../inc/lib/xajax/');
$htmlHeadXtra[] = '<script>
function moveItem(origin , destination) {
for(var i = 0 ; i<origin.options.length ; i++) {
if(origin.options[i].selected) {
destination.options[destination.length] = new Option(origin.options[i].text,origin.options[i].value);
origin.options[i]=null;
i = i-1;
}
}
destination.selectedIndex = -1;
sortOptions(destination.options);
for(var i = 0 ; i<origin.options.length ; i++) {
if(origin.options[i].selected) {
destination.options[destination.length] = new Option(origin.options[i].text,origin.options[i].value);
origin.options[i]=null;
i = i-1;
}
}
destination.selectedIndex = -1;
sortOptions(destination.options);
}
function sortOptions(options) {
var newOptions = new Array();
for (i = 0 ; i<options.length ; i++) {
newOptions[i] = options[i];
}
newOptions = newOptions.sort(mysort);
options.length = 0;
for(i = 0 ; i < newOptions.length ; i++){
options[i] = newOptions[i];
}
var newOptions = new Array();
for (i = 0 ; i<options.length ; i++) {
newOptions[i] = options[i];
}
newOptions = newOptions.sort(mysort);
options.length = 0;
for(i = 0 ; i < newOptions.length ; i++){
options[i] = newOptions[i];
}
}
function mysort(a, b) {
if (a.text.toLowerCase() > b.text.toLowerCase()) {
return 1;
}
if (a.text.toLowerCase() < b.text.toLowerCase()) {
return -1;
}
return 0;
if (a.text.toLowerCase() > b.text.toLowerCase()) {
return 1;
}
if (a.text.toLowerCase() < b.text.toLowerCase()) {
return -1;
}
return 0;
}
function valide() {
var options = document.getElementById("destination").options;
for (i = 0 ; i<options.length ; i++) {
options[i].selected = true;
}
document.forms.formulaire.submit();
var options = document.getElementById("destination").options;
for (i = 0 ; i<options.length ; i++) {
options[i].selected = true;
}
document.forms.formulaire.submit();
}
function remove_item(origin) {
for(var i = 0 ; i<origin.options.length ; i++) {
if(origin.options[i].selected) {
origin.options[i]=null;
i = i-1;
}
}
for(var i = 0 ; i<origin.options.length ; i++) {
if(origin.options[i].selected) {
origin.options[i]=null;
i = i-1;
}
}
}
</script>';
@ -184,23 +184,23 @@ echo Display::page_header(
$assigned_courses_to_hrm = CourseManager::get_courses_followed_by_drh($user_id);
$assigned_courses_code = array_keys($assigned_courses_to_hrm);
foreach ($assigned_courses_code as &$value) {
$value = "'".$value."'";
$value = "'".$value."'";
}
$without_assigned_courses = '';
if (count($assigned_courses_code) > 0) {
$without_assigned_courses = " AND c.code NOT IN(".implode(',', $assigned_courses_code).")";
$without_assigned_courses = " AND c.code NOT IN(".implode(',', $assigned_courses_code).")";
}
$needle = '%';
$firstLetter = null;
if (isset($_POST['firstLetterCourse'])) {
$firstLetter = $_POST['firstLetterCourse'];
$needle = Database::escape_string($firstLetter.'%');
$firstLetter = $_POST['firstLetterCourse'];
$needle = Database::escape_string($firstLetter.'%');
}
if (api_is_multiple_url_enabled()) {
$sql = " SELECT c.code, c.title
$sql = " SELECT c.code, c.title
FROM $tbl_course c
LEFT JOIN $tbl_course_rel_access_url a
ON (a.c_id = c.id)
@ -210,8 +210,8 @@ if (api_is_multiple_url_enabled()) {
ORDER BY c.title";
} else {
$sql = " SELECT c.code, c.title
FROM $tbl_course c
$sql = " SELECT c.code, c.title
FROM $tbl_course c
WHERE c.code LIKE '$needle' $without_assigned_courses
ORDER BY c.title";
}
@ -223,7 +223,7 @@ $result = Database::query($sql);
<input type="hidden" name="formSent" value="1" />
<?php
if (!empty($msg)) {
echo Display::return_message($msg, 'normal'); //main API
echo Display::return_message($msg, 'normal'); //main API
}
?>
@ -232,11 +232,11 @@ if (!empty($msg)) {
<h5><?php echo get_lang('CoursesListInPlatform') ?> :</h5>
<div id="ajax_list_courses_multiple">
<select id="origin" name="NoAssignedCoursesList[]" multiple="multiple" size="20" style="width:340px;">
<?php while ($enreg = Database::fetch_array($result)) { ?>
<select id="origin" name="NoAssignedCoursesList[]" multiple="multiple" size="20" style="width:340px;">
<?php while ($enreg = Database::fetch_array($result)) { ?>
<option value="<?php echo $enreg['code']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'], ENT_QUOTES).'"'; ?>><?php echo $enreg['title'].' ('.$enreg['code'].')'; ?></option>
<?php } ?>
</select>
<?php } ?>
</select>
</div>
</div>
@ -268,13 +268,13 @@ if (!empty($msg)) {
</div>
<div class="col-md-4">
<h5><?php
if (UserManager::is_admin($user_id)) {
echo get_lang('AssignedCoursesListToPlatformAdministrator');
} else if ($user_info['status'] == SESSIONADMIN) {
echo get_lang('AssignedCoursesListToSessionsAdministrator');
} else {
echo get_lang('AssignedCoursesListToHumanResourcesManager');
}
if (UserManager::is_admin($user_id)) {
echo get_lang('AssignedCoursesListToPlatformAdministrator');
} elseif ($user_info['status'] == SESSIONADMIN) {
echo get_lang('AssignedCoursesListToSessionsAdministrator');
} else {
echo get_lang('AssignedCoursesListToHumanResourcesManager');
}
?>: </h5>
<select id='destination' name="CoursesList[]" multiple="multiple" size="20" style="width:320px;">

@ -39,7 +39,7 @@ $ajax_search = false;
// Setting the name of the tool
if (UserManager::is_admin($user_id)) {
$tool_name = get_lang('AssignSessionsToPlatformAdministrator');
} else if ($user_info['status'] == SESSIONADMIN) {
} elseif ($user_info['status'] == SESSIONADMIN) {
$tool_name = get_lang('AssignSessionsToSessionsAdministrator');
} else {
$tool_name = get_lang('AssignSessionsToHumanResourcesManager');
@ -276,7 +276,7 @@ $result = Database::query($sql);
<?php
if (UserManager::is_admin($user_id)) {
echo get_lang('AssignedSessionsListToPlatformAdministrator');
} else if ($user_info['status'] == SESSIONADMIN) {
} elseif ($user_info['status'] == SESSIONADMIN) {
echo get_lang('AssignedSessionsListToSessionsAdministrator');
} else {
echo get_lang('AssignedSessionsListToHumanResourcesManager');

@ -569,7 +569,7 @@ $useCookieValidation = api_get_setting('cookie_warning');
if ($useCookieValidation === 'true') {
if (isset($_POST['acceptCookies'])) {
api_set_site_use_cookie_warning_cookie();
} else if (!api_site_use_cookie_warning_cookie_exist()) {
} elseif (!api_site_use_cookie_warning_cookie_exist()) {
if (Template::isToolBarDisplayedForUser()) {
$tpl->assign('toolBarDisplayed', true);
} else {

@ -101,7 +101,7 @@ if ($form->validate()) {
cu.relation_type<>".COURSE_RELATION_TYPE_RRHH."
ORDER BY lastname,firstname";
$filename = 'export_users_'.$course_code.'_'.api_get_local_time();
} else if (strlen($courseSessionCode) > 0) {
} elseif (strlen($courseSessionCode) > 0) {
$sql .= " FROM $user_table u, $session_course_user_table scu
WHERE
u.user_id = scu.user_id AND

@ -30,10 +30,8 @@ class AttendanceController
*/
public function attendance_list()
{
$data = array();
// render to the view
$this->view->set_data($data);
$this->view->set_data([]);
$this->view->set_layout('layout');
$this->view->set_template('attendance_list');
$this->view->render();
@ -87,7 +85,7 @@ class AttendanceController
/**
* It's used for editing attendance,
* render to attendance_edit or attendance_list view
* @param int $attendance_id
* @param int $attendance_id
*/
public function attendance_edit($attendance_id)
{
@ -154,7 +152,7 @@ class AttendanceController
/**
* It's used for delete attendaces
* render to attendance_list view
* @param int $attendance_id
* @param int $attendance_id
*/
public function attendance_delete($attendance_id)
{
@ -264,8 +262,12 @@ class AttendanceController
* @param int $student_id
* @param bool $edit
*/
public function attendance_sheet($action, $attendance_id, $student_id = 0, $edit = true)
{
public function attendance_sheet(
$action,
$attendance_id,
$student_id = 0,
$edit = true
) {
$attendance = new Attendance();
$data = array();
$data['attendance_id'] = $attendance_id;
@ -284,7 +286,11 @@ class AttendanceController
if ($edit == true) {
if (api_is_allowed_to_edit(null, true) || $isDrhOfCourse) {
$data['users_presence'] = $attendance->get_users_attendance_sheet($attendance_id, 0, $groupId);
$data['users_presence'] = $attendance->get_users_attendance_sheet(
$attendance_id,
0,
$groupId
);
}
} else {
if (!empty($student_id)) {
@ -297,17 +303,29 @@ class AttendanceController
api_is_coach(api_get_session_id(), api_get_course_int_id()) ||
$isDrhOfCourse
) {
$data['users_presence'] = $attendance->get_users_attendance_sheet($attendance_id, 0, $groupId);
$data['users_presence'] = $attendance->get_users_attendance_sheet(
$attendance_id,
0,
$groupId
);
} else {
$data['users_presence'] = $attendance->get_users_attendance_sheet($attendance_id, $user_id, $groupId);
$data['users_presence'] = $attendance->get_users_attendance_sheet(
$attendance_id,
$user_id,
$groupId
);
}
$data['faults'] = $attendance->get_faults_of_user($user_id, $attendance_id, $groupId);
$data['user_id'] = $user_id;
}
$data['next_attendance_calendar_id'] = $attendance->get_next_attendance_calendar_id($attendance_id);
$data['next_attendance_calendar_datetime'] = $attendance->get_next_attendance_calendar_datetime($attendance_id);
$data['next_attendance_calendar_id'] = $attendance->get_next_attendance_calendar_id(
$attendance_id
);
$data['next_attendance_calendar_datetime'] = $attendance->get_next_attendance_calendar_datetime(
$attendance_id
);
if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') {
if (isset($_POST['hidden_input'])) {
@ -357,8 +375,8 @@ class AttendanceController
* It's used for controlling attendance calendar (list, add, edit, delete),
* render to attendance_calendar view
* @param string $action (optional, by default 'calendar_list')
* @param int $attendance_id (optional)
* @param int $calendar_id (optional)
* @param int $attendance_id (optional)
* @param int $calendar_id (optional)
*/
public function attendance_calendar($action = 'calendar_list', $attendance_id = 0, $calendar_id = 0)
{
@ -375,7 +393,8 @@ class AttendanceController
if (isset($_POST['repeat'])) {
//@todo check this error_logs
$start_datetime = api_strtotime(
api_get_utc_datetime($_POST['date_time']), 'UTC'
api_get_utc_datetime($_POST['date_time']),
'UTC'
);
$end_datetime = api_strtotime(api_get_utc_datetime($_POST['end_date_time'].' 23:59:59'), 'UTC');
@ -416,7 +435,7 @@ class AttendanceController
$action = 'calendar_list';
}
}
} else if ($action === 'calendar_edit') {
} elseif ($action === 'calendar_edit') {
$data['calendar_id'] = $calendar_id;
if (strtoupper($_SERVER['REQUEST_METHOD']) == "POST") {
if (!isset($_POST['cancel'])) {
@ -430,10 +449,10 @@ class AttendanceController
$action = 'calendar_list';
}
}
} else if ($action == 'calendar_delete') {
} elseif ($action == 'calendar_delete') {
$attendance->attendance_calendar_delete($calendar_id, $attendance_id);
$action = 'calendar_list';
} else if ($action == 'calendar_all_delete') {
} elseif ($action == 'calendar_all_delete') {
$attendance->attendance_calendar_delete(0, $attendance_id, true);
$action = 'calendar_list';
}
@ -459,10 +478,14 @@ class AttendanceController
* @param string $action
* @param int $attendance_id
*/
public function attendance_sheet_export_to_pdf($action, $attendance_id, $student_id = 0, $course_id = '')
{
public function attendance_sheet_export_to_pdf(
$action,
$attendance_id,
$student_id = 0,
$course_id = ''
) {
$attendance = new Attendance();
$courseInfo = CourseManager::get_course_information($course_id);
$courseInfo = api_get_course_info($course_id);
$attendance->set_course_id($courseInfo['code']);
$groupId = isset($_REQUEST['group_id']) ? $_REQUEST['group_id'] : null;
$data_array = array();
@ -504,7 +527,7 @@ class AttendanceController
$data_array['next_attendance_calendar_id'] = $attendance->get_next_attendance_calendar_id($attendance_id);
// Set headers pdf.
$courseCategory = CourseManager::get_course_category($courseInfo['category_code']);
$courseCategory = CourseManager::get_course_category($courseInfo['categoryCode']);
$teacherInfo = CourseManager::get_teacher_list_from_course_code($courseInfo['code']);
$teacherName = null;
foreach ($teacherInfo as $teacherData) {
@ -615,6 +638,7 @@ class AttendanceController
* Gets attendance base in the table:
* TABLE_STATISTIC_TRACK_E_COURSE_ACCESS
* @param bool $showForm
* @param bool $exportToPdf
*/
public function getAttendanceBaseInLogin($showForm = false, $exportToPdf = true)
{
@ -628,8 +652,7 @@ class AttendanceController
$form = new FormValidator(
'search',
'post',
api_get_self().'?'.api_get_cidreq(
).'&action=calendar_logins'
api_get_self().'?'.api_get_cidreq().'&action=calendar_logins'
);
$form->addDateRangePicker('range', get_lang('DateRange'));
$form->addButton('submit', get_lang('Submit'));
@ -650,7 +673,6 @@ class AttendanceController
}
$attendance = new Attendance();
if ($exportToPdf) {
$result = $attendance->exportAttendanceLogin($startDate, $endDate);
if (empty($result)) {

@ -12,7 +12,6 @@
api_protect_course_script(true);
if ($action === 'thematic_advance_add' || $action === 'thematic_advance_edit') {
$header_form = get_lang('NewThematicAdvance');
if ($action === 'thematic_advance_edit') {
$header_form = get_lang('EditThematicAdvance');
@ -34,7 +33,7 @@ if ($action === 'thematic_advance_add' || $action === 'thematic_advance_edit') {
if (!empty($thematic_id)) {
$form->addElement('hidden', 'thematic_id', $thematic_id);
}
$radios = array();
$radios[] = $form->createElement(
'radio',
@ -137,7 +136,6 @@ if ($action === 'thematic_advance_add' || $action === 'thematic_advance_edit') {
}
$attendance_select_item_id = null;
if (count($attendance_select) > 1) {
$i = 1;
foreach ($attendance_select as $key => $attendance_select_item) {
@ -162,7 +160,6 @@ if ($action === 'thematic_advance_add' || $action === 'thematic_advance_edit') {
$default['duration_in_hours'] = 1;
if (!empty($thematic_advance_data)) {
// set default values
$default['content'] = isset($thematic_advance_data['content']) ? $thematic_advance_data['content'] : null;
$default['duration_in_hours'] = isset($thematic_advance_data['duration']) ? $thematic_advance_data['duration'] : 1;
@ -225,8 +222,7 @@ if ($action === 'thematic_advance_add' || $action === 'thematic_advance_edit') {
}
$form->display();
} else if ($action == 'thematic_advance_list') {
} elseif ($action == 'thematic_advance_list') {
// thematic advance list
echo '<div class="actions">';
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;action=thematic_details">'.

@ -202,7 +202,7 @@ class ThematicController
case 'export_documents':
//no break
case 'thematic_export_pdf':
$pdfOrientation = api_get_configuration_value('thematic_pdf_orientation');
$list = $thematic->get_thematic_list();
@ -221,7 +221,7 @@ class ThematicController
);
}
$theme['thematic_plan'] = $item;
}
$dataAdvance = $thematic->get_thematic_advance_by_thematic_id($theme['id']);
if (!empty($dataAdvance)) {
@ -447,7 +447,7 @@ class ThematicController
$data['next_description_type'] = $thematic->get_next_description_type($_POST['thematic_id']);
// render to the view
$this->view->set_data($data);
$this->view->set_layout('layout');
$this->view->set_template('thematic_plan');
@ -476,7 +476,7 @@ class ThematicController
}
$data['thematic_id'] = $thematic_id;
$data['description_type'] = $description_type;
} else if (!empty($thematic_id) && $action === 'thematic_plan_list') {
} elseif (!empty($thematic_id) && $action === 'thematic_plan_list') {
$data['thematic_plan_data'] = $thematic->get_thematic_plan_data($thematic_id);
$data['thematic_id'] = $thematic_id;
}
@ -490,7 +490,7 @@ class ThematicController
$data['thematic_data'] = $thematic->get_thematic_list($thematic_id);
//render to the view
$this->view->set_data($data);
$this->view->set_layout('layout');
$this->view->set_template('thematic_plan');
@ -509,7 +509,6 @@ class ThematicController
$thematic = new Thematic();
$attendance = new Attendance();
$data = array();
$displayHeader = (!empty($_REQUEST['display']) && $_REQUEST['display'] === 'no_header') ? false : true;
// get data for attendance input select
@ -576,7 +575,6 @@ class ThematicController
$layoutName = $displayHeader ? 'layout' : 'layout_no_header';
// render to the view
$this->view->set_data($data);
$this->view->set_layout($layoutName);
$this->view->set_template('thematic_advance');

@ -58,7 +58,7 @@ if (Security::check_token('post') && (
$recycle_type = '';
if (isset($_POST['recycle_option']) && $_POST['recycle_option'] == 'full_backup') {
$recycle_type = 'full_backup';
} else if (isset($_POST['action']) && $_POST['action'] == 'course_select_form') {
} elseif (isset($_POST['action']) && $_POST['action'] == 'course_select_form') {
$recycle_type = 'select_items';
}
$cr = new CourseRecycler($course);

@ -49,7 +49,7 @@ class Draggable extends Question
if (isset($_POST['moreOptions'])) {
$nb_options++;
}
} else if (!empty($this->id)) {
} elseif (!empty($this->id)) {
$defaults['orientation'] = in_array($this->extra, ['h', 'v']) ? $this->extra : 'h';
$answer = new Answer($this->id);

@ -1,6 +1,8 @@
<?php
/* For licensing terms, see /license.txt */
use ChamiloSession as Session;
/**
* Question Pool
* This script allows administrators to manage questions and add them into their exercises.
@ -11,8 +13,6 @@
* @author Modify by hubert borderiou 2011-10-21 Question's category
*/
use ChamiloSession as Session;
require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_COURSES;
@ -58,7 +58,7 @@ if (!empty($objExercise)) {
}
// message to be displayed if actions successful
$displayMessage = "";
$displayMessage = '';
if ($is_allowedToEdit) {
// Duplicating a Question
if (!isset($_POST['recup']) && $question_copy != 0 && isset($fromExercise)) {
@ -126,7 +126,7 @@ if ($is_allowedToEdit) {
// Adds the question ID represented by $recup into the list of questions for the current exercise
$objExercise->addToList($recup);
Session::write('objExercise', $objExercise);
} else if (isset($_POST['recup']) && is_array($_POST['recup']) && $fromExercise) {
} elseif (isset($_POST['recup']) && is_array($_POST['recup']) && $fromExercise) {
$list_recup = $_POST['recup'];
foreach ($list_recup as $course_id => $question_data) {

@ -185,7 +185,7 @@ if ($tool == TOOL_COURSE_HOMEPAGE && !isset($_GET['intro_cmdEdit'])) {
$thematic_advance_info = $thematic->get_thematic_advance_list($last_done_advance);
$subTitle1 = get_lang('CurrentTopic');
$class1 = ' current';
} else if ($displayMode == '2') {
} elseif ($displayMode == '2') {
// Show only the two next course progress steps
// $information_title = get_lang('InfoAboutNextAdvanceNotDone');
$last_done_advance = $thematic->get_next_thematic_advance_not_done();
@ -193,7 +193,7 @@ if ($tool == TOOL_COURSE_HOMEPAGE && !isset($_GET['intro_cmdEdit'])) {
$thematic_advance_info = $thematic->get_thematic_advance_list($last_done_advance);
$thematic_advance_info2 = $thematic->get_thematic_advance_list($next_advance_not_done);
$subTitle1 = $subTitle2 = get_lang('NextTopic');
} else if ($displayMode == '3') {
} elseif ($displayMode == '3') {
// Show the current and next course progress steps
// $information_title = get_lang('InfoAboutLastDoneAdvanceAndNextAdvanceNotDone');
$last_done_advance = $thematic->get_last_done_thematic_advance();

@ -1548,7 +1548,7 @@ class CourseChatUtils
if ($this->groupId && !$friendId) {
$filename_chat = 'messages-'.$date_now.'_gid-'.$this->groupId.'.log.html';
} else if ($this->sessionId && !$friendId) {
} elseif ($this->sessionId && !$friendId) {
$filename_chat = 'messages-'.$date_now.'_sid-'.$this->sessionId.'.log.html';
} elseif ($friendId) {
if ($this->userId < $friendId) {
@ -1593,7 +1593,7 @@ class CourseChatUtils
$basename_chat = 'messages-'.$date_now;
if ($this->groupId && !$friendId) {
$basename_chat = 'messages-'.$date_now.'_gid-'.$this->groupId;
} else if ($this->sessionId && !$friendId) {
} elseif ($this->sessionId && !$friendId) {
$basename_chat = 'messages-'.$date_now.'_sid-'.$this->sessionId;
} elseif ($friendId) {
if ($this->userId < $friendId) {

@ -1051,7 +1051,7 @@ class Attendance
if ($faults_porcent > 25) {
$color_bar = '#f28989';
} else if ($faults_porcent > 10) {
} elseif ($faults_porcent > 10) {
$color_bar = '#F90';
}
$results['color_bar'] = $color_bar;

@ -620,7 +620,7 @@ class Auth
$all_course_information['real_id'],
$send_to_tutor_also = false
);
} else if ($send == 2) {
} elseif ($send == 2) {
CourseManager::email_to_tutor(
$user_id,
$all_course_information['real_id'],

@ -1295,7 +1295,7 @@ class CourseHome
$class = 'text';
$marginLeft = 170;
$item = $navigation_item['name'];
} else if (api_get_setting('show_navigation_menu') == 'icons') {
} elseif (api_get_setting('show_navigation_menu') == 'icons') {
$class = 'icons';
$marginLeft = 25;
$item = Display::return_icon(
@ -1306,7 +1306,13 @@ class CourseHome
);
} else {
$class = 'icons-text';
$item = $navigation_item['name'].Display::return_icon(substr($navigation_item['image'], 0, -3)."png", $navigation_item['name'], array('class'=>'tool-img'), ICON_SIZE_SMALL);
$item = $navigation_item['name'].
Display::return_icon(
substr($navigation_item['image'], 0, -3)."png",
$navigation_item['name'],
array('class' => 'tool-img'),
ICON_SIZE_SMALL
);
}
if (stristr($url_item['path'], $url_current['path'])) {

@ -1035,7 +1035,7 @@ class MySpace
);
if ($last_login_date_tmp != false && $last_login_date == false) { // TODO: To be cleaned
$last_login_date = $last_login_date_tmp;
} else if ($last_login_date_tmp != false && $last_login_date != false) { // TODO: Repeated previous condition. To be cleaned.
} elseif ($last_login_date_tmp != false && $last_login_date != false) { // TODO: Repeated previous condition. To be cleaned.
// Find the max and assign it to first_login_date
if (strtotime($last_login_date_tmp) > strtotime($last_login_date)) {
$last_login_date = $last_login_date_tmp;

Loading…
Cancel
Save