@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | SessionManager::protectSession($id_session); |
17 | 17 | |
18 | 18 | // setting breadcrumbs |
19 | -$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
19 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
20 | 20 | $interbreadcrumb[] = array( |
21 | 21 | 'url' => 'resume_session.php?id_session='.$id_session, |
22 | 22 | 'name' => get_lang('SessionOverview'), |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | FROM '.Database :: get_main_table(TABLE_MAIN_SESSION).' |
44 | 44 | WHERE id='.$id_session; |
45 | 45 | $rs = Database::query($sql); |
46 | - if (Database::result($rs,0,0)!=$_user['user_id']) { |
|
46 | + if (Database::result($rs, 0, 0) != $_user['user_id']) { |
|
47 | 47 | api_not_allowed(true); |
48 | 48 | } |
49 | 49 | } |
@@ -88,9 +88,9 @@ discard block |
||
88 | 88 | |
89 | 89 | foreach ($CourseList as $enreg_course) { |
90 | 90 | $exists = false; |
91 | - foreach($existingCourses as $existingCourse) { |
|
91 | + foreach ($existingCourses as $existingCourse) { |
|
92 | 92 | if ($enreg_course == $existingCourse['id']) { |
93 | - $exists=true; |
|
93 | + $exists = true; |
|
94 | 94 | } |
95 | 95 | } |
96 | 96 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | } |
111 | 111 | |
112 | 112 | foreach ($existingCourses as $existingCourse) { |
113 | - if (!in_array($existingCourse['id'], $CourseList)){ |
|
113 | + if (!in_array($existingCourse['id'], $CourseList)) { |
|
114 | 114 | $existingCourse = Database::escape_string($existingCourse['id']); |
115 | 115 | $sql = "INSERT IGNORE INTO $tbl_session_rel_course_rel_user (session_id,c_id,user_id) |
116 | 116 | VALUES ('$id_session','$existingCourse','$id_user')"; |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | WHERE srcru.user_id = $id_user AND session_id = $id_session"; |
147 | 147 | |
148 | 148 | //all |
149 | -$sql_all="SELECT course.id, code, title, visual_code, src.session_id |
|
149 | +$sql_all = "SELECT course.id, code, title, visual_code, src.session_id |
|
150 | 150 | FROM $tbl_course course |
151 | 151 | INNER JOIN $tbl_session_rel_course as src |
152 | 152 | ON course.id = src.c_id AND session_id = $id_session"; |
@@ -163,9 +163,9 @@ discard block |
||
163 | 163 | |
164 | 164 | foreach ($CoursesAll as $course) { |
165 | 165 | if (in_array($course['id'], $course_temp)) { |
166 | - $nosessionCourses[$course['id']] = $course ; |
|
166 | + $nosessionCourses[$course['id']] = $course; |
|
167 | 167 | } else { |
168 | - $sessionCourses[$course['id']] = $course ; |
|
168 | + $sessionCourses[$course['id']] = $course; |
|
169 | 169 | } |
170 | 170 | } |
171 | 171 | unset($Courses); |
@@ -184,9 +184,9 @@ discard block |
||
184 | 184 | <td width="45%" align="center"> |
185 | 185 | <div id="ajax_list_courses_multiple"> |
186 | 186 | <select id="origin" name="NoSessionCoursesList[]" multiple="multiple" size="20" style="width:320px;"> <?php |
187 | - foreach($nosessionCourses as $enreg) { |
|
187 | + foreach ($nosessionCourses as $enreg) { |
|
188 | 188 | ?> |
189 | - <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')',ENT_QUOTES).'"'; if(in_array($enreg['code'],$CourseList)) echo 'selected="selected"'; ?>><?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?></option> |
|
189 | + <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')', ENT_QUOTES).'"'; if (in_array($enreg['code'], $CourseList)) echo 'selected="selected"'; ?>><?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?></option> |
|
190 | 190 | <?php |
191 | 191 | } |
192 | 192 | ?> </select></div> <?php |
@@ -211,9 +211,9 @@ discard block |
||
211 | 211 | <td width="45%" align="center"> |
212 | 212 | <select id='destination' name="SessionCoursesList[]" multiple="multiple" size="20" style="width:320px;"> |
213 | 213 | <?php |
214 | - foreach($sessionCourses as $enreg) { |
|
214 | + foreach ($sessionCourses as $enreg) { |
|
215 | 215 | ?> |
216 | - <option value="<?php echo $enreg['id']; ?>" title="<?php echo htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')',ENT_QUOTES); ?>"><?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?></option> |
|
216 | + <option value="<?php echo $enreg['id']; ?>" title="<?php echo htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')', ENT_QUOTES); ?>"><?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?></option> |
|
217 | 217 | <?php |
218 | 218 | } |
219 | 219 | unset($sessionCourses); |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | require_once '../inc/global.inc.php'; |
9 | 9 | |
10 | 10 | // setting the section (for the tabs) |
11 | -$this_section=SECTION_PLATFORM_ADMIN; |
|
11 | +$this_section = SECTION_PLATFORM_ADMIN; |
|
12 | 12 | |
13 | 13 | $id_session = intval($_GET['id_session']); |
14 | 14 | SessionManager::protectSession($id_session); |
@@ -16,8 +16,8 @@ discard block |
||
16 | 16 | // Database Table Definitions |
17 | 17 | $tbl_course = Database::get_main_table(TABLE_MAIN_COURSE); |
18 | 18 | $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION); |
19 | -$tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE); |
|
20 | -$tbl_session_rel_course_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER); |
|
19 | +$tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE); |
|
20 | +$tbl_session_rel_course_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER); |
|
21 | 21 | |
22 | 22 | if (empty($id_session)) { |
23 | 23 | api_not_allowed(); |
@@ -25,26 +25,26 @@ discard block |
||
25 | 25 | |
26 | 26 | $page = intval($_GET['page']); |
27 | 27 | $action = $_REQUEST['action']; |
28 | -$sort = in_array($_GET['sort'],array('title','nbr_users'))?$_GET['sort']:'title'; |
|
28 | +$sort = in_array($_GET['sort'], array('title', 'nbr_users')) ? $_GET['sort'] : 'title'; |
|
29 | 29 | |
30 | 30 | $result = Database::query("SELECT name FROM $tbl_session WHERE id='$id_session'"); |
31 | 31 | |
32 | -if (!list($session_name)=Database::fetch_row($result)) { |
|
32 | +if (!list($session_name) = Database::fetch_row($result)) { |
|
33 | 33 | header('Location: session_list.php'); |
34 | 34 | exit; |
35 | 35 | } |
36 | 36 | |
37 | 37 | if ($action == 'delete') { |
38 | 38 | $idChecked = $_REQUEST['idChecked']; |
39 | - if (is_array($idChecked) && count($idChecked)>0) { |
|
39 | + if (is_array($idChecked) && count($idChecked) > 0) { |
|
40 | 40 | $my_temp = array(); |
41 | - foreach ($idChecked as $id){ |
|
42 | - $my_temp[]= Database::escape_string($id);// forcing the escape_string |
|
41 | + foreach ($idChecked as $id) { |
|
42 | + $my_temp[] = Database::escape_string($id); // forcing the escape_string |
|
43 | 43 | } |
44 | 44 | $idChecked = $my_temp; |
45 | - $idChecked="'".implode("','", $idChecked)."'"; |
|
45 | + $idChecked = "'".implode("','", $idChecked)."'"; |
|
46 | 46 | $result = Database::query("DELETE FROM $tbl_session_rel_course WHERE session_id='$id_session' AND c_id IN($idChecked)"); |
47 | - $nbr_affected_rows=Database::affected_rows($result); |
|
47 | + $nbr_affected_rows = Database::affected_rows($result); |
|
48 | 48 | Database::query("DELETE FROM $tbl_session_rel_course_rel_user WHERE session_id='$id_session' AND c_id IN($idChecked)"); |
49 | 49 | Database::query("UPDATE $tbl_session SET nbr_courses=nbr_courses-$nbr_affected_rows WHERE id='$id_session'"); |
50 | 50 | } |
@@ -59,14 +59,14 @@ discard block |
||
59 | 59 | FROM $tbl_session_rel_course, $tbl_course c |
60 | 60 | WHERE c_id = c.id AND session_id='$id_session' |
61 | 61 | ORDER BY $sort |
62 | - LIMIT $from,".($limit+1); |
|
63 | -$result=Database::query($sql); |
|
64 | -$Courses=Database::store_result($result); |
|
65 | -$tool_name = api_htmlentities($session_name,ENT_QUOTES,$charset).' : '.get_lang('CourseListInSession'); |
|
62 | + LIMIT $from,".($limit + 1); |
|
63 | +$result = Database::query($sql); |
|
64 | +$Courses = Database::store_result($result); |
|
65 | +$tool_name = api_htmlentities($session_name, ENT_QUOTES, $charset).' : '.get_lang('CourseListInSession'); |
|
66 | 66 | |
67 | 67 | //$interbreadcrumb[]=array('url' => 'index.php',"name" => get_lang('PlatformAdmin')); |
68 | -$interbreadcrumb[] = array('url' => "session_list.php","name" => get_lang('SessionList')); |
|
69 | -$interbreadcrumb[] = array('url' => "resume_session.php?id_session=".Security::remove_XSS($_REQUEST['id_session']),"name" => get_lang('SessionOverview')); |
|
68 | +$interbreadcrumb[] = array('url' => "session_list.php", "name" => get_lang('SessionList')); |
|
69 | +$interbreadcrumb[] = array('url' => "resume_session.php?id_session=".Security::remove_XSS($_REQUEST['id_session']), "name" => get_lang('SessionOverview')); |
|
70 | 70 | |
71 | 71 | Display::display_header($tool_name); |
72 | 72 | echo Display::page_header($tool_name); |
@@ -84,18 +84,18 @@ discard block |
||
84 | 84 | foreach ($Courses as $key=>$enreg) { |
85 | 85 | $course = array(); |
86 | 86 | $course[] = '<input type="checkbox" name="idChecked[]" value="'.$enreg['id'].'">'; |
87 | - $course[] = api_htmlentities($enreg['title'],ENT_QUOTES,$charset); |
|
87 | + $course[] = api_htmlentities($enreg['title'], ENT_QUOTES, $charset); |
|
88 | 88 | $course[] = '<a href="session_course_user_list.php?id_session='.$id_session.'&course_code='.$enreg['code'].'">'.$enreg['nbr_users'].' '.get_lang('Users').'</a>'; |
89 | 89 | $course[] = '<a href="'.api_get_path(WEB_COURSE_PATH).$enreg['code'].'/?id_session='.$id_session.'">'. |
90 | 90 | Display::return_icon('course_home.gif', get_lang('Course')).'</a> |
91 | 91 | <a href="session_course_edit.php?id_session='.$id_session.'&page=session_course_list.php&course_code='.$enreg['code'].'">'. |
92 | 92 | Display::return_icon('edit.png', get_lang('Edit')).'</a> |
93 | - <a href="'.api_get_self().'?id_session='.$id_session.'&sort='.$sort.'&action=delete&idChecked[]='.$enreg['id'].'" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset)).'\')) return false;">'. |
|
93 | + <a href="'.api_get_self().'?id_session='.$id_session.'&sort='.$sort.'&action=delete&idChecked[]='.$enreg['id'].'" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES, $charset)).'\')) return false;">'. |
|
94 | 94 | Display::return_icon('delete.png', get_lang('Delete')).'</a>'; |
95 | 95 | $tableCourses[] = $course; |
96 | 96 | } |
97 | 97 | echo '<form method="post" action="'.api_get_self().'">'; |
98 | -Display :: display_sortable_table($tableHeader, $tableCourses, array (), array ()); |
|
98 | +Display :: display_sortable_table($tableHeader, $tableCourses, array(), array()); |
|
99 | 99 | echo '<select name="action"> |
100 | 100 | <option value="delete">'.get_lang('UnsubscribeCoursesFromSession').'</option> |
101 | 101 | </select> |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | //$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('PlatformAdmin')); |
46 | -$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
46 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
47 | 47 | |
48 | 48 | if (isset($_GET['search']) && $_GET['search'] == 'advanced') { |
49 | 49 | $interbreadcrumb[] = array("url" => 'session_category_list.php', "name" => get_lang('ListSessionCategory')); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $where .= " AND access_url_id = ".api_get_current_access_url_id()." "; |
77 | 77 | } |
78 | 78 | |
79 | - $table_access_url_rel_session= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); |
|
79 | + $table_access_url_rel_session = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); |
|
80 | 80 | $query = "SELECT sc.*, ( |
81 | 81 | SELECT count(id) FROM $tbl_session s |
82 | 82 | INNER JOIN $table_access_url_rel_session us |
@@ -14,12 +14,12 @@ |
||
14 | 14 | |
15 | 15 | // setting breadcrumbs |
16 | 16 | //$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin')); |
17 | -$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
17 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
18 | 18 | |
19 | 19 | // Setting the name of the tool |
20 | 20 | $tool_name = get_lang('SubscribeStudentsToSession'); |
21 | 21 | $add_type = 'multiple'; |
22 | -if (isset($_REQUEST['add_type']) && $_REQUEST['add_type']!='') { |
|
22 | +if (isset($_REQUEST['add_type']) && $_REQUEST['add_type'] != '') { |
|
23 | 23 | $add_type = Security::remove_XSS($_REQUEST['add_type']); |
24 | 24 | } |
25 | 25 | $form_sent = 0; |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | $tool_name = get_lang('ImportSessionDrhList'); |
17 | 17 | |
18 | 18 | //$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
19 | -$interbreadcrumb[]=array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
19 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
20 | 20 | |
21 | 21 | set_time_limit(0); |
22 | 22 | |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | echo '<div class="actions">'; |
29 | 29 | echo '<a href="../session/session_list.php">'. |
30 | - Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
30 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
31 | 31 | echo '</div>'; |
32 | 32 | |
33 | 33 | if (!empty($error_message)) { |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | // setting breadcrumbs |
16 | 16 | //$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin')); |
17 | -$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
17 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
18 | 18 | |
19 | 19 | // Setting the name of the tool |
20 | 20 | $tool_name = get_lang('EnrollTrainersFromExistingSessions'); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | 'sessions[]', |
75 | 75 | $sessionList, |
76 | 76 | '', |
77 | - array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'sessions', 'size'=>'15px'), |
|
77 | + array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'sessions', 'size'=>'15px'), |
|
78 | 78 | false |
79 | 79 | ); |
80 | 80 | ?> |
@@ -52,14 +52,14 @@ discard block |
||
52 | 52 | 'course_name', |
53 | 53 | get_lang('SearchCourse'), |
54 | 54 | null, |
55 | - array('url' => api_get_path(WEB_AJAX_PATH) . 'course.ajax.php?a=search_course') |
|
55 | + array('url' => api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=search_course') |
|
56 | 56 | ); |
57 | 57 | |
58 | 58 | if (!empty($courseId)) { |
59 | 59 | $courseInfo = api_get_course_info_by_id($courseId); |
60 | 60 | $parents = getParentsToString($courseInfo['categoryCode']); |
61 | 61 | |
62 | - $courseSelect->addOption($parents . $courseInfo['title'], $courseInfo['code'], ['selected' => 'selected']); |
|
62 | + $courseSelect->addOption($parents.$courseInfo['title'], $courseInfo['code'], ['selected' => 'selected']); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | $url = api_get_self(); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | // height auto |
112 | 112 | $extra_params['height'] = 'auto'; |
113 | 113 | |
114 | -$extra_params['postData'] =array( |
|
114 | +$extra_params['postData'] = array( |
|
115 | 115 | 'filters' => array( |
116 | 116 | "groupOp" => "AND", |
117 | 117 | "rules" => $result['rules'], |
@@ -125,11 +125,11 @@ discard block |
||
125 | 125 | |
126 | 126 | //With this function we can add actions to the jgrid (edit, delete, etc) |
127 | 127 | $action_links = 'function action_formatter(cellvalue, options, rowObject) { |
128 | - return \'<a href="session_edit.php?page=resume_session.php&id=\'+options.rowId+\'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'. |
|
129 | - ' <a href="add_users_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('user_subscribe_session.png',get_lang('SubscribeUsersToSession'),'',ICON_SIZE_SMALL).'</a>'. |
|
130 | - ' <a href="add_courses_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('courses_to_session.png',get_lang('SubscribeCoursesToSession'),'',ICON_SIZE_SMALL).'</a>'. |
|
131 | - ' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="session_list.php?action=copy&idChecked=\'+options.rowId+\'">'.Display::return_icon('copy.png',get_lang('Copy'),'',ICON_SIZE_SMALL).'</a>'. |
|
132 | - ' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="session_list.php?action=delete&idChecked=\'+options.rowId+\'">'.Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'. |
|
128 | + return \'<a href="session_edit.php?page=resume_session.php&id=\'+options.rowId+\'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'. |
|
129 | + ' <a href="add_users_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('user_subscribe_session.png', get_lang('SubscribeUsersToSession'), '', ICON_SIZE_SMALL).'</a>'. |
|
130 | + ' <a href="add_courses_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('courses_to_session.png', get_lang('SubscribeCoursesToSession'), '', ICON_SIZE_SMALL).'</a>'. |
|
131 | + ' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."\'".')) return false;" href="session_list.php?action=copy&idChecked=\'+options.rowId+\'">'.Display::return_icon('copy.png', get_lang('Copy'), '', ICON_SIZE_SMALL).'</a>'. |
|
132 | + ' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."\'".')) return false;" href="session_list.php?action=delete&idChecked=\'+options.rowId+\'">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'. |
|
133 | 133 | '\'; |
134 | 134 | }'; |
135 | 135 | |
@@ -298,18 +298,18 @@ discard block |
||
298 | 298 | <?php |
299 | 299 | |
300 | 300 | echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/session_add.php">'. |
301 | - Display::return_icon('new_session.png',get_lang('AddSession'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
301 | + Display::return_icon('new_session.png', get_lang('AddSession'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
302 | 302 | if (api_is_platform_admin()) { |
303 | 303 | echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/add_many_session_to_category.php">'. |
304 | - Display::return_icon('session_to_category.png',get_lang('AddSessionsInCategories'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
304 | + Display::return_icon('session_to_category.png', get_lang('AddSessionsInCategories'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
305 | 305 | echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/session_category_list.php">'. |
306 | - Display::return_icon('folder.png',get_lang('ListSessionCategory'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
306 | + Display::return_icon('folder.png', get_lang('ListSessionCategory'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
307 | 307 | } |
308 | 308 | |
309 | 309 | if ($list_type == 'complete') { |
310 | - echo '<a href="'.api_get_self().'?list_type=simple">'.Display::return_icon('view_remove.png',get_lang('Simple'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
310 | + echo '<a href="'.api_get_self().'?list_type=simple">'.Display::return_icon('view_remove.png', get_lang('Simple'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
311 | 311 | } else { |
312 | - echo '<a href="'.api_get_self().'?list_type=complete">'.Display::return_icon('view_text.png',get_lang('Complete'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
312 | + echo '<a href="'.api_get_self().'?list_type=complete">'.Display::return_icon('view_text.png', get_lang('Complete'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
313 | 313 | } |
314 | 314 | |
315 | 315 | echo $actions; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $tool_name = get_lang('ImportSessionListXMLCSV'); |
25 | 25 | |
26 | 26 | //$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
27 | -$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
27 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
28 | 28 | |
29 | 29 | set_time_limit(0); |
30 | 30 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $form_sent = $_POST['formSent']; |
41 | 41 | $file_type = isset($_POST['file_type']) ? $_POST['file_type'] : null; |
42 | 42 | $send_mail = isset($_POST['sendMail']) && $_POST['sendMail'] ? 1 : 0; |
43 | - $isOverwrite = isset($_POST['overwrite']) && $_POST['overwrite'] ? true: false; |
|
43 | + $isOverwrite = isset($_POST['overwrite']) && $_POST['overwrite'] ? true : false; |
|
44 | 44 | $deleteUsersNotInList = isset($_POST['delete_users_not_in_list']) ? true : false; |
45 | 45 | $sessions = array(); |
46 | 46 | $session_counter = 0; |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | $sql = "INSERT IGNORE INTO $tbl_session_user SET |
319 | 319 | user_id ='$user_id', |
320 | 320 | session_id = '$session_id', |
321 | - registered_at = '" . api_get_utc_datetime() . "'"; |
|
321 | + registered_at = '".api_get_utc_datetime()."'"; |
|
322 | 322 | $rs_user = Database::query($sql); |
323 | 323 | $user_counter++; |
324 | 324 | } |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | $sql = "INSERT IGNORE INTO $tbl_session_user SET |
372 | 372 | user_id ='$user_id', |
373 | 373 | session_id = '$session_id', |
374 | - registered_at = '" . api_get_utc_datetime() . "'"; |
|
374 | + registered_at = '".api_get_utc_datetime()."'"; |
|
375 | 375 | $rs_user = Database::query($sql); |
376 | 376 | $user_counter++; |
377 | 377 | // Adding to session_rel_user_rel_course table. |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | |
469 | 469 | echo '<div class="actions">'; |
470 | 470 | echo '<a href="../session/session_list.php">'. |
471 | - Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
471 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
472 | 472 | echo '</div>'; |
473 | 473 | |
474 | 474 | if (!empty($error_message)) { |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | get_lang('FileType'), |
486 | 486 | Display::url( |
487 | 487 | get_lang('ExampleCSVFile'), |
488 | - api_get_path(WEB_CODE_PATH) . 'admin/example_session.csv', |
|
488 | + api_get_path(WEB_CODE_PATH).'admin/example_session.csv', |
|
489 | 489 | ['target' => '_blank'] |
490 | 490 | ) |
491 | 491 | ], |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | null, |
500 | 500 | Display::url( |
501 | 501 | get_lang('ExampleXMLFile'), |
502 | - api_get_path(WEB_CODE_PATH) . 'admin/example_session.xml', |
|
502 | + api_get_path(WEB_CODE_PATH).'admin/example_session.xml', |
|
503 | 503 | ['target' => '_blank'] |
504 | 504 | ) |
505 | 505 | ], |
@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | $form->addElement('checkbox', 'sendMail', null, get_lang('SendMailToUsers')); |
515 | 515 | $form->addButtonImport(get_lang('ImportSession')); |
516 | 516 | |
517 | -$defaults = array('sendMail' => 'true','file_type' => 'csv'); |
|
517 | +$defaults = array('sendMail' => 'true', 'file_type' => 'csv'); |
|
518 | 518 | $form->setDefaults($defaults); |
519 | 519 | |
520 | 520 | Display::display_normal_message(get_lang('TheXMLImportLetYouAddMoreInfoAndCreateResources')); |
@@ -36,15 +36,15 @@ discard block |
||
36 | 36 | sc.c_id ='".$courseId."'"; |
37 | 37 | $result = Database::query($sql); |
38 | 38 | |
39 | -if (!list($session_name,$course_title) = Database::fetch_row($result)) { |
|
39 | +if (!list($session_name, $course_title) = Database::fetch_row($result)) { |
|
40 | 40 | header('Location: session_course_list.php?id_session='.$id_session); |
41 | 41 | exit(); |
42 | 42 | } |
43 | 43 | |
44 | 44 | //$interbreadcrumb[]=array('url' => 'index.php',"name" => get_lang('PlatformAdmin')); |
45 | -$interbreadcrumb[]=array('url' => "session_list.php","name" => get_lang("SessionList")); |
|
46 | -$interbreadcrumb[]=array('url' => "resume_session.php?id_session=".$id_session,"name" => get_lang('SessionOverview')); |
|
47 | -$interbreadcrumb[]=array('url' => "session_course_list.php?id_session=$id_session","name" =>api_htmlentities($session_name, ENT_QUOTES, $charset)); |
|
45 | +$interbreadcrumb[] = array('url' => "session_list.php", "name" => get_lang("SessionList")); |
|
46 | +$interbreadcrumb[] = array('url' => "resume_session.php?id_session=".$id_session, "name" => get_lang('SessionOverview')); |
|
47 | +$interbreadcrumb[] = array('url' => "session_course_list.php?id_session=$id_session", "name" =>api_htmlentities($session_name, ENT_QUOTES, $charset)); |
|
48 | 48 | |
49 | 49 | $arr_infos = array(); |
50 | 50 | if (isset($_POST['formSent']) && $_POST['formSent']) { |
@@ -57,13 +57,13 @@ discard block |
||
57 | 57 | $rs_coaches = Database::query($sql); |
58 | 58 | |
59 | 59 | $coaches_course_session = array(); |
60 | - if (Database::num_rows($rs_coaches) > 0){ |
|
60 | + if (Database::num_rows($rs_coaches) > 0) { |
|
61 | 61 | while ($row_coaches = Database::fetch_row($rs_coaches)) { |
62 | 62 | $coaches_course_session[] = $row_coaches[0]; |
63 | 63 | } |
64 | 64 | } |
65 | 65 | |
66 | - $id_coaches= $_POST['id_coach']; |
|
66 | + $id_coaches = $_POST['id_coach']; |
|
67 | 67 | |
68 | 68 | if (is_array($id_coaches) && count($id_coaches) > 0) { |
69 | 69 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | } |
78 | 78 | |
79 | 79 | // set status to 0 other tutors from multiple list |
80 | - $array_intersect = array_diff($coaches_course_session,$id_coaches); |
|
80 | + $array_intersect = array_diff($coaches_course_session, $id_coaches); |
|
81 | 81 | |
82 | 82 | foreach ($array_intersect as $no_coach_user_id) { |
83 | 83 | $rs2 = SessionManager::set_coach_to_course_session( |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname, username' : ' ORDER BY lastname, firstname, username'; |
111 | 111 | |
112 | 112 | if (api_is_multiple_url_enabled()) { |
113 | - $tbl_access_rel_user= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
|
113 | + $tbl_access_rel_user = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
|
114 | 114 | $access_url_id = api_get_current_access_url_id(); |
115 | 115 | $sql = "SELECT u.user_id,lastname,firstname,username |
116 | 116 | FROM $tbl_user u |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | <div class="col-md-12"> |
153 | 153 | <div class="title"></div> |
154 | 154 | <?php |
155 | - if(!empty($errorMsg)) { |
|
155 | + if (!empty($errorMsg)) { |
|
156 | 156 | Display::display_normal_message($errorMsg); |
157 | 157 | } |
158 | 158 | ?> |
@@ -166,13 +166,13 @@ discard block |
||
166 | 166 | |
167 | 167 | <select name="id_coach[]" class="form-control" multiple> |
168 | 168 | <option value="0">----- <?php echo get_lang("Choose") ?> -----</option> |
169 | - <option value="0" <?php if(count($arr_infos) == 0) echo 'selected="selected"'; ?>> |
|
169 | + <option value="0" <?php if (count($arr_infos) == 0) echo 'selected="selected"'; ?>> |
|
170 | 170 | <?php echo get_lang('None') ?> |
171 | 171 | </option> |
172 | 172 | <?php |
173 | 173 | foreach ($coaches as $enreg) { |
174 | 174 | ?> |
175 | - <option value="<?php echo $enreg['user_id']; ?>" <?php if(((is_array($arr_infos) && in_array($enreg['user_id'], $arr_infos)))) echo 'selected="selected"'; ?>> |
|
175 | + <option value="<?php echo $enreg['user_id']; ?>" <?php if (((is_array($arr_infos) && in_array($enreg['user_id'], $arr_infos)))) echo 'selected="selected"'; ?>> |
|
176 | 176 | <?php echo api_get_person_name($enreg['firstname'], $enreg['lastname']).' ('.$enreg['username'].')'; ?> |
177 | 177 | </option> |
178 | 178 | <?php |