Minor - Format code

pull/2487/head
jmontoyaa 9 years ago
parent 34fe5d29f6
commit fd0202b274
  1. 55
      main/inc/lib/banner.lib.php
  2. 20
      main/inc/lib/blog.lib.php
  3. 4
      main/inc/lib/career.lib.php
  4. 5
      main/inc/lib/certificate.lib.php
  5. 32
      main/inc/lib/chat.lib.php
  6. 82
      main/inc/lib/course_category.lib.php
  7. 1
      main/inc/lib/course_description.lib.php
  8. 5
      main/inc/lib/course_home.lib.php
  9. 5
      main/inc/lib/course_request.lib.php
  10. 10
      main/inc/lib/dashboard.lib.php
  11. 8
      main/inc/lib/database.constants.inc.php
  12. 7
      main/inc/lib/event_email_template.class.php

@ -156,11 +156,11 @@ function getCustomTabs()
{
$tableSettingsCurrent = Database::get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
$sql = "SELECT * FROM $tableSettingsCurrent
WHERE variable = 'show_tabs' AND
subkey like 'custom_tab_%'";
WHERE
variable = 'show_tabs' AND
subkey like 'custom_tab_%'";
$result = Database::query($sql);
$customTabs = array();
while ($row = Database::fetch_assoc($result)) {
$customTabs[] = $row;
}
@ -206,9 +206,7 @@ function returnNotificationMenu()
(api_get_setting('showonline', 'users') == 'true' && $user_id) ||
(api_get_setting('showonline', 'course') == 'true' && $user_id && $course_id)
) {
$number = getOnlineUsersCount($cacheEnabled);
$number_online_in_course = getOnlineUsersInCourseCount($user_id, $_course, $cacheEnabled);
// Display the who's online of the platform
@ -226,10 +224,9 @@ function returnNotificationMenu()
(is_array($_course) &&
api_get_setting('showonline', 'course') == 'true' && isset($_course['sysCode'])
)
)
{
$html .= '<li><a href="'.api_get_path(WEB_PATH).'whoisonline.php?cidReq='.$_course['sysCode'].'" target="_self">'.
Display::return_icon('course.png', get_lang('UsersOnline').' '.get_lang('InThisCourse'), array(), ICON_SIZE_TINY).' '.$number_online_in_course.' </a></li>';
) {
$html .= '<li><a href="'.api_get_path(WEB_PATH).'whoisonline.php?cidReq='.$_course['sysCode'].'" target="_self">'.
Display::return_icon('course.png', get_lang('UsersOnline').' '.get_lang('InThisCourse'), array(), ICON_SIZE_TINY).' '.$number_online_in_course.' </a></li>';
}
if (isset($user_id) && api_get_session_id() != 0) {
@ -290,7 +287,7 @@ function return_navigation_array()
if (api_get_setting('gradebook_enable') == 'true') {
if (api_get_setting('show_tabs', 'my_gradebook') == 'true') {
$navigation['mygradebook'] = $possible_tabs['mygradebook'];
} else{
} else {
$menu_navigation['mygradebook'] = $possible_tabs['mygradebook'];
}
}
@ -315,7 +312,7 @@ function return_navigation_array()
if (api_get_setting('allow_social_tool') == 'true') {
$navigation['social'] = isset($possible_tabs['social']) ? $possible_tabs['social'] : null;
}
} else{
} else {
$menu_navigation['social'] = isset($possible_tabs['social']) ? $possible_tabs['social'] : null;
}
@ -324,7 +321,7 @@ function return_navigation_array()
if (api_is_platform_admin() || api_is_drh() || api_is_session_admin()) {
$navigation['dashboard'] = isset($possible_tabs['dashboard']) ? $possible_tabs['dashboard'] : null;
}
} else{
} else {
$menu_navigation['dashboard'] = isset($possible_tabs['dashboard']) ? $possible_tabs['dashboard'] : null;
}
@ -394,14 +391,12 @@ function menuArray()
$lang = $_SESSION['_user']['language'];
}
// Preparing home folder for multiple urls
if (api_get_multiple_access_url()) {
$access_url_id = api_get_current_access_url_id();
if ($access_url_id != -1) {
// If not a dead URL
$urlInfo = api_get_access_url($access_url_id);
$url = api_remove_trailing_slash(preg_replace('/https?:\/\//i', '', $urlInfo['url']));
$cleanUrl = api_replace_dangerous_char($url);
$cleanUrl = str_replace('/', '-', $cleanUrl);
@ -428,7 +423,7 @@ function menuArray()
}
// Sanitize page content
$pageContent = api_to_system_encoding($pageContent, api_detect_encoding(strip_tags($pageContent)));
$open = str_replace('{rel_path}',api_get_path(REL_PATH), $pageContent);
$open = str_replace('{rel_path}', api_get_path(REL_PATH), $pageContent);
$open = api_to_system_encoding($open, api_detect_encoding(strip_tags($open)));
// Get the extra page content, containing the links to add to the tabs
// that are only for users already logged in
@ -446,7 +441,7 @@ function menuArray()
$openMenuTabsLoggedIn = str_replace('{rel_path}',api_get_path(REL_PATH), $pageContent);
$openMenuTabsLoggedIn = api_to_system_encoding($openMenuTabsLoggedIn, api_detect_encoding(strip_tags($openMenuTabsLoggedIn)));
}
if (!empty($open) OR !empty($openMenuTabsLoggedIn)) {
if (!empty($open) || !empty($openMenuTabsLoggedIn)) {
if (strpos($open.$openMenuTabsLoggedIn, 'show_menu') === false) {
if (api_is_anonymous()) {
$mainNavigation['navigation'][SECTION_CAMPUS] = null;
@ -604,22 +599,22 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools)
// titles for shared folders
if ($breadcrumb_step['name'] == 'shared_folder') {
$navigation_item['title'] = get_lang('UserFolders');
} elseif(strstr($breadcrumb_step['name'], 'shared_folder_session_')) {
} elseif (strstr($breadcrumb_step['name'], 'shared_folder_session_')) {
$navigation_item['title'] = get_lang('UserFolders');
} elseif(strstr($breadcrumb_step['name'], 'sf_user_')) {
} elseif (strstr($breadcrumb_step['name'], 'sf_user_')) {
$userinfo = api_get_user_info(substr($breadcrumb_step['name'], 8));
$navigation_item['title'] = $userinfo['complete_name'];
} elseif($breadcrumb_step['name'] == 'chat_files') {
} elseif ($breadcrumb_step['name'] == 'chat_files') {
$navigation_item['title'] = get_lang('ChatFiles');
} elseif($breadcrumb_step['name'] == 'images') {
} elseif ($breadcrumb_step['name'] == 'images') {
$navigation_item['title'] = get_lang('Images');
} elseif($breadcrumb_step['name'] == 'video') {
} elseif ($breadcrumb_step['name'] == 'video') {
$navigation_item['title'] = get_lang('Video');
} elseif($breadcrumb_step['name'] == 'audio') {
} elseif ($breadcrumb_step['name'] == 'audio') {
$navigation_item['title'] = get_lang('Audio');
} elseif($breadcrumb_step['name'] == 'flash') {
} elseif ($breadcrumb_step['name'] == 'flash') {
$navigation_item['title'] = get_lang('Flash');
} elseif($breadcrumb_step['name'] == 'gallery') {
} elseif ($breadcrumb_step['name'] == 'gallery') {
$navigation_item['title'] = get_lang('Gallery');
}
// Fixes breadcrumb title now we applied the Security::remove_XSS and
@ -649,7 +644,6 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools)
}
}
// part 3: The tool itself. If we are on the course homepage we do not want
// to display the title of the course because this
// is the same as the first part of the breadcrumbs (see part 1)
@ -682,6 +676,7 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools)
$view_as_student_link = api_display_tool_view_option();
}
}
if (!empty($final_navigation)) {
$lis = '';
$i = 0;
@ -698,7 +693,7 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools)
if ($final_navigation_count-1 > $i) {
$bread .= '';
}
$lis.= Display::tag('li', $bread,array('class'=>'active'));
$lis.= Display::tag('li', $bread, array('class'=>'active'));
$i++;
}
}
@ -715,7 +710,7 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools)
}
if (!empty($navigation_right)) {
foreach($navigation_right as $item){
foreach($navigation_right as $item) {
$extra_class = isset($item['class']) ? $item['class'] : null;
$lis.= Display::tag('li', $item['title'], array('class' => $extra_class.' pull-right'));
}
@ -781,7 +776,11 @@ function getOnlineUsersInCourseCount($userId, $_course, $cacheEnabled = false)
api_get_setting('time_limit_whosonline'),
$_course['id']
);
apcu_store('my_campus_whoisonline_count_simple_'.$_course['id'],$numberOnlineInCourse,15);
apcu_store(
'my_campus_whoisonline_count_simple_'.$_course['id'],
$numberOnlineInCourse,
15
);
}
} else {
$numberOnlineInCourse = who_is_online_in_this_course_count(

@ -77,16 +77,19 @@ class Blog
// Get blog members
$sql = "SELECT user.user_id, user.firstname, user.lastname
FROM " . $tbl_blogs_rel_user . " blogs_rel_user
INNER JOIN " . $tbl_users . " user
ON blogs_rel_user.user_id = user.user_id
FROM $tbl_blogs_rel_user blogs_rel_user
INNER JOIN $tbl_users user
ON (blogs_rel_user.user_id = user.user_id)
WHERE
blogs_rel_user.c_id = $course_id AND
blogs_rel_user.blog_id = '" . (int)$blog_id."'";
$result = Database::query($sql);
$blog_members = array ();
while ($user = Database::fetch_array($result)) {
$blog_members[$user['user_id']] = api_get_person_name($user['firstname'], $user['lastname']);
$blog_members[$user['user_id']] = api_get_person_name(
$user['firstname'],
$user['lastname']
);
}
return $blog_members;
@ -131,7 +134,6 @@ class Blog
$this_blog_id = Database::insert($tbl_blogs, $params);
if ($this_blog_id > 0) {
$sql = "UPDATE $tbl_blogs SET blog_id = iid WHERE iid = $this_blog_id";
Database::query($sql);
@ -146,7 +148,6 @@ class Blog
}
// Make first post. :)
$params = [
'post_id' => 0,
'c_id' => $course_id,
@ -213,7 +214,8 @@ class Blog
// Update course homepage link
$sql = "UPDATE $tbl_tool SET
name = '".Database::escape_string($title)."'
WHERE c_id = $course_id AND link = 'blog/blog.php?blog_id=".(int)$blog_id."' LIMIT 1";
WHERE c_id = $course_id AND link = 'blog/blog.php?blog_id=".(int)$blog_id."'
LIMIT 1";
Database::query($sql);
}
@ -400,7 +402,7 @@ class Blog
Database::query($sql);
// Delete posts and attachments
delete_all_blog_attachment($blog_id,$post_id);
delete_all_blog_attachment($blog_id, $post_id);
}
/**
@ -525,7 +527,7 @@ class Blog
// Delete them recursively
while ($comment = Database::fetch_array($result)) {
Blog::delete_comment($blog_id,$post_id,$comment['comment_id']);
Blog::delete_comment($blog_id, $post_id, $comment['comment_id']);
}
// Finally, delete the selected comment to

@ -62,8 +62,8 @@ class Career extends Model
$promotion = new Promotion();
$promotion_list = $promotion->get_all_promotions_by_career_id($career_id);
if (!empty($promotion_list)) {
foreach($promotion_list as $item) {
$params['id'] = $item['id'];
foreach ($promotion_list as $item) {
$params['id'] = $item['id'];
$params['status'] = $status;
$promotion->update($params);
$promotion->update_all_sessions_status_by_promotion_id($params['id'], $status);

@ -58,7 +58,6 @@ class Certificate extends Model
}
if ($this->user_id) {
// Need to be called before any operation
$this->check_certificate_path();
@ -136,11 +135,9 @@ class Certificate extends Model
@unlink($this->qr_file);
}
if ($delete_db || $force_delete) {
return parent::delete($this->certificate_data['id']);
}
} else {
return parent::delete($this->certificate_data['id']);
}
}
@ -325,7 +322,7 @@ class Certificate extends Model
if (!empty($content)) {
foreach ($content as $key => $value) {
$my_header = str_replace(array('((', '))') , '', $headers[$key]);
$my_header = str_replace(array('((', '))'), '', $headers[$key]);
$final_content[$my_header] = $value;
}
}

@ -11,7 +11,14 @@ use ChamiloSession as Session;
class Chat extends Model
{
public $table;
public $columns = array('id', 'from_user', 'to_user', 'message', 'sent', 'recd');
public $columns = array(
'id',
'from_user',
'to_user',
'message',
'sent',
'recd',
);
public $window_list = array();
/**
@ -93,7 +100,6 @@ class Chat extends Model
}
$items = array();
foreach ($chat_list as $from_user_id => $rows) {
$rows = $rows['items'];
$user_info = api_get_user_info($from_user_id, true);
@ -191,14 +197,14 @@ class Chat extends Model
$to_user_id,
$message,
$printResult = true,
$sanitize = true
$sanitize = true
) {
$user_friend_relation = SocialManager::get_relation_between_contacts(
$from_user_id,
$to_user_id
);
if ($user_friend_relation == USER_RELATION_TYPE_FRIEND) {
if ($user_friend_relation == USER_RELATION_TYPE_FRIEND) {
$user_info = api_get_user_info($to_user_id, true);
$this->save_window($to_user_id);
@ -283,7 +289,7 @@ class Chat extends Model
*/
public static function setDisableChat($status = true)
{
$_SESSION['disable_chat'] = $status;
Session::write('disable_chat', $status);
}
/**
@ -292,10 +298,10 @@ class Chat extends Model
*/
public static function disableChat()
{
if (!empty($_SESSION['disable_chat'])){
$status = $_SESSION['disable_chat'];
if ($status == true){
$_SESSION['disable_chat'] = null;
$status = Session::read('disable_chat');
if (!empty($status)) {
if ($status == true) {
Session::write('disable_chat', null);
return true;
}
}
@ -303,10 +309,14 @@ class Chat extends Model
return false;
}
/**
* @return bool
*/
public function is_chat_blocked_by_exercises()
{
if (isset($_SESSION['current_exercises'])) {
foreach ($_SESSION['current_exercises'] as $attempt_status) {
$currentExercises = Session::read('current_exercises');
if (!empty($currentExercises)) {
foreach ($currentExercises as $attempt_status) {
if ($attempt_status == true) {
return true;
}

@ -114,7 +114,7 @@ class CourseCategory
$code = CourseManager::generate_course_code($code);
$sql = "SELECT 1 FROM $tbl_category
WHERE code = '".Database::escape_string($code)."'";
WHERE code = '".Database::escape_string($code)."'";
$result = Database::query($sql);
if (Database::num_rows($result)) {
return false;
@ -177,9 +177,7 @@ class CourseCategory
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$tbl_category = Database::get_main_table(TABLE_MAIN_CATEGORY);
$node = Database::escape_string($node);
$result = Database::query("SELECT parent_id, tree_pos FROM $tbl_category WHERE code='$node'");
if ($row = Database::fetch_array($result)) {
@ -221,8 +219,11 @@ class CourseCategory
$code = CourseManager::generate_course_code($code);
// Updating category
$sql = "UPDATE $tbl_category SET name='$name', code='$code', auth_course_child = '$canHaveCourses'
WHERE code = '$old_code'";
$sql = "UPDATE $tbl_category SET
name='$name',
code='$code',
auth_course_child = '$canHaveCourses'
WHERE code = '$old_code'";
Database::query($sql);
// Updating children
@ -259,22 +260,22 @@ class CourseCategory
}
$sql = "SELECT code,tree_pos
FROM $tbl_category
WHERE
tree_pos < $tree_pos
$parentIdCondition
ORDER BY tree_pos DESC
LIMIT 0,1";
$result = Database::query($sql);
if (!$row = Database::fetch_array($result)) {
$sql = "SELECT code, tree_pos
FROM $tbl_category
WHERE
tree_pos > $tree_pos
tree_pos < $tree_pos
$parentIdCondition
ORDER BY tree_pos DESC
LIMIT 0,1";
$result = Database::query($sql);
if (!$row = Database::fetch_array($result)) {
$sql = "SELECT code, tree_pos
FROM $tbl_category
WHERE
tree_pos > $tree_pos
$parentIdCondition
ORDER BY tree_pos DESC
LIMIT 0,1";
$result2 = Database::query($sql);
if (!$row = Database::fetch_array($result2)) {
return false;
@ -282,13 +283,13 @@ class CourseCategory
}
$sql = "UPDATE $tbl_category
SET tree_pos ='".$row['tree_pos']."'
WHERE code='$code'";
SET tree_pos ='".$row['tree_pos']."'
WHERE code='$code'";
Database::query($sql);
$sql = "UPDATE $tbl_category
SET tree_pos = '$tree_pos'
WHERE code= '".$row['code']."'";
SET tree_pos = '$tree_pos'
WHERE code= '".$row['code']."'";
Database::query($sql);
return true;
@ -308,12 +309,15 @@ class CourseCategory
if (empty($categoryId)) {
return 0;
}
$sql = "SELECT id, code FROM $tbl_category WHERE parent_id = $categoryId";
$sql = "SELECT id, code FROM $tbl_category
WHERE parent_id = $categoryId";
$result = Database::query($sql);
while ($row = Database::fetch_array($result)) {
$count += self::courseCategoryChildrenCount($row['id']);
}
$sql = "UPDATE $tbl_category SET children_count = $count WHERE id = $categoryId";
$sql = "UPDATE $tbl_category SET
children_count = $count
WHERE id = $categoryId";
Database::query($sql);
return $count + 1;
@ -328,7 +332,8 @@ class CourseCategory
{
$tbl_category = Database::get_main_table(TABLE_MAIN_CATEGORY);
$categoryCode = Database::escape_string($categoryCode);
$sql = "SELECT code, id FROM $tbl_category WHERE parent_id = '$categoryCode'";
$sql = "SELECT code, id FROM $tbl_category
WHERE parent_id = '$categoryCode'";
$result = Database::query($sql);
$children = array();
while ($row = Database::fetch_array($result, 'ASSOC')) {
@ -422,7 +427,6 @@ class CourseCategory
$moveIcon = Display::return_icon('up.png', get_lang('UpInSameLevel'), null, ICON_SIZE_SMALL);
foreach ($categories as $category) {
$editUrl = $mainUrl.'&id='.$category['code'].'&action=edit';
$moveUrl = $mainUrl.'&id='.$category['code'].'&action=moveUp&tree_pos='.$category['tree_pos'];
$deleteUrl = $mainUrl.'&id='.$category['code'].'&action=delete';
@ -468,8 +472,8 @@ class CourseCategory
{
$tbl_category = Database::get_main_table(TABLE_MAIN_CATEGORY);
$sql = "SELECT name FROM $tbl_category
WHERE parent_id IS NULL
ORDER BY tree_pos";
WHERE parent_id IS NULL
ORDER BY tree_pos";
return Database::store_result(Database::query($sql));
}
@ -481,7 +485,10 @@ class CourseCategory
*/
public static function addToUrl($id)
{
UrlManager::addCourseCategoryListToUrl(array($id), array(api_get_current_access_url_id()));
UrlManager::addCourseCategoryListToUrl(
array($id),
array(api_get_current_access_url_id())
);
}
/**
@ -619,7 +626,6 @@ class CourseCategory
$visibilityCondition
";
// Showing only the courses of the current portal access_url_id.
if (api_is_multiple_url_enabled()) {
$url_access_id = api_get_current_access_url_id();
if ($url_access_id != -1) {
@ -667,7 +673,6 @@ class CourseCategory
list($num_records) = Database::fetch_row($result);
if (api_is_multiple_url_enabled()) {
$url_access_id = api_get_current_access_url_id();
$tbl_url_rel_course = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
@ -684,12 +689,16 @@ class CourseCategory
WHERE
access_url_id = $url_access_id AND
RAND()*$num_records< $random_value
$without_special_courses $visibilityCondition
$without_special_courses
$visibilityCondition
ORDER BY RAND()
LIMIT 0, $random_value";
} else {
$sql = "SELECT id FROM $tbl_course course
WHERE RAND()*$num_records< $random_value $without_special_courses $visibilityCondition
WHERE
RAND()*$num_records< $random_value
$without_special_courses
$visibilityCondition
ORDER BY RAND()
LIMIT 0, $random_value";
}
@ -729,7 +738,7 @@ class CourseCategory
ORDER BY title $limitFilter ";
}
//showing only the courses of the current Chamilo access_url_id
// Showing only the courses of the current Chamilo access_url_id
if (api_is_multiple_url_enabled()) {
$url_access_id = api_get_current_access_url_id();
$tbl_url_rel_course = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
@ -838,7 +847,6 @@ class CourseCategory
$table = Database::get_main_table(TABLE_MAIN_CATEGORY);
if (empty($list)) {
$sql = "SELECT * FROM $table
WHERE (parent_id IS NULL) ";
$result = Database::query($sql);
@ -1054,8 +1062,12 @@ class CourseCategory
* @param string $content
* @return string
*/
public static function getPageNumberItem($pageNumber, $pageLength, $liAttributes = array(), $content = '')
{
public static function getPageNumberItem(
$pageNumber,
$pageLength,
$liAttributes = array(),
$content = ''
) {
// Get page URL
$url = self::getCourseCategoryUrl(
$pageNumber,

@ -68,7 +68,6 @@ class CourseDescription
return $results;
}
/**
* Get all data of course description by session id,
* first you must set session_id property with the object CourseDescription

@ -299,7 +299,6 @@ class CourseHome
if (isset($all_tools_list)) {
$lnk = array();
foreach ($all_tools_list as & $tool) {
if ($tool['image'] == 'scormbuilder.gif') {
// check if the published learnpath is visible for student
$published_lp_id = self::get_published_lp_id_from_link($tool['link']);
@ -1171,12 +1170,12 @@ class CourseHome
{
$navigation_items = self::get_navigation_items(true);
$course_id = api_get_course_id();
$class= null;
$idLearn = null;
$item = null;
$marginLeft = 160;
$html = '<div id="toolnav">';
$html .= '<ul id="toolnavbox">';
$count = 0;

@ -98,7 +98,7 @@ class CourseRequestManager
$code = $keys['currentCourseId'];
$db_name = isset($keys['currentCourseDbName']) ? $keys['currentCourseDbName'] : null;
$directory = $keys['currentCourseRepository'];
// @todo user entity
$sql = sprintf(
'INSERT INTO %s (
code, user_id, directory, db_name,
@ -157,7 +157,6 @@ class CourseRequestManager
$email_body .= get_lang('FillWithExemplaryContent', null, $email_language).': '.($exemplary_content ? get_lang('Yes', null, $email_language) : get_lang('No', null, $email_language))."\n";
// Sending an e-mail to the platform administrator.
$email_body_admin = $email_body;
$email_body_admin .= "\n".get_lang('CourseRequestPageForApproval', null, $email_language).' '.api_get_path(WEB_CODE_PATH).'admin/course_request_edit.php?id='.$last_insert_id."\n";
$email_body_admin .= "\n".get_lang('CourseRequestLegalNote', null, $email_language)."\n";
@ -324,6 +323,7 @@ class CourseRequestManager
}
}
// @todo use entity
$sql = sprintf('UPDATE %s SET
code = "%s", user_id = "%s", directory = "%s", db_name = "%s",
course_language = "%s", title = "%s", description = "%s", category_code = "%s",
@ -472,7 +472,6 @@ class CourseRequestManager
$course_info = CourseManager::create_course($params);
if (!empty($course_info)) {
// Mark the request as accepted.
$sql = "UPDATE ".Database :: get_main_table(TABLE_MAIN_COURSE_REQUEST)."
SET status = ".COURSE_REQUEST_ACCEPTED."

@ -52,7 +52,7 @@ class DashboardManager
echo '<tr>';
self::display_dashboard_plugin_checkboxes($testplugin);
for ($i = 0 ; $i < count($table_cols); $i++) {
for ($i = 0; $i < count($table_cols); $i++) {
if (isset($plugin_info[strtolower($table_cols[$i])])) {
echo '<td>';
echo $plugin_info[$table_cols[$i]];
@ -66,9 +66,11 @@ class DashboardManager
if ($testplugin != 'css') {
echo Display::tag(
'tr',
Display::tag('td',
Display::tag(
'td',
get_lang('CheckFilePermissions') . ' ' . Security::remove_XSS($plugin_info_file),
array('colspan' => '3'))
array('colspan' => '3')
)
);
}
}
@ -480,7 +482,7 @@ class DashboardManager
$extra_user_data = explode(';', $extra_user_data[$field_variable]);
$data = array();
foreach ($extra_user_data as $extra) {
$split_extra = explode(':',$extra);
$split_extra = explode(':', $extra);
if (!empty($split_extra)) {
$block_id = $split_extra[0];
$column = isset($split_extra[1]) ? $split_extra[1] : null;

@ -2,19 +2,15 @@
/* For licensing terms, see /license.txt */
/**
* This is the database constants definition for Chamilo
* Database constants definition for Chamilo
* This file is called by database.lib.php
*
* @todo the table constants have all to start with TABLE_
* This is because of the analogy with the tool constants TOOL_
* This is because of the analogy with the tool constants TOOL_
*
* @package chamilo.library
*/
/**
* CONSTANTS
*/
//See #3910 defines the default prefix for the single course database
// Modified by hubert.borderiou 2011-10-21 Add course category
define('DB_COURSE_PREFIX', 'c_');

@ -45,7 +45,12 @@ class EventEmailTemplate extends Model
$content = Display::actions(array(
array(
'url' => 'event_type.php' ,
'content' => Display::return_icon('new_document.png', get_lang('Add'), array(), ICON_SIZE_MEDIUM)
'content' => Display::return_icon(
'new_document.png',
get_lang('Add'),
array(),
ICON_SIZE_MEDIUM
)
)
)
);

Loading…
Cancel
Save