@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /* For licensing terms, see /license.txt */ |
3 | 3 | /** |
4 | - * Automatic fix online time procedure. If a COURSEMANAGER has been idle for $timeLimit |
|
5 | - * or more then the procedure adds $extraTime to his logout_course_date. |
|
6 | - * @package chamilo.cron |
|
7 | - * @author Imanol Losada <[email protected]> |
|
8 | - */ |
|
4 | + * Automatic fix online time procedure. If a COURSEMANAGER has been idle for $timeLimit |
|
5 | + * or more then the procedure adds $extraTime to his logout_course_date. |
|
6 | + * @package chamilo.cron |
|
7 | + * @author Imanol Losada <[email protected]> |
|
8 | + */ |
|
9 | 9 | require_once __DIR__ . '/../inc/global.inc.php'; |
10 | 10 | |
11 | 11 | /** |
@@ -1,20 +1,20 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This script should be called by a properly set cron process on your server. |
|
4 | - * For more information, check the installation guide in the documentation |
|
5 | - * folder. |
|
6 | - * Add your own executable scripts below the inclusion of notification.php |
|
7 | - * @package chamilo.cron |
|
8 | - */ |
|
3 | + * This script should be called by a properly set cron process on your server. |
|
4 | + * For more information, check the installation guide in the documentation |
|
5 | + * folder. |
|
6 | + * Add your own executable scripts below the inclusion of notification.php |
|
7 | + * @package chamilo.cron |
|
8 | + */ |
|
9 | 9 | /** |
10 | - * Settings that will influence the execution of the cron tasks |
|
11 | - */ |
|
10 | + * Settings that will influence the execution of the cron tasks |
|
11 | + */ |
|
12 | 12 | //ini_set('max_execution_time',300); //authorize execution for up to 5 minutes |
13 | 13 | //ini_set('memory_limit','100M'); //authorize script to use up to 100M RAM |
14 | 14 | /** |
15 | - * Included cron-ed tasks. You might want to turn error-logging off by |
|
16 | - * commenting the first and last line of this section. |
|
17 | - */ |
|
15 | + * Included cron-ed tasks. You might want to turn error-logging off by |
|
16 | + * commenting the first and last line of this section. |
|
17 | + */ |
|
18 | 18 | error_log('[chamilo][cronjob] Starting cron jobs as process '.getmypid()); |
19 | 19 | require_once 'notification.php'; |
20 | 20 | error_log('[chamilo][cronjob] Ending cron jobs of process '.getmypid()); |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | /* For licensing terms, see /license.txt */ |
3 | 3 | /** |
4 | 4 | * Template (front controller in MVC pattern) used for distpaching to |
5 | - * the controllers depend on the current action |
|
5 | + * the controllers depend on the current action |
|
6 | 6 | * @author Christian Fasanando <[email protected]> |
7 | 7 | * @package chamilo.dashboard |
8 | 8 | */ |
@@ -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 | } |
@@ -85,40 +85,40 @@ |
||
85 | 85 | $this->view->render(); |
86 | 86 | } |
87 | 87 | |
88 | - /** |
|
89 | - * This method allow store user blocks from dashboard manager |
|
90 | - * render to dashboard.php view |
|
91 | - */ |
|
92 | - public function store_user_block() |
|
88 | + /** |
|
89 | + * This method allow store user blocks from dashboard manager |
|
90 | + * render to dashboard.php view |
|
91 | + */ |
|
92 | + public function store_user_block() |
|
93 | 93 | { |
94 | - $data = array(); |
|
95 | - $user_id = $this->user_id; |
|
96 | - if (strtoupper($_SERVER['REQUEST_METHOD']) == "POST") { |
|
97 | - $enabled_blocks = $_POST['enabled_blocks']; |
|
98 | - $columns = $_POST['columns']; |
|
99 | - $affected_rows = DashboardManager::store_user_blocks($user_id, $enabled_blocks, $columns); |
|
100 | - if ($affected_rows) { |
|
101 | - $data['success'] = true; |
|
102 | - } |
|
103 | - } |
|
104 | - |
|
105 | - $data['dashboard_view'] = 'list'; |
|
106 | - |
|
107 | - // render to the view |
|
108 | - $this->view->set_data($data); |
|
109 | - $this->view->set_layout('layout'); |
|
110 | - $this->view->set_template('dashboard'); |
|
111 | - $this->view->render(); |
|
112 | - } |
|
113 | - |
|
114 | - /** |
|
115 | - * This method is used when you close a block from dashboard block interface |
|
116 | - * render to dashboard.php view |
|
117 | - */ |
|
118 | - public function close_user_block($path) |
|
94 | + $data = array(); |
|
95 | + $user_id = $this->user_id; |
|
96 | + if (strtoupper($_SERVER['REQUEST_METHOD']) == "POST") { |
|
97 | + $enabled_blocks = $_POST['enabled_blocks']; |
|
98 | + $columns = $_POST['columns']; |
|
99 | + $affected_rows = DashboardManager::store_user_blocks($user_id, $enabled_blocks, $columns); |
|
100 | + if ($affected_rows) { |
|
101 | + $data['success'] = true; |
|
102 | + } |
|
103 | + } |
|
104 | + |
|
105 | + $data['dashboard_view'] = 'list'; |
|
106 | + |
|
107 | + // render to the view |
|
108 | + $this->view->set_data($data); |
|
109 | + $this->view->set_layout('layout'); |
|
110 | + $this->view->set_template('dashboard'); |
|
111 | + $this->view->render(); |
|
112 | + } |
|
113 | + |
|
114 | + /** |
|
115 | + * This method is used when you close a block from dashboard block interface |
|
116 | + * render to dashboard.php view |
|
117 | + */ |
|
118 | + public function close_user_block($path) |
|
119 | 119 | { |
120 | - $user_id = $this->user_id; |
|
121 | - $result = DashboardManager::close_user_block($user_id, $path); |
|
122 | - $this->display($result); |
|
123 | - } |
|
120 | + $user_id = $this->user_id; |
|
121 | + $result = DashboardManager::close_user_block($user_id, $path); |
|
122 | + $this->display($result); |
|
123 | + } |
|
124 | 124 | } |
@@ -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 |
@@ -1966,7 +1966,7 @@ discard block |
||
1966 | 1966 | $label = get_lang('NextQuestion'); |
1967 | 1967 | $class = 'btn btn-primary'; |
1968 | 1968 | } |
1969 | - $class .= ' question-validate-btn'; // used to select it with jquery |
|
1969 | + $class .= ' question-validate-btn'; // used to select it with jquery |
|
1970 | 1970 | if ($this->type == ONE_PER_PAGE) { |
1971 | 1971 | if ($questionNum != 1) { |
1972 | 1972 | $prev_question = $questionNum - 2; |
@@ -1991,7 +1991,7 @@ discard block |
||
1991 | 1991 | $all_label = get_lang('EndTest'); |
1992 | 1992 | $class = 'btn btn-warning'; |
1993 | 1993 | } |
1994 | - $class .= ' question-validate-btn'; // used to select it with jquery |
|
1994 | + $class .= ' question-validate-btn'; // used to select it with jquery |
|
1995 | 1995 | $all_button = ' <a href="javascript://" class="'.$class.'" onclick="validate_all(); ">'.$all_label.'</a>'; |
1996 | 1996 | $all_button .= ' ' . Display::span(null, ['id' => 'save_all_reponse']); |
1997 | 1997 | $html .= $all_button; |
@@ -3774,7 +3774,7 @@ discard block |
||
3774 | 3774 | |
3775 | 3775 | //Fixes multiple answer question in order to be exact |
3776 | 3776 | //if ($answerType == MULTIPLE_ANSWER || $answerType == GLOBAL_MULTIPLE_ANSWER) { |
3777 | - /* if ($answerType == GLOBAL_MULTIPLE_ANSWER) { |
|
3777 | + /* if ($answerType == GLOBAL_MULTIPLE_ANSWER) { |
|
3778 | 3778 | $diff = @array_diff($answer_correct_array, $real_answers); |
3779 | 3779 | |
3780 | 3780 | // All good answers or nothing works like exact |
@@ -5073,8 +5073,8 @@ discard block |
||
5073 | 5073 | } |
5074 | 5074 | |
5075 | 5075 | /** |
5076 | - * @return string |
|
5077 | - */ |
|
5076 | + * @return string |
|
5077 | + */ |
|
5078 | 5078 | public function get_formated_title() |
5079 | 5079 | { |
5080 | 5080 | return api_html_entity_decode($this->selectTitle()); |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /* For licensing terms, see /license.txt */ |
3 | 3 | /** |
4 | - * Exercise list: This script shows the list of exercises for administrators and students. |
|
5 | - * @package chamilo.exercise |
|
6 | - * @author hubert.borderiou |
|
7 | - * |
|
8 | - */ |
|
4 | + * Exercise list: This script shows the list of exercises for administrators and students. |
|
5 | + * @package chamilo.exercise |
|
6 | + * @author hubert.borderiou |
|
7 | + * |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | use ChamiloSession as Session; |
11 | 11 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | if (!$is_allowedToEdit) { |
48 | - // api_not_allowed(); |
|
48 | + // api_not_allowed(); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | if (!empty($_REQUEST['path'])) { |
@@ -190,9 +190,9 @@ discard block |
||
190 | 190 | get_lang('Actions') |
191 | 191 | ); |
192 | 192 | |
193 | - // Column config |
|
194 | - // @todo fix search firstname/lastname that doesn't work. rmove search for the moment |
|
195 | - $column_model = array( |
|
193 | + // Column config |
|
194 | + // @todo fix search firstname/lastname that doesn't work. rmove search for the moment |
|
195 | + $column_model = array( |
|
196 | 196 | array('name'=>'firstname', 'index'=>'firstname', 'width'=>'50', 'align'=>'left', 'search' => 'false'), |
197 | 197 | array('name'=>'lastname', 'index'=>'lastname', 'width'=>'50', 'align'=>'left', 'formatter'=>'action_formatter', 'search' => 'false'), |
198 | 198 | array('name'=>'login', 'hidden'=>'true', 'index'=>'username', 'width'=>'40', 'align'=>'left', 'search' => 'false'), |
@@ -249,7 +249,7 @@ |
||
249 | 249 | break; |
250 | 250 | case RESULT_DISABLE_SHOW_SCORE_ONLY: |
251 | 251 | if ($objExercise->feedback_type != EXERCISE_FEEDBACK_TYPE_END) { |
252 | - $header_names = array(get_lang('Attempt'), get_lang('StartDate'), get_lang('IP'), get_lang('Score')); |
|
252 | + $header_names = array(get_lang('Attempt'), get_lang('StartDate'), get_lang('IP'), get_lang('Score')); |
|
253 | 253 | } |
254 | 254 | else { |
255 | 255 | $header_names = array(get_lang('Attempt'), get_lang('StartDate'), get_lang('IP'), get_lang('Score'), get_lang('Details')); |