diff --git a/main/admin/access_url_add_courses_to_url.php b/main/admin/access_url_add_courses_to_url.php
index 74e6683ee2..e9ce80c95e 100755
--- a/main/admin/access_url_add_courses_to_url.php
+++ b/main/admin/access_url_add_courses_to_url.php
@@ -10,7 +10,7 @@
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
-$this_section=SECTION_PLATFORM_ADMIN;
+$this_section = SECTION_PLATFORM_ADMIN;
api_protect_global_admin_script();
@@ -21,7 +21,7 @@ if (!api_get_multiple_access_url()) {
$form_sent = 0;
$first_letter_course = '';
-$courses = array ();
+$courses = array();
$url_list = array();
$users = array();
@@ -32,8 +32,8 @@ $tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
/* Header */
$tool_name = get_lang('AddCoursesToURL');
-$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
-$interbreadcrumb[] = array ('url' => 'access_urls.php', 'name' => get_lang('MultipleAccessURLs'));
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
+$interbreadcrumb[] = array('url' => 'access_urls.php', 'name' => get_lang('MultipleAccessURLs'));
Display :: display_header($tool_name);
@@ -48,8 +48,8 @@ api_display_tool_title($tool_name);
if (isset($_POST['form_sent']) && $_POST['form_sent']) {
$form_sent = $_POST['form_sent'];
- $courses = is_array($_POST['course_list']) ? $_POST['course_list'] : array() ;
- $url_list = is_array($_POST['url_list']) ? $_POST['url_list'] : array() ;
+ $courses = is_array($_POST['course_list']) ? $_POST['course_list'] : array();
+ $url_list = is_array($_POST['url_list']) ? $_POST['url_list'] : array();
$first_letter_course = $_POST['first_letter_course'];
foreach ($users as $key => $value) {
@@ -70,7 +70,7 @@ if (empty($first_letter_user)) {
$sql = "SELECT count(*) as num_courses FROM $tbl_course";
$result = Database::query($sql);
$num_row = Database::fetch_array($result);
- if ($num_row['num_courses']>1000) {
+ if ($num_row['num_courses'] > 1000) {
//if there are too much num_courses to gracefully handle with the HTML select list,
// assign a default filter on users names
$first_letter_user = 'A';
@@ -106,7 +106,7 @@ unset($result);
@@ -119,7 +119,7 @@ unset($result);
@@ -130,7 +130,7 @@ unset($result);
|
diff --git a/main/admin/course_edit.php b/main/admin/course_edit.php
index 24d6c89d0e..9ba7d147e8 100755
--- a/main/admin/course_edit.php
+++ b/main/admin/course_edit.php
@@ -42,7 +42,7 @@ $sql = "SELECT user.user_id,lastname,firstname
WHERE
course_user.status='1' AND
course_user.user_id=user.user_id AND
- course_user.c_id ='" . $courseId . "'" .
+ course_user.c_id ='".$courseId."'".
$order_clause;
$res = Database::query($sql);
$course_teachers = array();
@@ -58,18 +58,18 @@ if (api_is_multiple_url_enabled()) {
INNER JOIN $access_url_rel_user_table url_rel_user
ON (u.user_id=url_rel_user.user_id)
WHERE
- url_rel_user.access_url_id=" . api_get_current_access_url_id() . " AND
+ url_rel_user.access_url_id=".api_get_current_access_url_id()." AND
status = 1" . $order_clause;
} else {
$sql = "SELECT user_id, lastname, firstname
- FROM $table_user WHERE status='1'" . $order_clause;
+ FROM $table_user WHERE status='1'".$order_clause;
}
$courseInfo['tutor_name'] = null;
$res = Database::query($sql);
$teachers = array();
$allTeachers = array();
-$platform_teachers[0] = '-- ' . get_lang('NoManager') . ' --';
+$platform_teachers[0] = '-- '.get_lang('NoManager').' --';
while ($obj = Database::fetch_object($res)) {
$allTeachers[$obj->user_id] = api_get_person_name($obj->firstname, $obj->lastname);
if (!array_key_exists($obj->user_id, $course_teachers)) {
@@ -87,7 +87,7 @@ while ($obj = Database::fetch_object($res)) {
// Case where there is no teacher in the course
if (count($course_teachers) == 0) {
- $sql = 'SELECT tutor_name FROM ' . $course_table . ' WHERE code="' . $course_code . '"';
+ $sql = 'SELECT tutor_name FROM '.$course_table.' WHERE code="'.$course_code.'"';
$res = Database::query($sql);
$tutor_name = Database::result($res, 0, 0);
$courseInfo['tutor_name'] = array_search($tutor_name, $platform_teachers);
@@ -95,7 +95,7 @@ if (count($course_teachers) == 0) {
// Build the form
$form = new FormValidator('update_course', 'post', api_get_self().'?id='.$courseId);
-$form->addElement('header', get_lang('Course') . ' #' . $courseInfo['real_id'] . ' ' . $course_code);
+$form->addElement('header', get_lang('Course').' #'.$courseInfo['real_id'].' '.$course_code);
$form->addElement('hidden', 'code', $course_code);
//title
@@ -151,14 +151,14 @@ if (!empty($coursesInSession)) {
}
}
- $groupName = 'session_coaches[' . $sessionId . ']';
- $platformTeacherId = 'platform_teachers_by_session_' . $sessionId;
- $coachId = 'coaches_by_session_' . $sessionId;
+ $groupName = 'session_coaches['.$sessionId.']';
+ $platformTeacherId = 'platform_teachers_by_session_'.$sessionId;
+ $coachId = 'coaches_by_session_'.$sessionId;
$platformTeacherName = 'platform_teachers_by_session';
$coachName = 'coaches_by_session';
- $sessionUrl = api_get_path(WEB_CODE_PATH) . 'session/resume_session.php?id_session=' . $sessionId;
+ $sessionUrl = api_get_path(WEB_CODE_PATH).'session/resume_session.php?id_session='.$sessionId;
$form->addElement(
'advmultiselect',
$groupName,
@@ -166,7 +166,7 @@ if (!empty($coursesInSession)) {
$session['name'],
$sessionUrl,
array('target' => '_blank')
- ) . ' - ' . get_lang('Coaches'),
+ ).' - '.get_lang('Coaches'),
$allTeachers
);
$courseInfo[$groupName] = $sessionTeachers;
@@ -174,7 +174,7 @@ if (!empty($coursesInSession)) {
}
// Category code
-$url = api_get_path(WEB_AJAX_PATH) . 'course.ajax.php?a=search_category';
+$url = api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=search_category';
$categorySelect = $form->addElement(
'select_ajax',
@@ -200,11 +200,11 @@ $form->applyFilter('department_url', 'trim');
$form->addSelectLanguage('course_language', get_lang('CourseLanguage'));
$group = array();
-$group[]= $form->createElement('radio', 'visibility', get_lang("CourseAccess"), get_lang('OpenToTheWorld'), COURSE_VISIBILITY_OPEN_WORLD);
-$group[]= $form->createElement('radio', 'visibility', null, get_lang('OpenToThePlatform'), COURSE_VISIBILITY_OPEN_PLATFORM);
-$group[]= $form->createElement('radio', 'visibility', null, get_lang('Private'), COURSE_VISIBILITY_REGISTERED);
-$group[]= $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityClosed'), COURSE_VISIBILITY_CLOSED);
-$group[]= $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityHidden'), COURSE_VISIBILITY_HIDDEN);
+$group[] = $form->createElement('radio', 'visibility', get_lang("CourseAccess"), get_lang('OpenToTheWorld'), COURSE_VISIBILITY_OPEN_WORLD);
+$group[] = $form->createElement('radio', 'visibility', null, get_lang('OpenToThePlatform'), COURSE_VISIBILITY_OPEN_PLATFORM);
+$group[] = $form->createElement('radio', 'visibility', null, get_lang('Private'), COURSE_VISIBILITY_REGISTERED);
+$group[] = $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityClosed'), COURSE_VISIBILITY_CLOSED);
+$group[] = $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityHidden'), COURSE_VISIBILITY_HIDDEN);
$form->addGroup($group, '', get_lang('CourseAccess'));
$group = array();
@@ -228,7 +228,7 @@ $extra = $extra_field->addElements($form, $courseId);
$htmlHeadXtra[] = '
';
@@ -283,7 +283,7 @@ if ($form->validate()) {
foreach ($list as $course_temp) {
if ($course_temp['code'] != $course_code) {
$visual_code_is_used = true;
- $warn .= ' ' . $course_temp['title'] . ' (' . $course_temp['code'] . '),';
+ $warn .= ' '.$course_temp['title'].' ('.$course_temp['code'].'),';
}
}
$warn = substr($warn, 0, -1);
@@ -302,7 +302,7 @@ if ($form->validate()) {
$course['course_code'] = $course_code;
if (!stristr($department_url, 'http://')) {
- $department_url = 'http://' . $department_url;
+ $department_url = 'http://'.$department_url;
}
Database::query($sql);
@@ -367,7 +367,7 @@ if ($form->validate()) {
if (array_key_exists('add_teachers_to_sessions_courses', $courseInfo)) {
$sql = "UPDATE $course_table SET
add_teachers_to_sessions_courses = '$addTeacherToSessionCourses'
- WHERE id = " . $courseInfo['real_id'];
+ WHERE id = ".$courseInfo['real_id'];
Database::query($sql);
}
diff --git a/main/admin/course_import.php b/main/admin/course_import.php
index 7cf8759cb4..7c4b74f475 100755
--- a/main/admin/course_import.php
+++ b/main/admin/course_import.php
@@ -15,13 +15,13 @@
*/
function validate_courses_data($courses)
{
- $errors = array ();
- $coursecodes = array ();
+ $errors = array();
+ $coursecodes = array();
foreach ($courses as $index => $course) {
- $course['line'] = $index +1;
+ $course['line'] = $index + 1;
// 1. Check whether mandatory fields are set.
- $mandatory_fields = array ('Code', 'Title', 'CourseCategory');
+ $mandatory_fields = array('Code', 'Title', 'CourseCategory');
foreach ($mandatory_fields as $field) {
if (empty($course[$field])) {
$course['error'] = get_lang($field.'Mandatory');
diff --git a/main/admin/grade_models.php b/main/admin/grade_models.php
index 55026507e3..70e406f28c 100755
--- a/main/admin/grade_models.php
+++ b/main/admin/grade_models.php
@@ -20,7 +20,7 @@ if (api_get_setting('gradebook_enable_grade_model') != 'true') {
$htmlHeadXtra[] = api_get_jqgrid_js();
// setting breadcrumbs
-$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
$action = isset($_GET['action']) ? $_GET['action'] : null;
@@ -28,16 +28,16 @@ $check = Security::check_token('request');
$token = Security::get_token();
if ($action === 'add') {
- $interbreadcrumb[]=array('url' => 'grade_models.php','name' => get_lang('GradeModel'));
- $interbreadcrumb[]=array('url' => '#','name' => get_lang('Add'));
+ $interbreadcrumb[] = array('url' => 'grade_models.php', 'name' => get_lang('GradeModel'));
+ $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Add'));
} elseif ($action == 'edit') {
- $interbreadcrumb[]=array('url' => 'grade_models.php','name' => get_lang('GradeModel'));
- $interbreadcrumb[]=array('url' => '#','name' => get_lang('Edit'));
+ $interbreadcrumb[] = array('url' => 'grade_models.php', 'name' => get_lang('GradeModel'));
+ $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Edit'));
} else {
- $interbreadcrumb[]=array('url' => '#','name' => get_lang('GradeModel'));
+ $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('GradeModel'));
}
-$htmlHeadXtra[]= '';
}
@@ -114,7 +114,7 @@ if ($editForm->validate()) {
);
}
- header('Location: '.api_get_path(WEB_CODE_PATH) . 'admin/skill_list.php');
+ header('Location: '.api_get_path(WEB_CODE_PATH).'admin/skill_list.php');
exit;
}
diff --git a/main/admin/sub_language_ajax.inc.php b/main/admin/sub_language_ajax.inc.php
index 4ce74491db..f0df5a64de 100755
--- a/main/admin/sub_language_ajax.inc.php
+++ b/main/admin/sub_language_ajax.inc.php
@@ -12,9 +12,9 @@ require_once __DIR__.'/../inc/global.inc.php';
api_protect_admin_script();
-$new_language = Security::remove_XSS($_REQUEST['new_language']);
-$language_variable = Security::remove_XSS($_REQUEST['variable_language']);
-$file_id = intval($_REQUEST['file_id']);
+$new_language = Security::remove_XSS($_REQUEST['new_language']);
+$language_variable = Security::remove_XSS($_REQUEST['variable_language']);
+$file_id = intval($_REQUEST['file_id']);
/**
* Code
*/
@@ -30,10 +30,10 @@ if (isset($new_language) && isset($language_variable) && isset($file_id)) {
//update variable language
// Replace double quotes to avoid parse errors
- $new_language = str_replace('"', '\"',$new_language);
+ $new_language = str_replace('"', '\"', $new_language);
// Replace new line signs to avoid parse errors - see #6773
- $new_language = str_replace("\n","\\n",$new_language);
- $all_file_of_directory[$language_variable]="\"".$new_language."\";";
+ $new_language = str_replace("\n", "\\n", $new_language);
+ $all_file_of_directory[$language_variable] = "\"".$new_language."\";";
$result_array = array();
foreach ($all_file_of_directory as $key_value=>$value_info) {
@@ -43,7 +43,7 @@ if (isset($new_language) && isset($language_variable) && isset($file_id)) {
if (!empty($result_array)) {
foreach ($result_array as $key => $result) {
if ($result == false) {
- $variables_with_problems .=$key.' ';
+ $variables_with_problems .= $key.' ';
}
}
}
@@ -53,7 +53,7 @@ if (isset($new_language) && isset($language_variable) && isset($file_id)) {
Display::return_message(get_lang('TheNewWordHasBeenAdded'), 'success')
);
- $redirectUrl = api_get_path(WEB_CODE_PATH) . 'admin/extra_fields.php?type=';
+ $redirectUrl = api_get_path(WEB_CODE_PATH).'admin/extra_fields.php?type=';
switch ($_REQUEST['extra_field_type']) {
case ExtraField::USER_FIELD_TYPE:
diff --git a/main/announcements/download.php b/main/announcements/download.php
index 7f078c9729..c77ee74de4 100755
--- a/main/announcements/download.php
+++ b/main/announcements/download.php
@@ -28,7 +28,7 @@ $doc_url = str_replace('///', '&', $doc_url);
$doc_url = str_replace(' ', '+', $doc_url);
$doc_url = str_replace('/..', '', $doc_url); //echo $doc_url;
-if (strpos($doc_url,'../') OR strpos($doc_url,'/..')) {
+if (strpos($doc_url, '../') OR strpos($doc_url, '/..')) {
$doc_url = '';
}
@@ -43,8 +43,8 @@ if (is_dir($full_file_name)) {
//remove last slash if present
//$doc_url = ($doc_url{strlen($doc_url)-1}=='/')?substr($doc_url,0,strlen($doc_url)-1):$doc_url;
//mod_rewrite can change /some/path/ to /some/path// in some cases, so clean them all off (René)
- while ($doc_url{$dul = strlen($doc_url)-1}=='/') {
- $doc_url = substr($doc_url,0,$dul);
+ while ($doc_url{$dul = strlen($doc_url) - 1} == '/') {
+ $doc_url = substr($doc_url, 0, $dul);
}
//create the path
$document_explorer = api_get_path(WEB_COURSE_PATH).api_get_course_path(); // home course path
@@ -66,10 +66,10 @@ $sql = "SELECT filename FROM $tbl_announcement_attachment
$result = Database::query($sql);
if (Database::num_rows($result) > 0) {
- $row= Database::fetch_array($result);
- $title = str_replace(' ','_', $row['filename']);
+ $row = Database::fetch_array($result);
+ $title = str_replace(' ', '_', $row['filename']);
if (Security::check_abs_path($full_file_name,
- api_get_path(SYS_COURSE_PATH) . api_get_course_path() . '/upload/announcements/')
+ api_get_path(SYS_COURSE_PATH).api_get_course_path().'/upload/announcements/')
) {
$result = DocumentManager::file_send_for_download($full_file_name, true, $title);
if ($result === false) {
diff --git a/main/attendance/calendar_logins.php b/main/attendance/calendar_logins.php
index df017de8bd..1e5ff5fb1d 100644
--- a/main/attendance/calendar_logins.php
+++ b/main/attendance/calendar_logins.php
@@ -4,7 +4,7 @@
// See AttendanceController::calendarLogins function
echo '';
echo $form;
echo $table;
diff --git a/main/blog/download.php b/main/blog/download.php
index b9a3e130fa..861b2645bb 100755
--- a/main/blog/download.php
+++ b/main/blog/download.php
@@ -12,7 +12,7 @@
session_cache_limiter('public');
require_once __DIR__.'/../inc/global.inc.php';
-$this_section=SECTION_COURSES;
+$this_section = SECTION_COURSES;
// IMPORTANT to avoid caching of documents
header('Expires: Wed, 01 Jan 1990 00:00:00 GMT');
@@ -29,7 +29,7 @@ $doc_url = str_replace('///', '&', $doc_url);
$doc_url = str_replace(' ', '+', $doc_url);
$doc_url = str_replace('/..', '', $doc_url); //echo $doc_url;
-if (! isset($_course)) {
+if (!isset($_course)) {
api_not_allowed(true);
}
$full_file_name = api_get_path(SYS_COURSE_PATH).api_get_course_path().'/upload/blog/'.$doc_url;
@@ -37,7 +37,7 @@ $full_file_name = api_get_path(SYS_COURSE_PATH).api_get_course_path().'/upload/b
//if the rewrite rule asks for a directory, we redirect to the course view
if (is_dir($full_file_name)) {
//remove last slash if present
- while ($doc_url{$dul = strlen($doc_url)-1}=='/') $doc_url = substr($doc_url,0,$dul);
+ while ($doc_url{$dul = strlen($doc_url) - 1} == '/') $doc_url = substr($doc_url, 0, $dul);
//create the path
$document_explorer = api_get_path(WEB_COURSE_PATH).api_get_course_path(); // home course path
//redirect
diff --git a/main/document/slideshow.inc.php b/main/document/slideshow.inc.php
index 3f8c0c7303..1faf6448bb 100755
--- a/main/document/slideshow.inc.php
+++ b/main/document/slideshow.inc.php
@@ -34,7 +34,7 @@
function resize_image($image, $target_width, $target_height, $slideshow = 0) {
// Modifications by Ivan Tcholakov, 04-MAY-2009.
$result = array();
- if ( (isset($_SESSION['image_resizing']) && $_SESSION['image_resizing']== 'resizing') or $slideshow == 1) {
+ if ((isset($_SESSION['image_resizing']) && $_SESSION['image_resizing'] == 'resizing') or $slideshow == 1) {
$new_sizes = api_resize_image($image, $target_width, $target_height);
$result[] = $new_sizes['height'];
$result[] = $new_sizes['width'];
diff --git a/main/gradebook/gradebook_view_result.php b/main/gradebook/gradebook_view_result.php
index e91ce04606..39bb710e5d 100755
--- a/main/gradebook/gradebook_view_result.php
+++ b/main/gradebook/gradebook_view_result.php
@@ -62,7 +62,7 @@ if (isset($_GET['editres'])) {
$resultedit[0],
'edit_result_form',
null,
- api_get_self() . '?editres=' . $resultedit[0]->get_id() . '&selecteval=' . $select_eval.'&'.api_get_cidreq()
+ api_get_self().'?editres='.$resultedit[0]->get_id().'&selecteval='.$select_eval.'&'.api_get_cidreq()
);
if ($edit_res_form->validate()) {
@@ -81,21 +81,21 @@ if (isset($_GET['editres'])) {
unset($result);
Display::addFlash(Display::return_message(get_lang('ResultEdited'), 'normal', false));
- header('Location: gradebook_view_result.php?selecteval=' . $select_eval . '&editresmessage=&'.api_get_cidreq());
+ header('Location: gradebook_view_result.php?selecteval='.$select_eval.'&editresmessage=&'.api_get_cidreq());
exit;
}
}
$file_type = null;
if (isset($_GET['import'])) {
$interbreadcrumb[] = array(
- 'url' => api_get_path(WEB_CODE_PATH).'gradebook/gradebook_view_result.php?selecteval=' . $select_eval.'&'.api_get_cidreq(),
+ 'url' => api_get_path(WEB_CODE_PATH).'gradebook/gradebook_view_result.php?selecteval='.$select_eval.'&'.api_get_cidreq(),
'name' => get_lang('ViewResult')
);
$import_result_form = new DataForm(
DataForm :: TYPE_IMPORT,
'import_result_form',
null,
- api_get_self() . '?import=&selecteval=' . $select_eval,
+ api_get_self().'?import=&selecteval='.$select_eval,
'_blank',
''
);
@@ -123,7 +123,7 @@ if (isset($_GET['import'])) {
if (($importedresult['user_id'] == $allresult->get_user_id())) {
if ($importedresult['score'] != $allresult->get_score()) {
if (!isset($values['overwrite'])) {
- header('Location: '.api_get_path(WEB_CODE_PATH).'gradebook/gradebook_view_result.php?selecteval=' . $select_eval . '&import_score_error=' . $importedresult['user_id']);
+ header('Location: '.api_get_path(WEB_CODE_PATH).'gradebook/gradebook_view_result.php?selecteval='.$select_eval.'&import_score_error='.$importedresult['user_id']);
exit;
break;
} else {
@@ -141,7 +141,7 @@ if (isset($_GET['import'])) {
}
}
if ($importedresult['user_id'] == null) {
- header('Location: gradebook_view_result.php?selecteval=' . $select_eval . '&incorrectdata=');
+ header('Location: gradebook_view_result.php?selecteval='.$select_eval.'&incorrectdata=');
exit;
}
$userinfo = api_get_user_info($importedresult['user_id']);
@@ -150,13 +150,13 @@ if (isset($_GET['import'])) {
$userinfo['official_code'] != $importedresult['official_code']
) {
if (!isset($values['ignoreerrors'])) {
- header('Location: gradebook_view_result.php?selecteval=' . $select_eval . '&import_user_error=' . $importedresult['user_id']);
+ header('Location: gradebook_view_result.php?selecteval='.$select_eval.'&import_user_error='.$importedresult['user_id']);
exit;
}
}
if ($added != '1') {
if ($importedresult['score'] > $eval[0]->get_max()) {
- header('Location: gradebook_view_result.php?selecteval=' . $select_eval . '&overwritemax=');
+ header('Location: gradebook_view_result.php?selecteval='.$select_eval.'&overwritemax=');
exit;
}
$result = new Result();
@@ -175,7 +175,7 @@ if (isset($_GET['import'])) {
}
}
} else {
- header('Location: ' . api_get_self() . '?import=&selecteval=' . $select_eval . '&importnofile=');
+ header('Location: '.api_get_self().'?import=&selecteval='.$select_eval.'&importnofile=');
Display::addFlash(
Display::return_message(
get_lang('ImportNoFile'),
@@ -187,7 +187,7 @@ if (isset($_GET['import'])) {
exit;
}
if ($overwritescore != 0) {
- header('Location: ' . api_get_self() . '?selecteval=' . $select_eval. '&importoverwritescore=' . $overwritescore);
+ header('Location: '.api_get_self().'?selecteval='.$select_eval.'&importoverwritescore='.$overwritescore);
Display::addFlash(
Display::return_message(
get_lang('ImportOverWriteScore').' '.$overwritescore
@@ -203,7 +203,7 @@ if (isset($_GET['import'])) {
false
)
);
- header('Location: ' . api_get_self() . '?selecteval=' . $select_eval. '¬hingadded=');
+ header('Location: '.api_get_self().'?selecteval='.$select_eval.'¬hingadded=');
exit;
}
Display::addFlash(
@@ -213,7 +213,7 @@ if (isset($_GET['import'])) {
false
)
);
- header('Location: ' . api_get_self() . '?selecteval=' . $select_eval . '&importok=');
+ header('Location: '.api_get_self().'?selecteval='.$select_eval.'&importok=');
exit;
}
}
@@ -228,7 +228,7 @@ if (isset($_GET['export'])) {
DataForm :: TYPE_EXPORT,
'export_result_form',
null,
- api_get_self() . '?export=&selecteval=' . $select_eval,
+ api_get_self().'?export=&selecteval='.$select_eval,
'_blank',
$locked_status
);
@@ -239,7 +239,7 @@ if (isset($_GET['export'])) {
if ($export_result_form->validate()) {
$export = $export_result_form->exportValues();
$file_type = $export['file_type'];
- $filename = 'export_results_' . gmdate('Y-m-d_H-i-s');
+ $filename = 'export_results_'.gmdate('Y-m-d_H-i-s');
$results = Result :: load(null, null, $select_eval);
$data = array(); //when file type is csv, add a header to the output file
if ($file_type == 'csv') {
@@ -259,9 +259,9 @@ if (isset($_GET['export'])) {
$datagen = new ResultsDataGenerator($eval[0], $allresults);
// set headers pdf
- !empty($_user['official_code']) ? $officialcode = $_user['official_code'] . ' - ' : '';
+ !empty($_user['official_code']) ? $officialcode = $_user['official_code'].' - ' : '';
- $h1 = array(get_lang('Teacher'), $officialcode . $_user['firstName'] . ', ' . $_user['lastName']);
+ $h1 = array(get_lang('Teacher'), $officialcode.$_user['firstName'].', '.$_user['lastName']);
$h2 = array(get_lang('Score'), $eval[0]->get_max());
$h3 = array(get_lang('Course'), $_course['name']);
$h4 = array(get_lang('Weight'), $eval[0]->get_weight());
@@ -271,9 +271,9 @@ if (isset($_GET['export'])) {
$header_pdf = array($h1, $h2, $h3, $h4, $h5, $h6);
// set footer pdf
- $f1 = ' ' . get_lang('Drh');
- $f2 = ' ' . get_lang('Teacher');
- $f3 = ' ' . get_lang('Date');
+ $f1 = ' '.get_lang('Drh');
+ $f2 = ' '.get_lang('Teacher');
+ $f3 = ' '.get_lang('Date');
$footer_pdf = array($f1, $f2, $f3);
// set title pdf
@@ -282,9 +282,9 @@ if (isset($_GET['export'])) {
// set headers data table
$head_ape_name = '';
if (api_is_western_name_order()) {
- $head_ape_name = get_lang('FirstName') . ', ' . get_lang('LastName');
+ $head_ape_name = get_lang('FirstName').', '.get_lang('LastName');
} else {
- $head_ape_name = get_lang('LastName') . ', ' . get_lang('FirstName');
+ $head_ape_name = get_lang('LastName').', '.get_lang('FirstName');
}
$head_table = array(
@@ -319,15 +319,15 @@ if (isset($_GET['export'])) {
$result[] = $user_info['username'];
if (api_is_western_name_order()) {
- $result[] = $user_info['firstname'] . ', ' . $user_info['lastname'];
+ $result[] = $user_info['firstname'].', '.$user_info['lastname'];
} else {
- $result[] = $user_info['lastname'] . ', ' . $user_info['firstname'];
+ $result[] = $user_info['lastname'].', '.$user_info['firstname'];
}
if ($number_decimals == null) {
if (empty($data['scoreletter']) && !is_numeric($data['score'])) {
$result[] = get_lang('DidNotTakeTheExam');
} else {
- $result[] = api_strtoupper(get_lang('Literal' . $data['scoreletter']));
+ $result[] = api_strtoupper(get_lang('Literal'.$data['scoreletter']));
}
} else {
if (empty($data['score']) && !is_numeric($data['score'])) {
@@ -379,7 +379,7 @@ if (isset($_GET['resultdelete'])) {
$result = Result :: load($_GET['resultdelete']);
$result[0]->delete();
Display::addFlash(Display::return_message(get_lang('ResultDeleted')));
- header('Location: gradebook_view_result.php?selecteval=' . $select_eval.'&'.api_get_cidreq());
+ header('Location: gradebook_view_result.php?selecteval='.$select_eval.'&'.api_get_cidreq());
exit;
}
@@ -396,7 +396,7 @@ if (isset($_POST['action'])) {
$result[0]->delete();
$number_of_deleted_results++;
}
- header('Location: gradebook_view_result.php?massdelete=&selecteval=' . $select_eval);
+ header('Location: gradebook_view_result.php?massdelete=&selecteval='.$select_eval);
exit;
break;
}
@@ -437,14 +437,14 @@ if (isset($_GET['print'])) {
$htmlHeadXtra[] = '';
$htmlHeadXtra[] = $form_style;
-if (api_get_setting('search_enabled')=='true') {
+if (api_get_setting('search_enabled') == 'true') {
$specific_fields = get_specific_field_list();
}
if (isset($_POST['convert'])) {
$cwdir = getcwd();
if (isset($_FILES['user_file'])) {
- $allowed_extensions = array('doc','docx','odt','txt','sxw','rtf');
- if (in_array(strtolower(pathinfo($_FILES['user_file']['name'],PATHINFO_EXTENSION)),$allowed_extensions)) {
+ $allowed_extensions = array('doc', 'docx', 'odt', 'txt', 'sxw', 'rtf');
+ if (in_array(strtolower(pathinfo($_FILES['user_file']['name'], PATHINFO_EXTENSION)), $allowed_extensions)) {
require('../lp/lp_upload.php');
if (isset($o_doc) && $first_item_id != 0) {
// Search-related section
- if (api_get_setting('search_enabled')=='true') {
- require_once(api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php');
+ if (api_get_setting('search_enabled') == 'true') {
+ require_once(api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php');
$specific_fields = get_specific_field_list();
foreach ($specific_fields as $specific_field) {
@@ -77,7 +77,7 @@ if (!$is_allowed_to_edit) {
api_not_allowed(true);
}
-$interbreadcrumb[]= array ("url"=>"../lp/lp_controller.php?action=list", "name"=> get_lang("Doc"));
+$interbreadcrumb[] = array("url"=>"../lp/lp_controller.php?action=list", "name"=> get_lang("Doc"));
$nameTools = get_lang("WoogieConversionPowerPoint");
Display :: display_header($nameTools);
@@ -97,7 +97,7 @@ $s_style = "border-width: 1px;
border-color: #4171B5;
color: #000;";
-$s_style_error="border-width: 1px;
+$s_style_error = "border-width: 1px;
border-style: solid;
margin-left: 0;
margin-top: 10px;
@@ -123,7 +123,7 @@ $form = new FormValidator('update_course', 'POST', '', '', 'style="margin: 0;"')
// build the form
-$form -> addElement ('html',' ');
+$form -> addElement('html', ' ');
$div_upload_limit = ' '.get_lang('UploadMaxSize').' : '.ini_get('post_max_size');
@@ -136,7 +136,7 @@ $user_file_template =
{error}
EOT;
-$renderer->setElementTemplate($user_file_template,'user_file');
+$renderer->setElementTemplate($user_file_template, 'user_file');
// set template for other elements
$user_file_template =
@@ -174,7 +174,7 @@ $form->addElement('hidden', 'split_steps', 'per_page');
$form->addElement('submit', 'convert', get_lang('ConvertToLP'), 'class="convert_button"');
$form->addElement('hidden', 'woogie', 'true');
$form->addProgress();
-$defaults = array('split_steps'=>'per_page','index_document'=>'checked="checked"');
+$defaults = array('split_steps'=>'per_page', 'index_document'=>'checked="checked"');
$form -> setDefaults($defaults);
// display the form
diff --git a/main/work/student_work.php b/main/work/student_work.php
index 8327cabd11..9c46a4bac6 100755
--- a/main/work/student_work.php
+++ b/main/work/student_work.php
@@ -4,7 +4,7 @@
use ChamiloSession as Session;
require_once __DIR__.'/../inc/global.inc.php';
-$current_course_tool = TOOL_STUDENTPUBLICATION;
+$current_course_tool = TOOL_STUDENTPUBLICATION;
api_protect_course_script(true);
diff --git a/main/work/view.php b/main/work/view.php
index 50d8ac5d6b..2e3e78a7f8 100755
--- a/main/work/view.php
+++ b/main/work/view.php
@@ -2,7 +2,7 @@
/* For licensing terms, see /license.txt */
require_once __DIR__.'/../inc/global.inc.php';
-$current_course_tool = TOOL_STUDENTPUBLICATION;
+$current_course_tool = TOOL_STUDENTPUBLICATION;
require_once 'work.lib.php';
@@ -52,7 +52,7 @@ if ((user_is_author($id) || $isDrhOfCourse || (api_is_allowed_to_edit() || api_i
$userInfo = api_get_user_info($work['user_id']);
$interbreadcrumb[] = array('url' => $url_dir, 'name' => $my_folder_data['title']);
$interbreadcrumb[] = array('url' => '#', 'name' => $userInfo['complete_name']);
- $interbreadcrumb[] = array('url' => '#','name' => $work['title']);
+ $interbreadcrumb[] = array('url' => '#', 'name' => $work['title']);
if (($courseInfo['show_score'] == 0 &&
$work['active'] == 1 &&
diff --git a/main/work/work.php b/main/work/work.php
index 66ed1d3caa..d853521ccc 100755
--- a/main/work/work.php
+++ b/main/work/work.php
@@ -6,7 +6,7 @@
**/
require_once __DIR__.'/../inc/global.inc.php';
-$current_course_tool = TOOL_STUDENTPUBLICATION;
+$current_course_tool = TOOL_STUDENTPUBLICATION;
api_protect_course_script(true);
@@ -36,7 +36,7 @@ $tool_name = get_lang('StudentPublications');
$item_id = isset($_REQUEST['item_id']) ? intval($_REQUEST['item_id']) : null;
$origin = isset($_REQUEST['origin']) ? Security::remove_XSS($_REQUEST['origin']) : '';
$course_dir = api_get_path(SYS_COURSE_PATH).$courseInfo['path'];
-$base_work_dir = $course_dir . '/work';
+$base_work_dir = $course_dir.'/work';
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'list';
//Download folder
@@ -73,7 +73,7 @@ if (!empty($groupId)) {
'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
'name' => get_lang('StudentPublications'),
);
- $url_dir = api_get_path(WEB_CODE_PATH).'work/work.php?&id=' . $work_id.'&'.api_get_cidreq();
+ $url_dir = api_get_path(WEB_CODE_PATH).'work/work.php?&id='.$work_id.'&'.api_get_cidreq();
if (!empty($my_folder_data)) {
$interbreadcrumb[] = array('url' => $url_dir, 'name' => $my_folder_data['title']);
}
@@ -116,7 +116,7 @@ if (!empty($groupId)) {
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditToolOptions'));
}
if ($action == 'create_dir') {
- $interbreadcrumb[] = array('url' => '#','name' => get_lang('CreateAssignment'));
+ $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('CreateAssignment'));
}
}
}
@@ -163,7 +163,7 @@ switch ($action) {
if (!$is_allowed_to_edit) {
api_not_allowed();
}
- $addUrl = api_get_path(WEB_CODE_PATH) . 'work/work.php?action=create_dir&' . api_get_cidreq();
+ $addUrl = api_get_path(WEB_CODE_PATH).'work/work.php?action=create_dir&'.api_get_cidreq();
$form = new FormValidator(
'form1',
'post',
@@ -206,7 +206,7 @@ switch ($action) {
$result = deleteDirWork($_REQUEST['id']);
if ($result) {
$message = Display::return_message(
- get_lang('DirDeleted') . ': ' . $work_to_delete['title'],
+ get_lang('DirDeleted').': '.$work_to_delete['title'],
'success'
);
Display::addFlash($message);
@@ -237,16 +237,16 @@ switch ($action) {
if ($move_to_path == -1) {
$move_to_path = '/';
} elseif (substr($move_to_path, -1, 1) != '/') {
- $move_to_path = $move_to_path .'/';
+ $move_to_path = $move_to_path.'/';
}
// Security fix: make sure they can't move files that are not in the document table
if ($path = get_work_path($item_id)) {
- if (move($course_dir.'/'.$path, $base_work_dir . $move_to_path)) {
+ if (move($course_dir.'/'.$path, $base_work_dir.$move_to_path)) {
// Update db
updateWorkUrl(
$item_id,
- 'work' . $move_to_path,
+ 'work'.$move_to_path,
$_REQUEST['move_to_id']
);
@@ -345,7 +345,7 @@ switch ($action) {
$content .= '';
$content .= '';
$content .= '';
- $content .= ' ';
+ $content .= ' ';
$content .= showStudentList($work_id);
$content .= ' ';
} else {
diff --git a/main/work/work_list_others.php b/main/work/work_list_others.php
index 97b1d7d76b..06ede78eb1 100755
--- a/main/work/work_list_others.php
+++ b/main/work/work_list_others.php
@@ -3,7 +3,7 @@
require_once __DIR__.'/../inc/global.inc.php';
-$current_course_tool = TOOL_STUDENTPUBLICATION;
+$current_course_tool = TOOL_STUDENTPUBLICATION;
api_protect_course_script(true);
@@ -78,7 +78,7 @@ Display :: display_header(null);
echo '';
echo ' '.
- Display::return_icon('exercice_uncheck.png', get_lang('ViewUsersWithoutTask'),'',ICON_SIZE_MEDIUM)."";
+ Display::return_icon('exercice_uncheck.png', get_lang('ViewUsersWithoutTask'), '', ICON_SIZE_MEDIUM)."";
} else {
if (!isset($_GET['action']) || (isset($_GET['action']) && $_GET['action'] != 'send_mail')) {
$output .= ' '.
diff --git a/plugin/advanced_subscription/test/ws_session_user.php b/plugin/advanced_subscription/test/ws_session_user.php
index 2d7438aea4..909e9e959a 100644
--- a/plugin/advanced_subscription/test/ws_session_user.php
+++ b/plugin/advanced_subscription/test/ws_session_user.php
@@ -8,7 +8,7 @@
/**
* Init
*/
-require_once __DIR__ . '/../config.php';
+require_once __DIR__.'/../config.php';
// Protect test
api_protect_admin_script();
@@ -42,7 +42,7 @@ if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
}
// Check if a file that limits access from webservices exists and contains
// the restraining check
-if (is_file(api_get_path(WEB_CODE_PATH) .'webservices/webservice-auth-ip.conf.php')) {
+if (is_file(api_get_path(WEB_CODE_PATH).'webservices/webservice-auth-ip.conf.php')) {
include api_get_path(WEB_CODE_PATH).'webservices/webservice-auth-ip.conf.php';
if (!empty($ws_auth_ip)) {
$check_ip = true;
@@ -63,7 +63,7 @@ if ($check_ip) {
$params['secret_key'] = sha1($security_key);
// Registration soap wsdl
-$wsUrl = api_get_path(WEB_CODE_PATH) . 'webservices/registration.soap.php?wsdl';
+$wsUrl = api_get_path(WEB_CODE_PATH).'webservices/registration.soap.php?wsdl';
$options = array(
'location' => $wsUrl,
'uri' => $wsUrl
@@ -79,7 +79,7 @@ try {
$result = $client->__soapCall('HookAdvancedSubscription..WSSessionGetDetailsByUser', array($params));
if (is_object($result) && isset($result->action_url)) {
echo ' ';
- echo Display::url("message" . $result->message, $result->action_url);
+ echo Display::url("message".$result->message, $result->action_url);
}
} catch (\Exception $e) {
var_dump($e);
diff --git a/plugin/buycourses/src/process_confirm.php b/plugin/buycourses/src/process_confirm.php
index d9c176a533..b30b7a38f3 100644
--- a/plugin/buycourses/src/process_confirm.php
+++ b/plugin/buycourses/src/process_confirm.php
@@ -46,8 +46,8 @@ switch ($sale['payment_type']) {
$sale['price'],
$currency['iso_code'],
'paypal',
- api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/success.php',
- api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/error.php',
+ api_get_path(WEB_PLUGIN_PATH).'buycourses/src/success.php',
+ api_get_path(WEB_PLUGIN_PATH).'buycourses/src/error.php',
$extra
);
@@ -92,7 +92,7 @@ switch ($sale['payment_type']) {
unset($_SESSION['bc_sale_id']);
- header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/index.php');
+ header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/index.php');
exit;
}
@@ -129,7 +129,7 @@ switch ($sale['payment_type']) {
);
unset($_SESSION['bc_sale_id']);
- header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/course_catalog.php');
+ header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/course_catalog.php');
exit;
}
@@ -200,7 +200,7 @@ switch ($sale['payment_type']) {
)
);
- header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/index.php');
+ header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/index.php');
exit;
}
}
diff --git a/plugin/buycourses/src/service_success.php b/plugin/buycourses/src/service_success.php
index 912e8fbdb1..ce2787dd26 100644
--- a/plugin/buycourses/src/service_success.php
+++ b/plugin/buycourses/src/service_success.php
@@ -49,7 +49,7 @@ if ($form->validate()) {
Display::return_message($plugin->get_lang('OrderCancelled'), 'error', false)
);
- header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php');
+ header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php');
exit;
}
@@ -64,7 +64,7 @@ if ($form->validate()) {
Display::return_message($erroMessage, 'error', false)
);
unset($_SESSION['wizard']);
- header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php');
+ header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php');
exit;
}
@@ -148,7 +148,7 @@ if ($form->validate()) {
unset($_SESSION['bc_service_sale_id']);
- header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php');
+ header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php');
exit;
}
diff --git a/plugin/customfooter/plugin.php b/plugin/customfooter/plugin.php
index fa72c4574c..b59bb517fe 100644
--- a/plugin/customfooter/plugin.php
+++ b/plugin/customfooter/plugin.php
@@ -40,7 +40,7 @@ $form_settings = [];
foreach ($config as $fooid => $configrecord) {
$canonic = preg_replace('/^customfooter_/', '', $configrecord['variable']);
- if (in_array($canonic, array('footer_left', 'footer_right'))){
+ if (in_array($canonic, array('footer_left', 'footer_right'))) {
$form_settings[$canonic] = $configrecord['selected_value'];
}
}
diff --git a/plugin/google_maps/src/map_coordinates.php b/plugin/google_maps/src/map_coordinates.php
index 8c8856d8aa..22f4ebd875 100644
--- a/plugin/google_maps/src/map_coordinates.php
+++ b/plugin/google_maps/src/map_coordinates.php
@@ -23,7 +23,7 @@ $extraFieldName = array_map('trim', explode(',', $extraFieldName));
if ($apiIsEnable) {
$gmapsApiKey = $plugin->get('api_key');
- $htmlHeadXtra[] = '';
+ $htmlHeadXtra[] = '';
}
$em = Database::getManager();
diff --git a/plugin/ims_lti/ImsLtiTool.php b/plugin/ims_lti/ImsLtiTool.php
index dac4334b84..6011e30533 100644
--- a/plugin/ims_lti/ImsLtiTool.php
+++ b/plugin/ims_lti/ImsLtiTool.php
@@ -173,7 +173,7 @@ class ImsLtiTool
$foo = explode('=', $strings);
return [
- 'key' => 'custom_' . $foo[0],
+ 'key' => 'custom_'.$foo[0],
'value' => $foo[1]
];
}
|