@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | |
14 | 14 | require_once '../inc/global.inc.php'; |
15 | 15 | $this_section = SECTION_COURSES; |
16 | -$current_course_tool = TOOL_GROUP; |
|
16 | +$current_course_tool = TOOL_GROUP; |
|
17 | 17 | |
18 | 18 | // Notice for unauthorized people. |
19 | 19 | api_protect_course_script(true); |
@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | $current_group = GroupManager :: get_group_properties($group_id); |
23 | 23 | |
24 | 24 | $nameTools = get_lang('EditGroup'); |
25 | -$interbreadcrumb[] = array ('url' => 'group.php?'.api_get_cidreq(), 'name' => get_lang('Groups')); |
|
26 | -$interbreadcrumb[] = array ('url' => 'group_space.php?'.api_get_cidreq(), 'name' => $current_group['name']); |
|
25 | +$interbreadcrumb[] = array('url' => 'group.php?'.api_get_cidreq(), 'name' => get_lang('Groups')); |
|
26 | +$interbreadcrumb[] = array('url' => 'group_space.php?'.api_get_cidreq(), 'name' => $current_group['name']); |
|
27 | 27 | |
28 | 28 | $is_group_member = GroupManager :: is_tutor_of_group(api_get_user_id(), $group_id); |
29 | 29 |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | $nParent = 0; // the number of /.. into the url |
41 | 41 | while (substr($cwd, -3, 3) == '/..') { |
42 | 42 | // go to parent directory |
43 | - $cwd= substr($cwd, 0, -3); |
|
44 | - if (strlen($cwd) == 0) { $cwd='/'; } |
|
43 | + $cwd = substr($cwd, 0, -3); |
|
44 | + if (strlen($cwd) == 0) { $cwd = '/'; } |
|
45 | 45 | $nParent++; |
46 | 46 | } |
47 | 47 | for (; $nParent > 0; $nParent--) { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | } |
56 | 56 | if ($action == 'list') { |
57 | 57 | /*==== List files ====*/ |
58 | - if ($debug>0) { error_log("sending file list",0); } |
|
58 | + if ($debug > 0) { error_log("sending file list", 0); } |
|
59 | 59 | |
60 | 60 | // get files list |
61 | 61 | $files = DocumentManager::get_all_document_data($_course, $cwd, 0, NULL, false); |
@@ -6,22 +6,22 @@ discard block |
||
6 | 6 | $cidReset = true; |
7 | 7 | require_once '../inc/global.inc.php'; |
8 | 8 | api_block_anonymous_users(); |
9 | -if (api_get_setting('allow_message_tool')!='true') { |
|
9 | +if (api_get_setting('allow_message_tool') != 'true') { |
|
10 | 10 | api_not_allowed(); |
11 | 11 | } |
12 | 12 | |
13 | 13 | if (isset($_REQUEST['f']) && $_REQUEST['f'] == 'social') { |
14 | 14 | $this_section = SECTION_SOCIAL; |
15 | - $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social')); |
|
16 | - $interbreadcrumb[]= array ('url' => 'inbox.php?f=social','name' => get_lang('Inbox')); |
|
15 | + $interbreadcrumb[] = array('url' => api_get_path(WEB_PATH).'main/social/home.php', 'name' => get_lang('Social')); |
|
16 | + $interbreadcrumb[] = array('url' => 'inbox.php?f=social', 'name' => get_lang('Inbox')); |
|
17 | 17 | } else { |
18 | 18 | $this_section = SECTION_MYPROFILE; |
19 | - $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile')); |
|
19 | + $interbreadcrumb[] = array('url' => api_get_path(WEB_PATH).'main/auth/profile.php', 'name' => get_lang('Profile')); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | $social_right_content = ''; |
23 | 23 | |
24 | -if (isset($_GET['f']) && $_GET['f']=='social') { |
|
24 | +if (isset($_GET['f']) && $_GET['f'] == 'social') { |
|
25 | 25 | $social_parameter = '?f=social'; |
26 | 26 | } else { |
27 | 27 | if (api_get_setting('extended_profile') == 'true') { |
@@ -33,11 +33,11 @@ discard block |
||
33 | 33 | } |
34 | 34 | if (api_get_setting('allow_message_tool') == 'true') { |
35 | 35 | $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'. |
36 | - Display::return_icon('message_new.png',get_lang('ComposeMessage')).'</a>'; |
|
36 | + Display::return_icon('message_new.png', get_lang('ComposeMessage')).'</a>'; |
|
37 | 37 | $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'. |
38 | - Display::return_icon('inbox.png',get_lang('Inbox')).'</a>'; |
|
38 | + Display::return_icon('inbox.png', get_lang('Inbox')).'</a>'; |
|
39 | 39 | $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'. |
40 | - Display::return_icon('outbox.png',get_lang('Outbox')).'</a>'; |
|
40 | + Display::return_icon('outbox.png', get_lang('Outbox')).'</a>'; |
|
41 | 41 | } |
42 | 42 | $social_right_content .= '</div>'; |
43 | 43 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $show_menu = 'messages_inbox'; |
54 | 54 | } |
55 | 55 | |
56 | -$message = ''; |
|
56 | +$message = ''; |
|
57 | 57 | |
58 | 58 | // LEFT COLUMN |
59 | 59 | if (api_get_setting('allow_social_tool') == 'true') { |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | <script> |
21 | 21 | $(document).ready(function() { |
22 | 22 | $.ajax({ |
23 | - url: "'. api_get_path(WEB_CODE_PATH) .'inc/ajax/statistics.ajax.php?a=recentlogins", |
|
23 | + url: "'. api_get_path(WEB_CODE_PATH).'inc/ajax/statistics.ajax.php?a=recentlogins", |
|
24 | 24 | type: "POST", |
25 | 25 | success: function(data) { |
26 | 26 | Chart.defaults.global.responsive = true; |
@@ -50,10 +50,10 @@ discard block |
||
50 | 50 | // users ... |
51 | 51 | $tools[$strUsers]['report=users'] = get_lang('CountUsers'); |
52 | 52 | $tools[$strUsers]['report=recentlogins'] = get_lang('Logins'); |
53 | -$tools[$strUsers]['report=logins&type=month'] = get_lang('Logins') . ' (' . get_lang('PeriodMonth') . ')'; |
|
54 | -$tools[$strUsers]['report=logins&type=day'] = get_lang('Logins') . ' (' . get_lang('PeriodDay') . ')'; |
|
55 | -$tools[$strUsers]['report=logins&type=hour'] = get_lang('Logins') . ' (' . get_lang('PeriodHour') . ')'; |
|
56 | -$tools[$strUsers]['report=pictures'] = get_lang('CountUsers') . ' (' . get_lang('UserPicture') . ')'; |
|
53 | +$tools[$strUsers]['report=logins&type=month'] = get_lang('Logins').' ('.get_lang('PeriodMonth').')'; |
|
54 | +$tools[$strUsers]['report=logins&type=day'] = get_lang('Logins').' ('.get_lang('PeriodDay').')'; |
|
55 | +$tools[$strUsers]['report=logins&type=hour'] = get_lang('Logins').' ('.get_lang('PeriodHour').')'; |
|
56 | +$tools[$strUsers]['report=pictures'] = get_lang('CountUsers').' ('.get_lang('UserPicture').')'; |
|
57 | 57 | $tools[$strUsers]['report=no_login_users'] = get_lang('StatsUsersDidNotLoginInLastPeriods'); |
58 | 58 | $tools[$strUsers]['report=zombies'] = get_lang('Zombies'); |
59 | 59 | |
@@ -68,10 +68,10 @@ discard block |
||
68 | 68 | echo '<table><tr>'; |
69 | 69 | foreach ($tools as $section => $items) { |
70 | 70 | echo '<td style="vertical-align:top;">'; |
71 | - echo '<h3>' . $section . '</h3>'; |
|
71 | + echo '<h3>'.$section.'</h3>'; |
|
72 | 72 | echo '<ul>'; |
73 | 73 | foreach ($items as $key => $value) { |
74 | - echo '<li><a href="index.php?' . $key . '">' . $value . '</a></li>'; |
|
74 | + echo '<li><a href="index.php?'.$key.'">'.$value.'</a></li>'; |
|
75 | 75 | } |
76 | 76 | echo '</ul>'; |
77 | 77 | echo '</td>'; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | echo '</tr></table>'; |
80 | 80 | |
81 | 81 | $course_categories = Statistics::getCourseCategories(); |
82 | -echo '<br/><br/>';//@todo: spaces between elements should be handled in the css, br should be removed if only there for presentation |
|
82 | +echo '<br/><br/>'; //@todo: spaces between elements should be handled in the css, br should be removed if only there for presentation |
|
83 | 83 | |
84 | 84 | switch ($report) { |
85 | 85 | case 'courses': |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | Statistics::printStats(get_lang('Students'), $students); |
122 | 122 | break; |
123 | 123 | case 'recentlogins': |
124 | - echo '<h2>'. sprintf(get_lang('LastXDays'), '15') . '</h2>'; |
|
124 | + echo '<h2>'.sprintf(get_lang('LastXDays'), '15').'</h2>'; |
|
125 | 125 | echo '<canvas class="col-md-12" id="canvas" height="100px" style="margin-bottom: 20px"></canvas>'; |
126 | 126 | Statistics::printRecentLoginStats(); |
127 | 127 | Statistics::printRecentLoginStats(true); |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * @since 25/september/2010 |
6 | 6 | */ |
7 | 7 | |
8 | -require_once '../../../../inc/global.inc.php';//hack for Chamilo |
|
8 | +require_once '../../../../inc/global.inc.php'; //hack for Chamilo |
|
9 | 9 | api_protect_course_script(); |
10 | 10 | api_block_anonymous_users(); |
11 | 11 | if (!isset($_SESSION['draw_dir'])) { |
@@ -8,7 +8,7 @@ |
||
8 | 8 | exit; |
9 | 9 | } |
10 | 10 | $svg = $_POST['output_svg']; |
11 | - $filename = (isset($_POST['filename']) && !empty($_POST['filename']) ? preg_replace('@[\\\\/:*?"<>|]@u', '_', $_POST['filename']) : 'saved') . '.svg'; // These characters are indicated as prohibited by Windows |
|
11 | + $filename = (isset($_POST['filename']) && !empty($_POST['filename']) ? preg_replace('@[\\\\/:*?"<>|]@u', '_', $_POST['filename']) : 'saved').'.svg'; // These characters are indicated as prohibited by Windows |
|
12 | 12 | |
13 | 13 | $fh = fopen($filename, 'w') or die("Can't open file"); |
14 | 14 | fwrite($fh, $svg); |
@@ -25,14 +25,14 @@ discard block |
||
25 | 25 | $slideshow_extension = strrchr($file, '.'); |
26 | 26 | $slideshow_extension = strtolower($slideshow_extension); |
27 | 27 | if (in_array($slideshow_extension, $accepted_extensions)) { |
28 | - $png_svg_files[] =$file; |
|
28 | + $png_svg_files[] = $file; |
|
29 | 29 | } |
30 | 30 | } |
31 | 31 | } |
32 | 32 | $style = '<style>'; |
33 | 33 | $style .= '@import "'.api_get_path(WEB_CSS_PATH).'base.css";'; |
34 | 34 | $style .= '@import "'.api_get_path(WEB_CSS_PATH).'themes/'.api_get_visual_theme().'/default.css";'; |
35 | -$style .='</style>'; |
|
35 | +$style .= '</style>'; |
|
36 | 36 | |
37 | 37 | ?> |
38 | 38 | <!doctype html> |
@@ -48,10 +48,10 @@ discard block |
||
48 | 48 | if (!empty($png_svg_files)) { |
49 | 49 | echo '<h3>'.get_lang('SelectSVGEditImage').'</h3>'; |
50 | 50 | echo '<ul>'; |
51 | - foreach($png_svg_files as $filename) { |
|
51 | + foreach ($png_svg_files as $filename) { |
|
52 | 52 | $image = $user_disk_path.$filename; |
53 | 53 | |
54 | - if (strpos($filename, "svg")){ |
|
54 | + if (strpos($filename, "svg")) { |
|
55 | 55 | $new_sizes['width'] = 60; |
56 | 56 | $new_sizes['height'] = 60; |
57 | 57 | } else { |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $slideshow_extension = strrchr($file, '.'); |
48 | 48 | $slideshow_extension = strtolower($slideshow_extension); |
49 | 49 | if (in_array($slideshow_extension, $accepted_extensions)) { |
50 | - $png_svg_files[] =$file; |
|
50 | + $png_svg_files[] = $file; |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $style = '<style>'; |
56 | 56 | $style .= '@import "'.api_get_path(WEB_CSS_PATH).'base.css";'; |
57 | 57 | $style .= '@import "'.api_get_path(WEB_CSS_PATH).'themes/'.api_get_visual_theme().'/default.css";'; |
58 | -$style .='</style>'; |
|
58 | +$style .= '</style>'; |
|
59 | 59 | |
60 | 60 | ?> |
61 | 61 | <!doctype html> |
@@ -68,15 +68,15 @@ discard block |
||
68 | 68 | if (( |
69 | 69 | $group_properties['doc_state'] == 2 && |
70 | 70 | ($is_allowed_to_edit || GroupManager :: is_user_in_group($_user['user_id'], $groupId))) || $group_properties['doc_state'] == 1 |
71 | -){ |
|
71 | +) { |
|
72 | 72 | |
73 | 73 | if (!empty($png_svg_files)) { |
74 | 74 | echo '<h3>'.get_lang('SelectSVGEditImage').'</h3>'; |
75 | 75 | echo '<ul>'; |
76 | - foreach($png_svg_files as $filename) { |
|
76 | + foreach ($png_svg_files as $filename) { |
|
77 | 77 | $image = $group_disk_path.$filename; |
78 | 78 | |
79 | - if (strpos($filename, "svg")){ |
|
79 | + if (strpos($filename, "svg")) { |
|
80 | 80 | $new_sizes['width'] = 60; |
81 | 81 | $new_sizes['height'] = 60; |
82 | 82 | } else { |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | $is_allowed_to_edit = api_is_allowed_to_edit(null, true); |
14 | 14 | |
15 | -$curdirpath='/images/gallery'; //path of library directory |
|
15 | +$curdirpath = '/images/gallery'; //path of library directory |
|
16 | 16 | |
17 | 17 | $course_info = api_get_course_info(); |
18 | 18 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $slideshow_extension = strrchr($file, '.'); |
37 | 37 | $slideshow_extension = strtolower($slideshow_extension); |
38 | 38 | if (in_array($slideshow_extension, $accepted_extensions)) { |
39 | - $png_svg_files[] =$file; |
|
39 | + $png_svg_files[] = $file; |
|
40 | 40 | } |
41 | 41 | } |
42 | 42 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $style = '<style>'; |
48 | 48 | $style .= '@import "'.api_get_path(WEB_CSS_PATH).'base.css";'; |
49 | 49 | $style .= '@import "'.api_get_path(WEB_CSS_PATH).'themes/'.api_get_visual_theme().'/default.css";'; |
50 | -$style .='</style>'; |
|
50 | +$style .= '</style>'; |
|
51 | 51 | |
52 | 52 | ?> |
53 | 53 | <!doctype html> |
@@ -59,10 +59,10 @@ discard block |
||
59 | 59 | if (!empty($png_svg_files)) { |
60 | 60 | echo '<h3>'.get_lang('SelectSVGEditImage').'</h3>'; |
61 | 61 | echo '<ul>'; |
62 | - foreach($png_svg_files as $filename) { |
|
63 | - $image=$disk_path.$filename; |
|
62 | + foreach ($png_svg_files as $filename) { |
|
63 | + $image = $disk_path.$filename; |
|
64 | 64 | |
65 | - if (strpos($filename, "svg")){ |
|
65 | + if (strpos($filename, "svg")) { |
|
66 | 66 | $new_sizes['width'] = 60; |
67 | 67 | $new_sizes['height'] = 60; |
68 | 68 | } |