@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | /* For licensing terms, see /license.txt */ |
| 3 | 3 | |
| 4 | 4 | //require_once '../inc/global.inc.php'; |
| 5 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
| 5 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
| 6 | 6 | |
| 7 | 7 | api_protect_course_script(true); |
| 8 | 8 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | $htmlHeadXtra[] = api_get_jqgrid_js(); |
| 37 | 37 | |
| 38 | 38 | if (!empty($group_id)) { |
| 39 | - $group_properties = GroupManager :: get_group_properties($group_id); |
|
| 39 | + $group_properties = GroupManager :: get_group_properties($group_id); |
|
| 40 | 40 | $show_work = false; |
| 41 | 41 | |
| 42 | 42 | if (api_is_allowed_to_edit(false, true)) { |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | echo '<div class="actions">'; |
| 73 | 73 | echo '<a href="'.api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq().'>'. |
| 74 | - Display::return_icon('back.png', get_lang('BackToWorksList'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
| 74 | + Display::return_icon('back.png', get_lang('BackToWorksList'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
| 75 | 75 | echo '</div>'; |
| 76 | 76 | |
| 77 | 77 | if (!empty($my_folder_data['description'])) { |
@@ -93,27 +93,27 @@ discard block |
||
| 93 | 93 | get_lang('Actions') |
| 94 | 94 | ); |
| 95 | 95 | $column_model = array( |
| 96 | - array('name'=>'type', 'index'=>'file', 'width'=>'12', 'align'=>'left', 'search' => 'false', 'sortable' => 'false'), |
|
| 97 | - array('name'=>'firstname', 'index'=>'firstname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), |
|
| 98 | - array('name'=>'lastname', 'index'=>'lastname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), |
|
| 99 | - array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'wrap_cell' => 'true'), |
|
| 100 | - array('name'=>'qualification', 'index'=>'qualification', 'width'=>'20', 'align'=>'left', 'search' => 'true'), |
|
| 101 | - array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'50', 'align'=>'left', 'search' => 'true', 'wrap_cell' => 'true'), |
|
| 102 | - array('name'=>'qualificator_id','index'=>'qualificator_id', 'width'=>'30', 'align'=>'left', 'search' => 'true'), |
|
| 103 | - array('name'=>'actions', 'index'=>'actions', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'sortable'=>'false') |
|
| 96 | + array('name'=>'type', 'index'=>'file', 'width'=>'12', 'align'=>'left', 'search' => 'false', 'sortable' => 'false'), |
|
| 97 | + array('name'=>'firstname', 'index'=>'firstname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), |
|
| 98 | + array('name'=>'lastname', 'index'=>'lastname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), |
|
| 99 | + array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'wrap_cell' => 'true'), |
|
| 100 | + array('name'=>'qualification', 'index'=>'qualification', 'width'=>'20', 'align'=>'left', 'search' => 'true'), |
|
| 101 | + array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'50', 'align'=>'left', 'search' => 'true', 'wrap_cell' => 'true'), |
|
| 102 | + array('name'=>'qualificator_id', 'index'=>'qualificator_id', 'width'=>'30', 'align'=>'left', 'search' => 'true'), |
|
| 103 | + array('name'=>'actions', 'index'=>'actions', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'sortable'=>'false') |
|
| 104 | 104 | ); |
| 105 | 105 | } else { |
| 106 | 106 | $type = 'complex'; |
| 107 | - $columns = array( |
|
| 108 | - get_lang('Type'), get_lang('FirstName'), get_lang('LastName'), get_lang('Title'), get_lang('Date'), get_lang('Actions') |
|
| 107 | + $columns = array( |
|
| 108 | + get_lang('Type'), get_lang('FirstName'), get_lang('LastName'), get_lang('Title'), get_lang('Date'), get_lang('Actions') |
|
| 109 | 109 | ); |
| 110 | 110 | $column_model = array( |
| 111 | - array('name'=>'type', 'index'=>'file', 'width'=>'12', 'align'=>'left', 'search' => 'false', 'sortable' => 'false'), |
|
| 112 | - array('name'=>'firstname', 'index'=>'firstname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), |
|
| 113 | - array('name'=>'lastname', 'index'=>'lastname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), |
|
| 114 | - array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'wrap_cell' => "true"), |
|
| 115 | - array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'50', 'align'=>'left', 'search' => 'true', 'wrap_cell' => 'true'), |
|
| 116 | - array('name'=>'actions', 'index'=>'actions', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'sortable'=>'false') |
|
| 111 | + array('name'=>'type', 'index'=>'file', 'width'=>'12', 'align'=>'left', 'search' => 'false', 'sortable' => 'false'), |
|
| 112 | + array('name'=>'firstname', 'index'=>'firstname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), |
|
| 113 | + array('name'=>'lastname', 'index'=>'lastname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), |
|
| 114 | + array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'wrap_cell' => "true"), |
|
| 115 | + array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'50', 'align'=>'left', 'search' => 'true', 'wrap_cell' => 'true'), |
|
| 116 | + array('name'=>'actions', 'index'=>'actions', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'sortable'=>'false') |
|
| 117 | 117 | ); |
| 118 | 118 | } |
| 119 | 119 | |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | /* For licensing terms, see /license.txt */ |
| 3 | 3 | |
| 4 | 4 | require_once '../inc/global.inc.php'; |
| 5 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
| 5 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
| 6 | 6 | |
| 7 | 7 | require_once 'work.lib.php'; |
| 8 | 8 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $userInfo = api_get_user_info($work['user_id']); |
| 53 | 53 | $interbreadcrumb[] = array('url' => $url_dir, 'name' => $my_folder_data['title']); |
| 54 | 54 | $interbreadcrumb[] = array('url' => '#', 'name' => $userInfo['complete_name']); |
| 55 | - $interbreadcrumb[] = array('url' => '#','name' => $work['title']); |
|
| 55 | + $interbreadcrumb[] = array('url' => '#', 'name' => $work['title']); |
|
| 56 | 56 | |
| 57 | 57 | if (($courseInfo['show_score'] == 0 && |
| 58 | 58 | $work['active'] == 1 && |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | use ChamiloSession as Session; |
| 5 | 5 | |
| 6 | 6 | require_once '../inc/global.inc.php'; |
| 7 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
| 7 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
| 8 | 8 | |
| 9 | 9 | api_protect_course_script(true); |
| 10 | 10 | |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | $url = api_get_path(WEB_CODE_PATH).'work/upload.php?'.api_get_cidreq().'&id='.$workId.'&origin='.$origin; |
| 66 | 66 | $actionsRight = Display::toolbarButton(get_lang('UploadMyAssignment'), $url, 'upload', 'success'); |
| 67 | 67 | } |
| 68 | -echo Display::toolbarAction('toolbar-work', array(0 => $actionsLeft . $actionsRight)); |
|
| 68 | +echo Display::toolbarAction('toolbar-work', array(0 => $actionsLeft.$actionsRight)); |
|
| 69 | 69 | |
| 70 | 70 | if (!empty($my_folder_data['title'])) { |
| 71 | 71 | echo Display::page_subheader($my_folder_data['title']); |
@@ -117,10 +117,10 @@ discard block |
||
| 117 | 117 | ); |
| 118 | 118 | |
| 119 | 119 | $column_model = array( |
| 120 | - array('name'=>'type', 'index'=>'file', 'width'=>'5', 'align'=>'left', 'search' => 'false', 'sortable' => 'false'), |
|
| 121 | - array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'wrap_cell' => 'true'), |
|
| 120 | + array('name'=>'type', 'index'=>'file', 'width'=>'5', 'align'=>'left', 'search' => 'false', 'sortable' => 'false'), |
|
| 121 | + array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'wrap_cell' => 'true'), |
|
| 122 | 122 | array('name'=>'qualification', 'index'=>'qualification', 'width'=>'10', 'align'=>'left', 'search' => 'true'), |
| 123 | - array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'30', 'align'=>'left', 'search' => 'true', 'wrap_cell' => 'true'), |
|
| 123 | + array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'30', 'align'=>'left', 'search' => 'true', 'wrap_cell' => 'true'), |
|
| 124 | 124 | array('name'=>'qualificator_id', 'index'=>'qualificator_id', 'width'=>'20', 'align'=>'left', 'search' => 'true'), |
| 125 | 125 | array('name'=>'actions', 'index'=>'actions', 'width'=>'20', 'align'=>'left', 'search' => 'false', 'sortable'=>'false') |
| 126 | 126 | ); |
@@ -136,11 +136,11 @@ discard block |
||
| 136 | 136 | ); |
| 137 | 137 | |
| 138 | 138 | $column_model = array( |
| 139 | - array('name'=>'type', 'index'=>'file', 'width'=>'5', 'align'=>'left', 'search' => 'false', 'sortable' => 'false'), |
|
| 140 | - array('name'=>'title', 'index'=>'title', 'width'=>'60', 'align'=>'left', 'search' => 'false', 'wrap_cell' => "true"), |
|
| 141 | - array('name'=>'qualification', 'index'=>'qualification', 'width'=>'10', 'align'=>'left', 'search' => 'true'), |
|
| 139 | + array('name'=>'type', 'index'=>'file', 'width'=>'5', 'align'=>'left', 'search' => 'false', 'sortable' => 'false'), |
|
| 140 | + array('name'=>'title', 'index'=>'title', 'width'=>'60', 'align'=>'left', 'search' => 'false', 'wrap_cell' => "true"), |
|
| 141 | + array('name'=>'qualification', 'index'=>'qualification', 'width'=>'10', 'align'=>'left', 'search' => 'true'), |
|
| 142 | 142 | array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'30', 'align'=>'left', 'search' => 'true', 'wrap_cell' => 'true', 'sortable'=>'false'), |
| 143 | - array('name'=>'actions', 'index'=>'actions', 'width'=>'20', 'align'=>'left', 'search' => 'false', 'sortable'=>'false') |
|
| 143 | + array('name'=>'actions', 'index'=>'actions', 'width'=>'20', 'align'=>'left', 'search' => 'false', 'sortable'=>'false') |
|
| 144 | 144 | ); |
| 145 | 145 | } |
| 146 | 146 | |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | use ChamiloSession as Session; |
| 9 | 9 | |
| 10 | 10 | require_once '../inc/global.inc.php'; |
| 11 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
| 11 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
| 12 | 12 | |
| 13 | 13 | api_protect_course_script(true); |
| 14 | 14 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | $item_id = isset($_REQUEST['item_id']) ? intval($_REQUEST['item_id']) : null; |
| 40 | 40 | $origin = isset($_REQUEST['origin']) ? Security::remove_XSS($_REQUEST['origin']) : ''; |
| 41 | 41 | $course_dir = api_get_path(SYS_COURSE_PATH).$_course['path']; |
| 42 | -$base_work_dir = $course_dir . '/work'; |
|
| 42 | +$base_work_dir = $course_dir.'/work'; |
|
| 43 | 43 | $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'list'; |
| 44 | 44 | |
| 45 | 45 | //Download folder |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | 'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(), |
| 77 | 77 | 'name' => get_lang('StudentPublications'), |
| 78 | 78 | ); |
| 79 | - $url_dir = api_get_path(WEB_CODE_PATH).'work/work.php?&id=' . $work_id.'&'.api_get_cidreq(); |
|
| 79 | + $url_dir = api_get_path(WEB_CODE_PATH).'work/work.php?&id='.$work_id.'&'.api_get_cidreq(); |
|
| 80 | 80 | if (!empty($my_folder_data)) { |
| 81 | 81 | $interbreadcrumb[] = array('url' => $url_dir, 'name' => $my_folder_data['title']); |
| 82 | 82 | } |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditToolOptions')); |
| 120 | 120 | } |
| 121 | 121 | if ($action == 'create_dir') { |
| 122 | - $interbreadcrumb[] = array('url' => '#','name' => get_lang('CreateAssignment')); |
|
| 122 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('CreateAssignment')); |
|
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | } |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | $form = new FormValidator( |
| 171 | 171 | 'form1', |
| 172 | 172 | 'post', |
| 173 | - api_get_path(WEB_CODE_PATH) . 'work/work.php?action=create_dir&' . api_get_cidreq() |
|
| 173 | + api_get_path(WEB_CODE_PATH).'work/work.php?action=create_dir&'.api_get_cidreq() |
|
| 174 | 174 | ); |
| 175 | 175 | $form->addElement('header', get_lang('CreateAssignment')); |
| 176 | 176 | $form->addElement('hidden', 'action', 'add'); |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | $result = deleteDirWork($_REQUEST['id']); |
| 208 | 208 | if ($result) { |
| 209 | 209 | $message = Display::return_message( |
| 210 | - get_lang('DirDeleted') . ': ' . $work_to_delete['title'], |
|
| 210 | + get_lang('DirDeleted').': '.$work_to_delete['title'], |
|
| 211 | 211 | 'success' |
| 212 | 212 | ); |
| 213 | 213 | Session::write('message', $message); |
@@ -235,19 +235,19 @@ discard block |
||
| 235 | 235 | if ($is_allowed_to_edit) { |
| 236 | 236 | $move_to_path = get_work_path($_REQUEST['move_to_id']); |
| 237 | 237 | |
| 238 | - if ($move_to_path==-1) { |
|
| 238 | + if ($move_to_path == -1) { |
|
| 239 | 239 | $move_to_path = '/'; |
| 240 | 240 | } elseif (substr($move_to_path, -1, 1) != '/') { |
| 241 | - $move_to_path = $move_to_path .'/'; |
|
| 241 | + $move_to_path = $move_to_path.'/'; |
|
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | // Security fix: make sure they can't move files that are not in the document table |
| 245 | 245 | if ($path = get_work_path($item_id)) { |
| 246 | - if (move($course_dir.'/'.$path, $base_work_dir . $move_to_path)) { |
|
| 246 | + if (move($course_dir.'/'.$path, $base_work_dir.$move_to_path)) { |
|
| 247 | 247 | // Update db |
| 248 | 248 | updateWorkUrl( |
| 249 | 249 | $item_id, |
| 250 | - 'work' . $move_to_path, |
|
| 250 | + 'work'.$move_to_path, |
|
| 251 | 251 | $_REQUEST['move_to_id'] |
| 252 | 252 | ); |
| 253 | 253 | |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | $content .= '</div>'; |
| 346 | 346 | $content .= '</div>'; |
| 347 | 347 | $content .= '<div id="student-list-work" style="display: none" class="table-responsive">'; |
| 348 | - $content .= '<div class="toolbar"><a id="closed-view-list" href="#"><em class="fa fa-times-circle"></em> ' .get_lang('Close'). '</a></div>'; |
|
| 348 | + $content .= '<div class="toolbar"><a id="closed-view-list" href="#"><em class="fa fa-times-circle"></em> '.get_lang('Close').'</a></div>'; |
|
| 349 | 349 | $content .= showStudentList($work_id); |
| 350 | 350 | $content .= '</div>'; |
| 351 | 351 | } else { |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | use ChamiloSession as Session; |
| 5 | 5 | |
| 6 | 6 | require_once '../inc/global.inc.php'; |
| 7 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
| 7 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
| 8 | 8 | |
| 9 | 9 | api_protect_course_script(true); |
| 10 | 10 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $token = Security::get_token(); |
| 51 | 51 | |
| 52 | 52 | $student_can_edit_in_session = api_is_allowed_to_session_edit(false, true); |
| 53 | -$has_ended = false; |
|
| 53 | +$has_ended = false; |
|
| 54 | 54 | $is_author = false; |
| 55 | 55 | $work_item = get_work_data_by_id($item_id); |
| 56 | 56 | |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | $form->setDefaults($defaults); |
| 221 | 221 | $error_message = null; |
| 222 | 222 | $_course = api_get_course_info(); |
| 223 | -$currentCourseRepositorySys = api_get_path(SYS_COURSE_PATH).$_course['path'] . '/'; |
|
| 223 | +$currentCourseRepositorySys = api_get_path(SYS_COURSE_PATH).$_course['path'].'/'; |
|
| 224 | 224 | |
| 225 | 225 | $succeed = false; |
| 226 | 226 | if ($form->validate()) { |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | $description = isset($_POST['description']) ? $_POST['description'] : $work_data['description']; |
| 242 | 242 | |
| 243 | 243 | $add_to_update = null; |
| 244 | - if ($is_allowed_to_edit && ($_POST['qualification'] !='' )) { |
|
| 244 | + if ($is_allowed_to_edit && ($_POST['qualification'] != '')) { |
|
| 245 | 245 | $add_to_update = ', qualificator_id ='."'".api_get_user_id()."', "; |
| 246 | 246 | $add_to_update .= ' qualification = '."'".Database::escape_string($_POST['qualification'])."',"; |
| 247 | 247 | $add_to_update .= ' date_of_qualification = '."'".api_get_utc_datetime()."'"; |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | 'error' |
| 268 | 268 | ); |
| 269 | 269 | } else { |
| 270 | - $sql = "UPDATE " . $work_table . " |
|
| 270 | + $sql = "UPDATE ".$work_table." |
|
| 271 | 271 | SET title = '".Database::escape_string($title)."', |
| 272 | 272 | description = '".Database::escape_string($description)."' |
| 273 | 273 | ".$add_to_update." |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | /* For licensing terms, see /license.txt */ |
| 3 | 3 | |
| 4 | 4 | require_once '../inc/global.inc.php'; |
| 5 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
| 5 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
| 6 | 6 | |
| 7 | 7 | /* Configuration settings */ |
| 8 | 8 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | $token = Security::get_token(); |
| 57 | 57 | |
| 58 | 58 | if (!empty($group_id)) { |
| 59 | - $group_properties = GroupManager::get_group_properties($group_id); |
|
| 59 | + $group_properties = GroupManager::get_group_properties($group_id); |
|
| 60 | 60 | $show_work = false; |
| 61 | 61 | |
| 62 | 62 | if (api_is_allowed_to_edit(false, true)) { |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | if (!empty($workId)) { |
| 109 | 109 | if (empty($_GET['list']) or Security::remove_XSS($_GET['list']) == 'with') { |
| 110 | 110 | $output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$workId.'&list=without">'. |
| 111 | - Display::return_icon('exercice_uncheck.png', get_lang('ViewUsersWithoutTask'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
| 111 | + Display::return_icon('exercice_uncheck.png', get_lang('ViewUsersWithoutTask'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
| 112 | 112 | } else { |
| 113 | 113 | if (!isset($_GET['action']) || (isset($_GET['action']) && $_GET['action'] != 'send_mail')) { |
| 114 | 114 | $output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$workId.'&list=without&action=send_mail&sec_token='.$token.'">'. |