@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $res = preg_match_all('/get_lang\(\'(\\w*)\'\)/', $line, $myTerms); |
44 | 44 | if ($res > 0) { |
45 | 45 | foreach ($myTerms[1] as $term) { |
46 | - if (substr($term, 0, 4)=='lang') { |
|
46 | + if (substr($term, 0, 4) == 'lang') { |
|
47 | 47 | $term = substr($term, 4); |
48 | 48 | } |
49 | 49 | $usedTerms[$term] = $shortFile; |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $res = preg_match_all('/\{[\'"](\\w*)[\'"]\|get_lang\}/', $line, $myTerms); |
54 | 54 | if ($res > 0) { |
55 | 55 | foreach ($myTerms[1] as $term) { |
56 | - if (substr($term, 0, 4)=='lang') { |
|
56 | + if (substr($term, 0, 4) == 'lang') { |
|
57 | 57 | $term = substr($term, 4); |
58 | 58 | } |
59 | 59 | $usedTerms[$term] = $shortFile; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | // Compare defined terms VS used terms. Used terms should be smaller than |
68 | 68 | // defined terms, and this should prove the concept that there are much |
69 | 69 | // more variables than what we really use |
70 | -if (count($usedTerms)<1) { |
|
70 | +if (count($usedTerms) < 1) { |
|
71 | 71 | die("No used terms<br />\n"); |
72 | 72 | } else { |
73 | 73 | echo "The following terms were defined but never used: <br />\n<table>"; |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $i = 1; |
76 | 76 | foreach ($defined_terms as $term => $file) { |
77 | 77 | // remove "lang" prefix just in case |
78 | - if (substr($term,0,4)=='lang') { $term = substr($term,4); } |
|
78 | + if (substr($term, 0, 4) == 'lang') { $term = substr($term, 4); } |
|
79 | 79 | if (!isset($usedTerms[$term])) { |
80 | 80 | echo "<tr><td>$i</td><td>$term</td></tr>\n"; |
81 | 81 | $i++; |
@@ -88,14 +88,14 @@ discard block |
||
88 | 88 | $list = scandir($base_path); |
89 | 89 | $files = array(); |
90 | 90 | foreach ($list as $item) { |
91 | - if (substr($item,0,1)=='.') {continue;} |
|
92 | - $special_dirs = array(api_get_path(SYS_TEST_PATH),api_get_path(SYS_COURSE_PATH),api_get_path(SYS_LANG_PATH),api_get_path(SYS_ARCHIVE_PATH)); |
|
93 | - if (in_array($base_path.$item.'/',$special_dirs)) {continue;} |
|
91 | + if (substr($item, 0, 1) == '.') {continue; } |
|
92 | + $special_dirs = array(api_get_path(SYS_TEST_PATH), api_get_path(SYS_COURSE_PATH), api_get_path(SYS_LANG_PATH), api_get_path(SYS_ARCHIVE_PATH)); |
|
93 | + if (in_array($base_path.$item.'/', $special_dirs)) {continue; } |
|
94 | 94 | if (is_dir($base_path.$item)) { |
95 | - $files = array_merge($files,get_all_php_files($base_path.$item.'/')); |
|
95 | + $files = array_merge($files, get_all_php_files($base_path.$item.'/')); |
|
96 | 96 | } else { |
97 | 97 | //only analyse php files |
98 | - $sub = substr($item,-4); |
|
98 | + $sub = substr($item, -4); |
|
99 | 99 | if ($sub == '.php' or $sub == '.tpl') { |
100 | 100 | $files[] = $base_path.$item; |
101 | 101 | } |
@@ -68,18 +68,18 @@ discard block |
||
68 | 68 | // defined terms, and this should prove the concept that there are much |
69 | 69 | // more variables than what we really use |
70 | 70 | if (count($usedTerms)<1) { |
71 | - die("No used terms<br />\n"); |
|
71 | + die("No used terms<br />\n"); |
|
72 | 72 | } else { |
73 | - echo "The following terms were defined but never used: <br />\n<table>"; |
|
73 | + echo "The following terms were defined but never used: <br />\n<table>"; |
|
74 | 74 | } |
75 | 75 | $i = 1; |
76 | 76 | foreach ($defined_terms as $term => $file) { |
77 | - // remove "lang" prefix just in case |
|
78 | - if (substr($term,0,4)=='lang') { $term = substr($term,4); } |
|
79 | - if (!isset($usedTerms[$term])) { |
|
77 | + // remove "lang" prefix just in case |
|
78 | + if (substr($term,0,4)=='lang') { $term = substr($term,4); } |
|
79 | + if (!isset($usedTerms[$term])) { |
|
80 | 80 | echo "<tr><td>$i</td><td>$term</td></tr>\n"; |
81 | 81 | $i++; |
82 | - } |
|
82 | + } |
|
83 | 83 | } |
84 | 84 | echo "</table>\n"; |
85 | 85 | |
@@ -88,17 +88,17 @@ discard block |
||
88 | 88 | $list = scandir($base_path); |
89 | 89 | $files = array(); |
90 | 90 | foreach ($list as $item) { |
91 | - if (substr($item,0,1)=='.') {continue;} |
|
91 | + if (substr($item,0,1)=='.') {continue;} |
|
92 | 92 | $special_dirs = array(api_get_path(SYS_TEST_PATH),api_get_path(SYS_COURSE_PATH),api_get_path(SYS_LANG_PATH),api_get_path(SYS_ARCHIVE_PATH)); |
93 | 93 | if (in_array($base_path.$item.'/',$special_dirs)) {continue;} |
94 | 94 | if (is_dir($base_path.$item)) { |
95 | - $files = array_merge($files,get_all_php_files($base_path.$item.'/')); |
|
95 | + $files = array_merge($files,get_all_php_files($base_path.$item.'/')); |
|
96 | 96 | } else { |
97 | 97 | //only analyse php files |
98 | 98 | $sub = substr($item,-4); |
99 | - if ($sub == '.php' or $sub == '.tpl') { |
|
99 | + if ($sub == '.php' or $sub == '.tpl') { |
|
100 | 100 | $files[] = $base_path.$item; |
101 | - } |
|
101 | + } |
|
102 | 102 | } |
103 | 103 | } |
104 | 104 | $list = null; |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * @package chamilo.cron |
7 | 7 | * @author Imanol Losada <[email protected]> |
8 | 8 | */ |
9 | -require_once __DIR__ . '/../inc/global.inc.php'; |
|
9 | +require_once __DIR__.'/../inc/global.inc.php'; |
|
10 | 10 | |
11 | 11 | /** |
12 | 12 | * Get ids of COURSEMANAGERs that are inside a course right now |
@@ -15,9 +15,9 @@ discard block |
||
15 | 15 | function getTeachersInCourseIds() |
16 | 16 | { |
17 | 17 | $table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ONLINE); |
18 | - $joinStatement = ' JOIN ' . Database::get_main_table(TABLE_MAIN_USER) . ' ON login_user_id = user_id'; |
|
18 | + $joinStatement = ' JOIN '.Database::get_main_table(TABLE_MAIN_USER).' ON login_user_id = user_id'; |
|
19 | 19 | return Database::select( |
20 | - 'login_user_id', $table . $joinStatement, |
|
20 | + 'login_user_id', $table.$joinStatement, |
|
21 | 21 | array( |
22 | 22 | 'where' => array( |
23 | 23 | 'c_id IS NOT NULL AND status = ?' => array( |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $dataBaseCurrentHour = array_shift($utcResult); |
45 | 45 | $maximumIdleTimeInCourse = date( |
46 | 46 | 'Y-m-d H:i:s', |
47 | - strtotime($dataBaseCurrentHour . ' ' . $timeLimit) |
|
47 | + strtotime($dataBaseCurrentHour.' '.$timeLimit) |
|
48 | 48 | ); |
49 | 49 | $table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_COURSE_ACCESS); |
50 | 50 | $onLineTrackTable = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ONLINE); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | array( |
70 | 70 | 'logout_course_date' => date( |
71 | 71 | 'Y-m-d H:i:s', |
72 | - strtotime($currentTeacherData['logout_course_date'] . ' ' . $extraTime) |
|
72 | + strtotime($currentTeacherData['logout_course_date'].' '.$extraTime) |
|
73 | 73 | ) |
74 | 74 | ), |
75 | 75 | array( |
@@ -9,7 +9,7 @@ |
||
9 | 9 | |
10 | 10 | $execute = isset($_GET['execute']) ? $_GET['execute'] : null; |
11 | 11 | $courseId = isset($_GET['c_id']) ? $_GET['c_id'] : null; |
12 | -$questionId = isset($_GET['question_id']) ? $_GET['question_id'] : null; |
|
12 | +$questionId = isset($_GET['question_id']) ? $_GET['question_id'] : null; |
|
13 | 13 | |
14 | 14 | $sql2 = "SELECT * FROM $table WHERE answer LIKE '%[%]%'"; |
15 | 15 |
@@ -20,12 +20,12 @@ |
||
20 | 20 | |
21 | 21 | // current section |
22 | 22 | $this_section = SECTION_DASHBOARD; |
23 | -unset($_SESSION['this_section']);//for hmtl editor repository |
|
23 | +unset($_SESSION['this_section']); //for hmtl editor repository |
|
24 | 24 | |
25 | 25 | // get actions |
26 | 26 | $actions = array('listing', 'store_user_block', 'disable_block'); |
27 | 27 | $action = 'listing'; |
28 | -if (isset($_GET['action']) && in_array($_GET['action'],$actions)) { |
|
28 | +if (isset($_GET['action']) && in_array($_GET['action'], $actions)) { |
|
29 | 29 | $action = $_GET['action']; |
30 | 30 | } |
31 | 31 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $actions = array('listing', 'store_user_block', 'disable_block'); |
27 | 27 | $action = 'listing'; |
28 | 28 | if (isset($_GET['action']) && in_array($_GET['action'],$actions)) { |
29 | - $action = $_GET['action']; |
|
29 | + $action = $_GET['action']; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | // load styles from dashboard plugins |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $dashboard_controller = new DashboardController(); |
38 | 38 | |
39 | 39 | if (isset($_GET['path'])) { |
40 | - $path = $_GET['path']; |
|
40 | + $path = $_GET['path']; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | // distpacher actions to controller |
@@ -14,23 +14,23 @@ discard block |
||
14 | 14 | $views = array('blocks', 'list'); |
15 | 15 | |
16 | 16 | if(isset($_GET['view']) && in_array($_GET['view'], $views)){ |
17 | - $dashboard_view = $_GET['view']; |
|
17 | + $dashboard_view = $_GET['view']; |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | $link_blocks_view = $link_list_view = null; |
21 | 21 | |
22 | 22 | if (isset($dashboard_view) && $dashboard_view == 'list') { |
23 | - $link_blocks_view = '<a href="'.api_get_self().'?view=blocks">'. |
|
24 | - Display::return_icon('blocks.png',get_lang('DashboardBlocks'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
23 | + $link_blocks_view = '<a href="'.api_get_self().'?view=blocks">'. |
|
24 | + Display::return_icon('blocks.png',get_lang('DashboardBlocks'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
25 | 25 | } else { |
26 | - $link_list_view = '<a href="'.api_get_self().'?view=list">'. |
|
27 | - Display::return_icon('edit.png',get_lang('EditBlocks'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
26 | + $link_list_view = '<a href="'.api_get_self().'?view=list">'. |
|
27 | + Display::return_icon('edit.png',get_lang('EditBlocks'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | $configuration_link = null; |
31 | 31 | if (api_is_platform_admin()) { |
32 | - $configuration_link = '<a href="'.api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Plugins">' |
|
33 | - .Display::return_icon('settings.png',get_lang('ConfigureDashboardPlugin'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
32 | + $configuration_link = '<a href="'.api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Plugins">' |
|
33 | + .Display::return_icon('settings.png',get_lang('ConfigureDashboardPlugin'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | echo '<div class="actions">'; |
@@ -87,10 +87,10 @@ discard block |
||
87 | 87 | } |
88 | 88 | |
89 | 89 | } else { |
90 | - // block dashboard list |
|
91 | - if (isset($success)) { |
|
92 | - Display::display_confirmation_message(get_lang('BlocksHaveBeenUpdatedSuccessfully')); |
|
93 | - } |
|
94 | - $user_id = api_get_user_id(); |
|
95 | - DashboardManager::display_user_dashboard_list($user_id); |
|
90 | + // block dashboard list |
|
91 | + if (isset($success)) { |
|
92 | + Display::display_confirmation_message(get_lang('BlocksHaveBeenUpdatedSuccessfully')); |
|
93 | + } |
|
94 | + $user_id = api_get_user_id(); |
|
95 | + DashboardManager::display_user_dashboard_list($user_id); |
|
96 | 96 | } |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | // menu actions for dashboard views |
14 | 14 | $views = array('blocks', 'list'); |
15 | 15 | |
16 | -if(isset($_GET['view']) && in_array($_GET['view'], $views)){ |
|
16 | +if (isset($_GET['view']) && in_array($_GET['view'], $views)) { |
|
17 | 17 | $dashboard_view = $_GET['view']; |
18 | 18 | } |
19 | 19 | |
@@ -21,16 +21,16 @@ discard block |
||
21 | 21 | |
22 | 22 | if (isset($dashboard_view) && $dashboard_view == 'list') { |
23 | 23 | $link_blocks_view = '<a href="'.api_get_self().'?view=blocks">'. |
24 | - Display::return_icon('blocks.png',get_lang('DashboardBlocks'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
24 | + Display::return_icon('blocks.png', get_lang('DashboardBlocks'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
25 | 25 | } else { |
26 | 26 | $link_list_view = '<a href="'.api_get_self().'?view=list">'. |
27 | - Display::return_icon('edit.png',get_lang('EditBlocks'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
27 | + Display::return_icon('edit.png', get_lang('EditBlocks'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | $configuration_link = null; |
31 | 31 | if (api_is_platform_admin()) { |
32 | 32 | $configuration_link = '<a href="'.api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Plugins">' |
33 | - .Display::return_icon('settings.png',get_lang('ConfigureDashboardPlugin'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
33 | + .Display::return_icon('settings.png', get_lang('ConfigureDashboardPlugin'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | echo '<div class="actions">'; |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | if (count($columns) > 0) { |
57 | 57 | $columns_name = array_keys($columns); |
58 | 58 | // blocks for column 1 |
59 | - if (in_array('column_1',$columns_name)) { |
|
59 | + if (in_array('column_1', $columns_name)) { |
|
60 | 60 | echo '<div id="column1" class="col-md-6">'; |
61 | 61 | foreach ($columns['column_1'] as $content) { |
62 | 62 | echo $content; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | echo '</div>'; |
69 | 69 | } |
70 | 70 | // blocks for column 2 |
71 | - if (in_array('column_2',$columns_name)) { |
|
71 | + if (in_array('column_2', $columns_name)) { |
|
72 | 72 | // blocks for column 1 |
73 | 73 | echo '<div id="column2" class="col-md-6">'; |
74 | 74 | foreach ($columns['column_2'] as $content) { |
@@ -48,7 +48,9 @@ discard block |
||
48 | 48 | foreach ($dashboard_blocks as $block) { |
49 | 49 | |
50 | 50 | // display only user blocks |
51 | - if (!in_array($block['id'], $user_blocks_id)) continue; |
|
51 | + if (!in_array($block['id'], $user_blocks_id)) { |
|
52 | + continue; |
|
53 | + } |
|
52 | 54 | |
53 | 55 | $path = $block['path']; |
54 | 56 | $controller_class = $block['controller']; |
@@ -61,7 +63,9 @@ discard block |
||
61 | 63 | // check if user is allowed to see the block |
62 | 64 | if (method_exists($obj, 'is_block_visible_for_user')) { |
63 | 65 | $is_block_visible_for_user = $obj->is_block_visible_for_user($user_id); |
64 | - if (!$is_block_visible_for_user) continue; |
|
66 | + if (!$is_block_visible_for_user) { |
|
67 | + continue; |
|
68 | + } |
|
65 | 69 | } |
66 | 70 | |
67 | 71 | $data_block[$path] = $obj->get_block(); |
@@ -23,19 +23,19 @@ discard block |
||
23 | 23 | |
24 | 24 | switch ($action) { |
25 | 25 | case 'add': |
26 | - $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('Timeline')); |
|
27 | - $interbreadcrumb[]=array('url' => '#','name' => get_lang('Add')); |
|
26 | + $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('Timeline')); |
|
27 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Add')); |
|
28 | 28 | break; |
29 | 29 | case 'edit': |
30 | - $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('Timeline')); |
|
31 | - $interbreadcrumb[]=array('url' => '#','name' => get_lang('Edit')); |
|
30 | + $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('Timeline')); |
|
31 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Edit')); |
|
32 | 32 | break; |
33 | 33 | case 'add_item': |
34 | - $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('Timeline')); |
|
35 | - $interbreadcrumb[]=array('url' => '#','name' => get_lang('TimelineItem')); |
|
34 | + $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('Timeline')); |
|
35 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('TimelineItem')); |
|
36 | 36 | break; |
37 | 37 | default: |
38 | - $interbreadcrumb[]=array('url' => '#','name' => get_lang('Timeline')); |
|
38 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Timeline')); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | //jqgrid will use this URL to do the selects |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | |
47 | 47 | //Column config |
48 | 48 | $column_model = array( |
49 | - array('name'=>'name', 'index'=>'name', 'width'=>'120', 'align'=>'left'), |
|
50 | - array('name'=>'actions', 'index'=>'actions', 'width'=>'100', 'align'=>'left', 'sortable'=>'false') |
|
49 | + array('name'=>'name', 'index'=>'name', 'width'=>'120', 'align'=>'left'), |
|
50 | + array('name'=>'actions', 'index'=>'actions', 'width'=>'100', 'align'=>'left', 'sortable'=>'false') |
|
51 | 51 | ); |
52 | 52 | //Autowidth |
53 | 53 | $extra_params['autowidth'] = 'true'; |
@@ -55,11 +55,11 @@ discard block |
||
55 | 55 | $extra_params['height'] = 'auto'; |
56 | 56 | |
57 | 57 | //With this function we can add actions to the jgrid (edit, delete, etc) |
58 | -$htmlHeadXtra[] =' |
|
58 | +$htmlHeadXtra[] = ' |
|
59 | 59 | <script> |
60 | 60 | $(function() { |
61 | 61 | // grid definition see the $timeline->display() function |
62 | - '.Display::grid_js('timelines', $url,$columns,$column_model,$extra_params, array(), null,true).' |
|
62 | + '.Display::grid_js('timelines', $url, $columns, $column_model, $extra_params, array(), null, true).' |
|
63 | 63 | }); |
64 | 64 | </script>'; |
65 | 65 | |
@@ -80,12 +80,12 @@ discard block |
||
80 | 80 | $values = $form->exportValues(); |
81 | 81 | $res = $timeline->save($values); |
82 | 82 | if ($res) { |
83 | - $message = Display::return_message(get_lang('ItemAdded'),'success'); |
|
83 | + $message = Display::return_message(get_lang('ItemAdded'), 'success'); |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | $content = $timeline->listing(); |
87 | 87 | } else { |
88 | - $actions .= '<a href="'.api_get_self().'">'.Display::return_icon('back.png',get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
88 | + $actions .= '<a href="'.api_get_self().'">'.Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
89 | 89 | $form->addElement('hidden', 'sec_token'); |
90 | 90 | $form->setConstants(array('sec_token' => $token)); |
91 | 91 | $content = $form->return_form(); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | } |
107 | 107 | $timeline->display(); |
108 | 108 | } else { |
109 | - $actions = '<a href="'.api_get_self().'">'.Display::return_icon('back.png',get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
109 | + $actions = '<a href="'.api_get_self().'">'.Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
110 | 110 | $form->addElement('hidden', 'sec_token'); |
111 | 111 | $form->setConstants(array('sec_token' => $token)); |
112 | 112 | $content = $form->return_form(); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | } |
129 | 129 | $timeline->display(); |
130 | 130 | } else { |
131 | - $actions = '<a href="'.api_get_self().'">'.Display::return_icon('back.png',get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
131 | + $actions = '<a href="'.api_get_self().'">'.Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
132 | 132 | $form->addElement('hidden', 'sec_token'); |
133 | 133 | $form->setConstants(array('sec_token' => $token)); |
134 | 134 | $content = $form->return_form(); |
@@ -50,7 +50,7 @@ |
||
50 | 50 | array('name'=>'certificate', 'index'=>'certificate', 'width'=>'25', 'align'=>'left', 'sortable'=>'false'), |
51 | 51 | array('name'=>'skills', 'index'=>'skills', 'width'=>'300', 'align'=>'left', 'sortable'=>'false'), |
52 | 52 | array('name'=>'actions', 'index'=>'actions', 'width'=>'30', 'align'=>'left','formatter'=>'action_formatter','sortable'=>'false') |
53 | - ); |
|
53 | + ); |
|
54 | 54 | //Autowidth |
55 | 55 | $extra_params['autowidth'] = 'true'; |
56 | 56 | //height auto |
@@ -6,8 +6,8 @@ discard block |
||
6 | 6 | */ |
7 | 7 | require_once '../inc/global.inc.php'; |
8 | 8 | |
9 | -$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('Timeline')); |
|
10 | -$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('Listing')); |
|
9 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('Timeline')); |
|
10 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('Listing')); |
|
11 | 11 | |
12 | 12 | $timeline = new Timeline(); |
13 | 13 | if (empty($_GET['id'])) { |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | } |
16 | 16 | $url = $timeline->get_url($_GET['id']); |
17 | 17 | $item = $timeline->get($_GET['id']); |
18 | -$interbreadcrumb[]=array('url' => '#','name' => $item['headline']); |
|
18 | +$interbreadcrumb[] = array('url' => '#', 'name' => $item['headline']); |
|
19 | 19 | |
20 | 20 | $htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/timeline/timeline.css'); |
21 | 21 | $htmlHeadXtra[] = api_get_js('timeline/timeline-min.js'); |
@@ -33,18 +33,18 @@ |
||
33 | 33 | $doc_url = str_replace('/..', '', $doc_url); //echo $doc_url; |
34 | 34 | |
35 | 35 | if (! isset($_course)) { |
36 | - api_not_allowed(true); |
|
36 | + api_not_allowed(true); |
|
37 | 37 | } |
38 | 38 | $full_file_name = api_get_path(SYS_COURSE_PATH).api_get_course_path().'/upload/blog/'.$doc_url; |
39 | 39 | |
40 | 40 | //if the rewrite rule asks for a directory, we redirect to the course view |
41 | 41 | if (is_dir($full_file_name)) { |
42 | - //remove last slash if present |
|
43 | - while ($doc_url{$dul = strlen($doc_url)-1}=='/') $doc_url = substr($doc_url,0,$dul); |
|
44 | - //create the path |
|
45 | - $document_explorer = api_get_path(WEB_COURSE_PATH).api_get_course_path(); // home course path |
|
46 | - //redirect |
|
47 | - header('Location: '.$document_explorer); |
|
42 | + //remove last slash if present |
|
43 | + while ($doc_url{$dul = strlen($doc_url)-1}=='/') $doc_url = substr($doc_url,0,$dul); |
|
44 | + //create the path |
|
45 | + $document_explorer = api_get_path(WEB_COURSE_PATH).api_get_course_path(); // home course path |
|
46 | + //redirect |
|
47 | + header('Location: '.$document_explorer); |
|
48 | 48 | exit; |
49 | 49 | } |
50 | 50 |
@@ -40,7 +40,9 @@ |
||
40 | 40 | //if the rewrite rule asks for a directory, we redirect to the course view |
41 | 41 | if (is_dir($full_file_name)) { |
42 | 42 | //remove last slash if present |
43 | - while ($doc_url{$dul = strlen($doc_url)-1}=='/') $doc_url = substr($doc_url,0,$dul); |
|
43 | + while ($doc_url{$dul = strlen($doc_url)-1}=='/') { |
|
44 | + $doc_url = substr($doc_url,0,$dul); |
|
45 | + } |
|
44 | 46 | //create the path |
45 | 47 | $document_explorer = api_get_path(WEB_COURSE_PATH).api_get_course_path(); // home course path |
46 | 48 | //redirect |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | session_cache_limiter('public'); |
13 | 13 | |
14 | 14 | require_once '../inc/global.inc.php'; |
15 | -$this_section=SECTION_COURSES; |
|
15 | +$this_section = SECTION_COURSES; |
|
16 | 16 | |
17 | 17 | // IMPORTANT to avoid caching of documents |
18 | 18 | header('Expires: Wed, 01 Jan 1990 00:00:00 GMT'); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $doc_url = str_replace(' ', '+', $doc_url); |
30 | 30 | $doc_url = str_replace('/..', '', $doc_url); //echo $doc_url; |
31 | 31 | |
32 | -if (! isset($_course)) { |
|
32 | +if (!isset($_course)) { |
|
33 | 33 | api_not_allowed(true); |
34 | 34 | } |
35 | 35 | $full_file_name = api_get_path(SYS_COURSE_PATH).api_get_course_path().'/upload/blog/'.$doc_url; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | //if the rewrite rule asks for a directory, we redirect to the course view |
38 | 38 | if (is_dir($full_file_name)) { |
39 | 39 | //remove last slash if present |
40 | - while ($doc_url{$dul = strlen($doc_url)-1}=='/') $doc_url = substr($doc_url,0,$dul); |
|
40 | + while ($doc_url{$dul = strlen($doc_url) - 1} == '/') $doc_url = substr($doc_url, 0, $dul); |
|
41 | 41 | //create the path |
42 | 42 | $document_explorer = api_get_path(WEB_COURSE_PATH).api_get_course_path(); // home course path |
43 | 43 | //redirect |