@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | // bypass the $nametools thing and use <b></b> tags in the $interbreadcrump array |
40 | 40 | $url = 'slideshowoptions.php?curdirpath='.$pathurl; |
41 | 41 | $originaltoolname = '<b>'.get_lang('SlideshowOptions').'</b>'; |
42 | -$interbreadcrumb[] = array('url' => $url, 'name' => $originaltoolname ); |
|
42 | +$interbreadcrumb[] = array('url' => $url, 'name' => $originaltoolname); |
|
43 | 43 | |
44 | 44 | Display::display_header($originalToolName, 'Doc'); |
45 | 45 | $image_resizing = isset($_SESSION['image_resizing']) ? $_SESSION['image_resizing'] : null; |
@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | </script> |
64 | 64 | |
65 | 65 | <?php |
66 | -$actions = '<a href="document.php?action=exit_slideshow&curdirpath='.$pathurl.'">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
67 | -$actions .= '<a href="slideshow.php?curdirpath='.$pathurl.'">'.Display::return_icon('slideshow.png',get_lang('BackTo').' '.get_lang('SlideShow'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
66 | +$actions = '<a href="document.php?action=exit_slideshow&curdirpath='.$pathurl.'">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
67 | +$actions .= '<a href="slideshow.php?curdirpath='.$pathurl.'">'.Display::return_icon('slideshow.png', get_lang('BackTo').' '.get_lang('SlideShow'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
68 | 68 | Display::toolbarAction('toolbar-slideshow', $content) |
69 | 69 | ?> |
70 | 70 | <div class="panel panel-default"> |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | } |
80 | 80 | ?>> |
81 | 81 | </label> |
82 | - <?php echo '<b>'. get_lang('NoResizing') . '</b>, ' . get_lang('NoResizingComment') ;?> |
|
82 | + <?php echo '<b>'.get_lang('NoResizing').'</b>, '.get_lang('NoResizingComment'); ?> |
|
83 | 83 | </div> |
84 | 84 | <div class="radio"> |
85 | 85 | <label> |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | } |
90 | 90 | ?>> |
91 | 91 | </label> |
92 | - <?php echo '<b>'. get_lang('ResizingAuto') . '</b>, ' . get_lang('ResizingAutoComment');?> |
|
92 | + <?php echo '<b>'.get_lang('ResizingAuto').'</b>, '.get_lang('ResizingAutoComment'); ?> |
|
93 | 93 | </div> |
94 | 94 | <div class="radio"> |
95 | 95 | <label> |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | } |
102 | 102 | ?>> |
103 | 103 | </label> |
104 | - <?php echo '<b>'. get_lang('Resizing') . '</b>, ' . get_lang('ResizingComment'); ?> |
|
104 | + <?php echo '<b>'.get_lang('Resizing').'</b>, '.get_lang('ResizingComment'); ?> |
|
105 | 105 | </div> |
106 | 106 | <div class="form-group"> |
107 | 107 | <label class="col-sm-1 control-label"><?php echo get_lang('Width'); ?></label> |
@@ -23,13 +23,13 @@ |
||
23 | 23 | unset($_SESSION['whereami']); |
24 | 24 | unset($_SESSION['temp_realpath_image']); |
25 | 25 | |
26 | -if (!isset($_SESSION['exit_pixlr'])){ |
|
27 | - $location=api_get_path(WEB_CODE_PATH).'document/document.php'; |
|
26 | +if (!isset($_SESSION['exit_pixlr'])) { |
|
27 | + $location = api_get_path(WEB_CODE_PATH).'document/document.php'; |
|
28 | 28 | echo '<script>window.parent.location.href="'.$location.'"</script>'; |
29 | 29 | api_not_allowed(true); |
30 | 30 | } else { |
31 | 31 | echo '<div align="center" style="padding-top:150; font-family:Arial, Helvetica, Sans-serif;font-size:25px;color:#aaa;font-weight:bold;">'.get_lang('PleaseStandBy').'</div>'; |
32 | - $location=api_get_path(WEB_CODE_PATH).'document/document.php?id='.Security::remove_XSS($_SESSION['exit_pixlr']); |
|
32 | + $location = api_get_path(WEB_CODE_PATH).'document/document.php?id='.Security::remove_XSS($_SESSION['exit_pixlr']); |
|
33 | 33 | echo '<script>window.parent.location.href="'.$location.'"</script>'; |
34 | 34 | unset($_SESSION['exit_pixlr']); |
35 | 35 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | function resize_image($image, $target_width, $target_height, $slideshow = 0) { |
37 | 37 | // Modifications by Ivan Tcholakov, 04-MAY-2009. |
38 | 38 | $result = array(); |
39 | - if ( (isset($_SESSION['image_resizing']) && $_SESSION['image_resizing']== 'resizing') or $slideshow == 1) { |
|
39 | + if ((isset($_SESSION['image_resizing']) && $_SESSION['image_resizing'] == 'resizing') or $slideshow == 1) { |
|
40 | 40 | $new_sizes = api_resize_image($image, $target_width, $target_height); |
41 | 41 | $result[] = $new_sizes['height']; |
42 | 42 | $result[] = $new_sizes['width']; |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | $session = array(); |
33 | 33 | $user_name = $user_info['complete_name']; |
34 | 34 | |
35 | -$course_list = SessionManager::get_course_list_by_session_id ($session_id); |
|
35 | +$course_list = SessionManager::get_course_list_by_session_id($session_id); |
|
36 | 36 | $session_list = SessionManager::get_session_by_course($course_id); |
37 | 37 | $total_quota_bytes = DocumentManager::get_course_quota(); |
38 | -$quota_bytes = DocumentManager::documents_total_space($course_id, 0 , 0); |
|
39 | -$quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
38 | +$quota_bytes = DocumentManager::documents_total_space($course_id, 0, 0); |
|
39 | +$quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
40 | 40 | |
41 | 41 | $session[] = array(get_lang('Course').' ('.format_file_size($quota_bytes).')', $quota_percentage); |
42 | 42 | |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | foreach ($session_list as $session_data) { |
47 | 47 | $quota_percentage = 0; |
48 | 48 | $quota_bytes = intval(DocumentManager::documents_total_space($course_id, null, $session_data['id'])); |
49 | - if (!empty($quota_bytes)) { |
|
50 | - $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
49 | + if (!empty($quota_bytes)) { |
|
50 | + $quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
51 | 51 | } |
52 | 52 | if ($session_id == $session_data['id']) { |
53 | - $session_data['name'] = $session_data['name'] . ' * '; |
|
53 | + $session_data['name'] = $session_data['name'].' * '; |
|
54 | 54 | } |
55 | 55 | $used_quota_bytes += $quota_bytes; |
56 | 56 | $session[] = array( |
@@ -66,11 +66,11 @@ discard block |
||
66 | 66 | $quota_percentage = 0; |
67 | 67 | $my_group_id = $group_data['id']; |
68 | 68 | $quota_bytes = intval(DocumentManager::documents_total_space($course_id, $my_group_id, 0)); |
69 | - if (!empty($quota_bytes)) { |
|
70 | - $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
69 | + if (!empty($quota_bytes)) { |
|
70 | + $quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
71 | 71 | } |
72 | 72 | if ($group_id == $my_group_id) { |
73 | - $group_data['name'] = $group_data['name'] . ' * '; |
|
73 | + $group_data['name'] = $group_data['name'].' * '; |
|
74 | 74 | } |
75 | 75 | $used_quota_bytes += $quota_bytes; |
76 | 76 | $session[] = array(addslashes(get_lang('Group').': '.$group_data['name']).' ('.format_file_size($quota_bytes).')', $quota_percentage); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } |
86 | 86 | } |
87 | 87 | if ($quota_bytes != 0) { |
88 | - $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
88 | + $quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | $session[] = array(addslashes(get_lang('Teacher').': '.$user_name).' ('.format_file_size($quota_bytes).')', $quota_percentage); |
@@ -98,15 +98,15 @@ discard block |
||
98 | 98 | $total_quota_bytes += DocumentManager::get_course_quota($course_data['id']); |
99 | 99 | } |
100 | 100 | if ($quota_bytes != 0) { |
101 | - $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
101 | + $quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
102 | 102 | } |
103 | 103 | } |
104 | - $session[] = array(addslashes(sprintf(get_lang('TeacherXInSession'),$user_name)), $quota_percentage); |
|
104 | + $session[] = array(addslashes(sprintf(get_lang('TeacherXInSession'), $user_name)), $quota_percentage); |
|
105 | 105 | |
106 | 106 | } |
107 | 107 | } |
108 | 108 | |
109 | -$quota_percentage = round(($total_quota_bytes - $used_quota_bytes)/$total_quota_bytes, 2)*100; |
|
109 | +$quota_percentage = round(($total_quota_bytes - $used_quota_bytes) / $total_quota_bytes, 2) * 100; |
|
110 | 110 | $session[] = array(addslashes(get_lang('ShowCourseQuotaUse')).' ('.format_file_size($total_quota_bytes - $used_quota_bytes).') ', $quota_percentage); |
111 | 111 | $quota_data = json_encode($session); |
112 | 112 |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | <!-- Actions: The menu with the different options in cathe course management --> |
18 | 18 | <div id="actions" class="actions"> |
19 | 19 | <?php if ($action != 'createcoursecategory') { ?> |
20 | - <a href="<?php echo api_get_self(); ?>?action=createcoursecategory"><?php echo Display::return_icon('new_folder.png', get_lang('CreateCourseCategory'),'','32'); ?></a> |
|
20 | + <a href="<?php echo api_get_self(); ?>?action=createcoursecategory"><?php echo Display::return_icon('new_folder.png', get_lang('CreateCourseCategory'), '', '32'); ?></a> |
|
21 | 21 | <?php } ?> |
22 | 22 | </div> |
23 | 23 | |
@@ -49,26 +49,26 @@ discard block |
||
49 | 49 | $max_category_key = count($user_course_categories); |
50 | 50 | if ($action != 'unsubscribe') { ?> |
51 | 51 | <a href="courses.php?action=sortmycourses&categoryid=<?php echo $row['id']; ?>&sec_token=<?php echo $stok; ?>#category<?php echo $row['id']; ?>"> |
52 | - <?php echo Display::display_icon('edit.png', get_lang('Edit'),'',22); ?> |
|
52 | + <?php echo Display::display_icon('edit.png', get_lang('Edit'), '', 22); ?> |
|
53 | 53 | </a> |
54 | 54 | |
55 | 55 | <?php if ($row['id'] != $user_course_categories[0]['id']) { ?> |
56 | 56 | <a href="courses.php?action=<?php echo $action ?>&move=up&category=<?php echo $row['id']; ?>&sec_token=<?php echo $stok; ?>"> |
57 | - <?php echo Display::return_icon('up.png', get_lang('Up'),'',22); ?> |
|
57 | + <?php echo Display::return_icon('up.png', get_lang('Up'), '', 22); ?> |
|
58 | 58 | </a> |
59 | 59 | <?php } else { ?> |
60 | - <?php echo Display::return_icon('up_na.png', get_lang('Up'),'',22); ?> |
|
60 | + <?php echo Display::return_icon('up_na.png', get_lang('Up'), '', 22); ?> |
|
61 | 61 | <?php } ?> |
62 | 62 | |
63 | 63 | <?php if ($row['id'] != $user_course_categories[$max_category_key - 1]['id']) { ?> |
64 | 64 | <a href="courses.php?action=<?php echo $action; ?>&move=down&category=<?php echo $row['id']; ?>&sec_token=<?php echo $stok; ?>"> |
65 | - <?php echo Display::return_icon('down.png', get_lang('Down'),'',22); ?> |
|
65 | + <?php echo Display::return_icon('down.png', get_lang('Down'), '', 22); ?> |
|
66 | 66 | </a> |
67 | 67 | <?php } else { ?> |
68 | - <?php echo Display::return_icon('down_na.png', get_lang('Down'),'',22); ?> |
|
68 | + <?php echo Display::return_icon('down_na.png', get_lang('Down'), '', 22); ?> |
|
69 | 69 | <?php } ?> |
70 | 70 | <a href="courses.php?action=deletecoursecategory&id=<?php echo $row['id']; ?>&sec_token=<?php echo $stok; ?>"> |
71 | - <?php echo Display::display_icon('delete.png', get_lang('Delete'), array('onclick' => "javascript: if (!confirm('".addslashes(api_htmlentities(get_lang("CourseCategoryAbout2bedeleted"), ENT_QUOTES, api_get_system_encoding()))."')) return false;"),22) ?> |
|
71 | + <?php echo Display::display_icon('delete.png', get_lang('Delete'), array('onclick' => "javascript: if (!confirm('".addslashes(api_htmlentities(get_lang("CourseCategoryAbout2bedeleted"), ENT_QUOTES, api_get_system_encoding()))."')) return false;"), 22) ?> |
|
72 | 72 | </a> |
73 | 73 | <?php } |
74 | 74 | echo '<br /><br />'; |
@@ -122,35 +122,35 @@ discard block |
||
122 | 122 | <div style="float:left;width:110px;"> |
123 | 123 | <?php |
124 | 124 | if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') { |
125 | - $icon_title = get_lang('CourseDetails') . ' - ' . $course['title']; |
|
125 | + $icon_title = get_lang('CourseDetails').' - '.$course['title']; |
|
126 | 126 | ?> |
127 | 127 | <a href="<?php echo api_get_path(WEB_CODE_PATH); ?>inc/ajax/course_home.ajax.php?a=show_course_information&code=<?php echo $course['code'] ?>" data-title="<?php echo $icon_title ?>" title="<?php echo $icon_title ?>" class="ajax"> |
128 | - <?php echo Display::return_icon('info.png', $icon_title,'','22') ?> |
|
128 | + <?php echo Display::return_icon('info.png', $icon_title, '', '22') ?> |
|
129 | 129 | <?php } ?> |
130 | 130 | </a> |
131 | 131 | |
132 | 132 | <?php if (isset($_GET['edit']) && $course['code'] == $_GET['edit']) { ?> |
133 | - <?php echo Display::display_icon('edit_na.png', get_lang('Edit'),'',22); ?> |
|
133 | + <?php echo Display::display_icon('edit_na.png', get_lang('Edit'), '', 22); ?> |
|
134 | 134 | <?php } else { ?> |
135 | 135 | <a href="courses.php?action=<?php echo $action; ?>&edit=<?php echo $course['code']; ?>&sec_token=<?php echo $stok; ?>"> |
136 | - <?php echo Display::display_icon('edit.png', get_lang('Edit'),'',22); ?> |
|
136 | + <?php echo Display::display_icon('edit.png', get_lang('Edit'), '', 22); ?> |
|
137 | 137 | </a> |
138 | 138 | <?php } ?> |
139 | 139 | |
140 | 140 | <?php if ($key > 0) { ?> |
141 | 141 | <a href="courses.php?action=<?php echo $action; ?>&move=up&course=<?php echo $course['code']; ?>&category=<?php echo $course['user_course_cat']; ?>&sec_token=<?php echo $stok; ?>"> |
142 | - <?php echo Display::display_icon('up.png', get_lang('Up'),'',22); ?> |
|
142 | + <?php echo Display::display_icon('up.png', get_lang('Up'), '', 22); ?> |
|
143 | 143 | </a> |
144 | 144 | <?php } else { ?> |
145 | - <?php echo Display::display_icon('up_na.png', get_lang('Up'),'',22); ?> |
|
145 | + <?php echo Display::display_icon('up_na.png', get_lang('Up'), '', 22); ?> |
|
146 | 146 | <?php } ?> |
147 | 147 | |
148 | 148 | <?php if ($key < $number_of_courses - 1) { ?> |
149 | 149 | <a href="courses.php?action=<?php echo $action; ?>&move=down&course=<?php echo $course['code']; ?>&category=<?php echo $course['user_course_cat']; ?>&sec_token=<?php echo $stok; ?>"> |
150 | - <?php echo Display::display_icon('down.png', get_lang('Down'),'',22); ?> |
|
150 | + <?php echo Display::display_icon('down.png', get_lang('Down'), '', 22); ?> |
|
151 | 151 | </a> |
152 | 152 | <?php } else { ?> |
153 | - <?php echo Display::display_icon('down_na.png', get_lang('Down'),'',22); ?> |
|
153 | + <?php echo Display::display_icon('down_na.png', get_lang('Down'), '', 22); ?> |
|
154 | 154 | <?php } ?> |
155 | 155 | |
156 | 156 | </div> |
@@ -221,36 +221,36 @@ discard block |
||
221 | 221 | <div style="float:left; width:110px"> |
222 | 222 | <?php |
223 | 223 | if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') { |
224 | - $icon_title = get_lang('CourseDetails') . ' - ' . $course['title']; |
|
224 | + $icon_title = get_lang('CourseDetails').' - '.$course['title']; |
|
225 | 225 | ?> |
226 | 226 | <a href="<?php echo api_get_path(WEB_CODE_PATH); ?>inc/ajax/course_home.ajax.php?a=show_course_information&code=<?php echo $course['code'] ?>" data-title="<?php echo $icon_title ?>" title="<?php echo $icon_title ?>" class="ajax"> |
227 | - <?php echo Display::return_icon('info.png', $icon_title, '','22'); ?> |
|
227 | + <?php echo Display::return_icon('info.png', $icon_title, '', '22'); ?> |
|
228 | 228 | </a> |
229 | 229 | <?php } ?> |
230 | 230 | |
231 | 231 | <?php if (isset($_GET['edit']) && $course['code'] == $_GET['edit']) { ?> |
232 | - <?php echo Display::display_icon('edit_na.png', get_lang('Edit'),'',22); ?> |
|
232 | + <?php echo Display::display_icon('edit_na.png', get_lang('Edit'), '', 22); ?> |
|
233 | 233 | <?php } else { ?> |
234 | 234 | <a href="courses.php?action=<?php echo $action; ?>&edit=<?php echo $course['code']; ?>&sec_token=<?php echo $stok; ?>"> |
235 | - <?php echo Display::display_icon('edit.png', get_lang('Edit'),'',22); ?> |
|
235 | + <?php echo Display::display_icon('edit.png', get_lang('Edit'), '', 22); ?> |
|
236 | 236 | </a> |
237 | 237 | <?php } ?> |
238 | 238 | |
239 | 239 | <!-- up /down icons--> |
240 | 240 | <?php if ($key > 0) { ?> |
241 | 241 | <a href="courses.php?action=<?php echo $action; ?>&move=up&course=<?php echo $course['code']; ?>&category=<?php echo $course['user_course_cat']; ?>&sec_token=<?php echo $stok; ?>"> |
242 | - <?php echo Display::display_icon('up.png', get_lang('Up'),'',22) ?> |
|
242 | + <?php echo Display::display_icon('up.png', get_lang('Up'), '', 22) ?> |
|
243 | 243 | </a> |
244 | 244 | <?php } else { |
245 | - echo Display::display_icon('up_na.png', get_lang('Up'),'',22); |
|
245 | + echo Display::display_icon('up_na.png', get_lang('Up'), '', 22); |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | if ($key < $number_of_courses - 1) { ?> |
249 | 249 | <a href="courses.php?action=<?php echo $action; ?>&move=down&course=<?php echo $course['code']; ?>&category=<?php echo $course['user_course_cat']; ?>&sec_token=<?php echo $stok; ?>"> |
250 | - <?php echo Display::display_icon('down.png', get_lang('Down'),'',22); ?> |
|
250 | + <?php echo Display::display_icon('down.png', get_lang('Down'), '', 22); ?> |
|
251 | 251 | </a> |
252 | 252 | <?php } else { |
253 | - echo Display::display_icon('down_na.png', get_lang('Down'),'',22); |
|
253 | + echo Display::display_icon('down_na.png', get_lang('Down'), '', 22); |
|
254 | 254 | }?> |
255 | 255 | </div> |
256 | 256 | <div style="float:left; margin-right:10px;"> |
@@ -16,7 +16,7 @@ |
||
16 | 16 | <!-- Actions: The menu with the different options in cathe course management --> |
17 | 17 | <div id="actions" class="actions"> |
18 | 18 | <a href="<?php echo api_get_self() ?>?action=sortmycourses"> |
19 | - <?php echo Display::return_icon('back.png', get_lang('Back'),'','32'); ?> |
|
19 | + <?php echo Display::return_icon('back.png', get_lang('Back'), '', '32'); ?> |
|
20 | 20 | </a> |
21 | 21 | </div> |
22 | 22 |
@@ -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); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | // Group members |
163 | 163 | $group_member_list = GroupManager::get_subscribed_users($current_group['id']); |
164 | 164 | |
165 | -$selected_users = array (); |
|
165 | +$selected_users = array(); |
|
166 | 166 | if (!empty($group_member_list)) { |
167 | 167 | foreach ($group_member_list as $index => $user) { |
168 | 168 | $selected_users[] = $user['user_id']; |
@@ -201,20 +201,20 @@ discard block |
||
201 | 201 | $plan_html = null; |
202 | 202 | if (!empty($data)) { |
203 | 203 | foreach ($data as $plan) { |
204 | - $plan_html .= '<strong>' . $plan['title'] . '</strong><br /> ' . $plan['description'] . '<br />'; |
|
204 | + $plan_html .= '<strong>'.$plan['title'].'</strong><br /> '.$plan['description'].'<br />'; |
|
205 | 205 | } |
206 | 206 | } |
207 | 207 | $data = $thematic->get_thematic_advance_by_thematic_id($theme['id']); |
208 | 208 | $advance_html = null; |
209 | 209 | if (!empty($data)) { |
210 | 210 | foreach ($data as $advance) { |
211 | - $advance_html .= api_convert_and_format_date($advance['start_date'], DATE_FORMAT_LONG) . ' ('.$advance['duration'].' '.get_lang('HourShort').')<br />'.$advance['content'].'<br />'; |
|
211 | + $advance_html .= api_convert_and_format_date($advance['start_date'], DATE_FORMAT_LONG).' ('.$advance['duration'].' '.get_lang('HourShort').')<br />'.$advance['content'].'<br />'; |
|
212 | 212 | } |
213 | 213 | } |
214 | 214 | $table[] = array($theme['title'], $plan_html, $advance_html); |
215 | 215 | } |
216 | 216 | $params = array( |
217 | - 'filename' => get_lang('Thematic') . '-' . api_get_local_time(), |
|
217 | + 'filename' => get_lang('Thematic').'-'.api_get_local_time(), |
|
218 | 218 | 'pdf_title' => get_lang('Thematic'), |
219 | 219 | 'add_signatures' => true, |
220 | 220 | 'format' => 'A4-L', |
@@ -311,9 +311,9 @@ discard block |
||
311 | 311 | unset($_SESSION['thematic_plan_token']); |
312 | 312 | $data['message'] = 'ok'; |
313 | 313 | |
314 | - $saveRedirect = api_get_path(WEB_PATH) . 'main/course_progress/index.php?'; |
|
315 | - $saveRedirect.= api_get_cidreq() . '&'; |
|
316 | - $saveRedirect.= 'thematic_plan_save_message=ok'; |
|
314 | + $saveRedirect = api_get_path(WEB_PATH).'main/course_progress/index.php?'; |
|
315 | + $saveRedirect .= api_get_cidreq().'&'; |
|
316 | + $saveRedirect .= 'thematic_plan_save_message=ok'; |
|
317 | 317 | |
318 | 318 | header("Location: $saveRedirect"); |
319 | 319 | exit; |
@@ -23,25 +23,25 @@ discard block |
||
23 | 23 | case 'thematic_add' : |
24 | 24 | case 'thematic_import_select' : |
25 | 25 | echo '<a href="index.php?'.api_get_cidreq().'">'. |
26 | - Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('ThematicDetails'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
26 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('ThematicDetails'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
27 | 27 | break; |
28 | 28 | case 'thematic_list' : |
29 | 29 | echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_add'.$url_token.'">'. |
30 | - Display::return_icon('new_course_progress.png',get_lang('NewThematicSection'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
30 | + Display::return_icon('new_course_progress.png', get_lang('NewThematicSection'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
31 | 31 | break; |
32 | 32 | case 'thematic_details' : |
33 | 33 | echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_add'.$url_token.'">'. |
34 | - Display::return_icon('new_course_progress.png',get_lang('NewThematicSection'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
34 | + Display::return_icon('new_course_progress.png', get_lang('NewThematicSection'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
35 | 35 | echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_import_select'.$url_token.'">'. |
36 | - Display::return_icon('import_csv.png',get_lang('ImportThematic'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
36 | + Display::return_icon('import_csv.png', get_lang('ImportThematic'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
37 | 37 | echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_export'.$url_token.'">'. |
38 | - Display::return_icon('export_csv.png',get_lang('ExportThematic'),'', ICON_SIZE_MEDIUM).'</a>'; |
|
38 | + Display::return_icon('export_csv.png', get_lang('ExportThematic'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
39 | 39 | echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_export_pdf'.$url_token.'">'. |
40 | - Display::return_icon('pdf.png',get_lang('ExportToPDF'),'', ICON_SIZE_MEDIUM).'</a>'; |
|
40 | + Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
41 | 41 | break; |
42 | 42 | default : |
43 | 43 | echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_add'.$url_token.'">'. |
44 | - Display::return_icon('new_course_progress.png',get_lang('NewThematicSection'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
44 | + Display::return_icon('new_course_progress.png', get_lang('NewThematicSection'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
45 | 45 | } |
46 | 46 | echo '</div>'; |
47 | 47 | } |
@@ -57,10 +57,10 @@ discard block |
||
57 | 57 | $parameters['action'] = $action; |
58 | 58 | $table->set_additional_parameters($parameters); |
59 | 59 | $table->set_header(0, '', false, array('style'=>'width:20px;')); |
60 | - $table->set_header(1, get_lang('Title'), false ); |
|
60 | + $table->set_header(1, get_lang('Title'), false); |
|
61 | 61 | if (api_is_allowed_to_edit(null, true)) { |
62 | - $table->set_header(2, get_lang('Actions'), false,array('style'=>'text-align:center;width:40%;')); |
|
63 | - $table->set_form_actions(array ('thematic_delete_select' => get_lang('DeleteAllThematics'))); |
|
62 | + $table->set_header(2, get_lang('Actions'), false, array('style'=>'text-align:center;width:40%;')); |
|
63 | + $table->set_form_actions(array('thematic_delete_select' => get_lang('DeleteAllThematics'))); |
|
64 | 64 | } |
65 | 65 | $table->display(); |
66 | 66 | |
@@ -72,11 +72,11 @@ discard block |
||
72 | 72 | |
73 | 73 | if (isset($last_id) && $last_id) { |
74 | 74 | $link_to_thematic_plan = '<a href="index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$last_id.'">'. |
75 | - Display::return_icon('lesson_plan.png', get_lang('ThematicPlan'), array('style'=>'vertical-align:middle;float:none;'),ICON_SIZE_SMALL).'</a>'; |
|
75 | + Display::return_icon('lesson_plan.png', get_lang('ThematicPlan'), array('style'=>'vertical-align:middle;float:none;'), ICON_SIZE_SMALL).'</a>'; |
|
76 | 76 | $link_to_thematic_advance = '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$last_id.'">'. |
77 | - Display::return_icon('lesson_plan_calendar.png', get_lang('ThematicAdvance'), array('style'=>'vertical-align:middle;float:none;'),ICON_SIZE_SMALL).'</a>'; |
|
77 | + Display::return_icon('lesson_plan_calendar.png', get_lang('ThematicAdvance'), array('style'=>'vertical-align:middle;float:none;'), ICON_SIZE_SMALL).'</a>'; |
|
78 | 78 | Display::display_confirmation_message( |
79 | - get_lang('ThematicSectionHasBeenCreatedSuccessfull').'<br />'.sprintf(get_lang('NowYouShouldAddThematicPlanXAndThematicAdvanceX'),$link_to_thematic_plan, $link_to_thematic_advance), |
|
79 | + get_lang('ThematicSectionHasBeenCreatedSuccessfull').'<br />'.sprintf(get_lang('NowYouShouldAddThematicPlanXAndThematicAdvanceX'), $link_to_thematic_plan, $link_to_thematic_advance), |
|
80 | 80 | false |
81 | 81 | ); |
82 | 82 | } |
@@ -113,27 +113,27 @@ discard block |
||
113 | 113 | $actions_first_col = ''; |
114 | 114 | if (api_is_allowed_to_edit(null, true)) { |
115 | 115 | // Thematic title |
116 | - $actions_first_col = Display::url( |
|
116 | + $actions_first_col = Display::url( |
|
117 | 117 | Display::return_icon('cd.gif', get_lang('Copy')), |
118 | 118 | 'index.php?'.api_get_cidreq().'&action=thematic_copy&thematic_id='.$my_thematic_id.$params.$url_token |
119 | 119 | ); |
120 | - if (api_get_session_id() == 0 ) { |
|
120 | + if (api_get_session_id() == 0) { |
|
121 | 121 | |
122 | 122 | if ($thematic['display_order'] > 1) { |
123 | - $actions_first_col .= ' <a href="'.api_get_self().'?action=moveup&'.api_get_cidreq().'&thematic_id='.$my_thematic_id.$params.$url_token.'">'.Display::return_icon('up.png', get_lang('Up'),'',ICON_SIZE_SMALL).'</a>'; |
|
123 | + $actions_first_col .= ' <a href="'.api_get_self().'?action=moveup&'.api_get_cidreq().'&thematic_id='.$my_thematic_id.$params.$url_token.'">'.Display::return_icon('up.png', get_lang('Up'), '', ICON_SIZE_SMALL).'</a>'; |
|
124 | 124 | } else { |
125 | - $actions_first_col .= ' '.Display::return_icon('up_na.png',' ','',ICON_SIZE_SMALL); |
|
125 | + $actions_first_col .= ' '.Display::return_icon('up_na.png', ' ', '', ICON_SIZE_SMALL); |
|
126 | 126 | } |
127 | 127 | if (isset($thematic['max_thematic_item']) && $thematic['display_order'] < $thematic['max_thematic_item']) { |
128 | - $actions_first_col .= ' <a href="'.api_get_self().'?action=movedown&a'.api_get_cidreq().'&thematic_id='.$my_thematic_id.$params.$url_token.'">'.Display::return_icon('down.png',get_lang('Down'),'',ICON_SIZE_SMALL).'</a>'; |
|
128 | + $actions_first_col .= ' <a href="'.api_get_self().'?action=movedown&a'.api_get_cidreq().'&thematic_id='.$my_thematic_id.$params.$url_token.'">'.Display::return_icon('down.png', get_lang('Down'), '', ICON_SIZE_SMALL).'</a>'; |
|
129 | 129 | } else { |
130 | - $actions_first_col .= ' '.Display::return_icon('down_na.png',' ','',ICON_SIZE_SMALL); |
|
130 | + $actions_first_col .= ' '.Display::return_icon('down_na.png', ' ', '', ICON_SIZE_SMALL); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | } |
134 | 134 | if (api_get_session_id() == $thematic['session_id']) { |
135 | - $actions_first_col .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_edit&thematic_id='.$my_thematic_id.$params.$url_token.'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'; |
|
136 | - $actions_first_col .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_delete&thematic_id='.$my_thematic_id.$params.$url_token.'">'.Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
135 | + $actions_first_col .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_edit&thematic_id='.$my_thematic_id.$params.$url_token.'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'; |
|
136 | + $actions_first_col .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_delete&thematic_id='.$my_thematic_id.$params.$url_token.'">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'; |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | $actions_first_col = Display::div($actions_first_col, array('id'=>'thematic_id_content_'.$thematic['id'], 'class'=>'thematic_tools')); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | //if (api_is_allowed_to_edit(null, true) && api_get_session_id() == $thematic['session_id']) { |
150 | 150 | if (api_is_allowed_to_edit(null, true)) { |
151 | 151 | echo '<div style="text-align:right"><a href="index.php?'.api_get_cidreq().'&origin=thematic_details&action=thematic_plan_list&thematic_id='.$thematic['id'].'&width=700&height=500">'. |
152 | - Display::return_icon('edit.png', get_lang('EditThematicPlan'), array('style'=>'vertical-align:middle'),ICON_SIZE_MEDIUM).'</a></div><br />'; |
|
152 | + Display::return_icon('edit.png', get_lang('EditThematicPlan'), array('style'=>'vertical-align:middle'), ICON_SIZE_MEDIUM).'</a></div><br />'; |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | if (empty($thematic_plan_div[$thematic['id']])) { |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | //if (api_is_allowed_to_edit(null, true) && api_get_session_id() == $thematic['session_id']) { |
166 | 166 | if (api_is_allowed_to_edit(null, true)) { |
167 | 167 | echo '<div style="text-align:right"><a href="index.php?'.api_get_cidreq().'&action=thematic_advance_add&thematic_id='.$thematic['id'].'">'. |
168 | - Display::return_icon('add.png',get_lang('NewThematicAdvance'),'',ICON_SIZE_MEDIUM).'</a></div>'; |
|
168 | + Display::return_icon('add.png', get_lang('NewThematicAdvance'), '', ICON_SIZE_MEDIUM).'</a></div>'; |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | //if (api_is_allowed_to_edit(null, true) && api_get_session_id() == $thematic['session_id']) { |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | [], |
188 | 188 | ICON_SIZE_SMALL |
189 | 189 | ), |
190 | - 'index.php?' . api_get_cidreq() . '&' . http_build_query([ |
|
190 | + 'index.php?'.api_get_cidreq().'&'.http_build_query([ |
|
191 | 191 | 'action' => 'thematic_advance_edit', |
192 | 192 | 'thematic_id' => $thematic['id'], |
193 | 193 | 'thematic_advance_id' => $thematic_advance['id'], |
@@ -198,17 +198,17 @@ discard block |
||
198 | 198 | 'data-title' => get_lang('EditThematicAdvance') |
199 | 199 | ] |
200 | 200 | ); |
201 | - $edit_link .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_advance_delete&thematic_id='.$thematic['id'].'&thematic_advance_id='.$thematic_advance['id'].'">'. |
|
202 | - Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a></center>'; |
|
201 | + $edit_link .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_advance_delete&thematic_id='.$thematic['id'].'&thematic_advance_id='.$thematic_advance['id'].'">'. |
|
202 | + Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a></center>'; |
|
203 | 203 | |
204 | 204 | //Links |
205 | 205 | $edit_link = Display::div( |
206 | - Display::div($edit_link , array('id'=>'thematic_advance_tools_'.$thematic_advance['id'], 'class'=>'thematic_advance_actions')), |
|
206 | + Display::div($edit_link, array('id'=>'thematic_advance_tools_'.$thematic_advance['id'], 'class'=>'thematic_advance_actions')), |
|
207 | 207 | array('style'=>'height:20px;') |
208 | 208 | ); |
209 | 209 | } |
210 | 210 | |
211 | - $thematic_advance_item = isset($thematic_advance_div[$thematic['id']][$thematic_advance['id']]) ? $thematic_advance_div[$thematic['id']][$thematic_advance['id']] : null; |
|
211 | + $thematic_advance_item = isset($thematic_advance_div[$thematic['id']][$thematic_advance['id']]) ? $thematic_advance_div[$thematic['id']][$thematic_advance['id']] : null; |
|
212 | 212 | echo Display::div($thematic_advance_item, array('id'=>'thematic_advance_'.$thematic_advance['id'])); |
213 | 213 | echo $edit_link; |
214 | 214 | echo '</td>'; |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | } elseif ($action == 'thematic_add' || $action == 'thematic_edit') { |
254 | 254 | |
255 | 255 | // Display form |
256 | - $form = new FormValidator('thematic_add','POST','index.php?action=thematic_add&'.api_get_cidreq()); |
|
256 | + $form = new FormValidator('thematic_add', 'POST', 'index.php?action=thematic_add&'.api_get_cidreq()); |
|
257 | 257 | |
258 | 258 | if ($action == 'thematic_edit') { |
259 | 259 | $form->addElement('header', '', get_lang('EditThematicSection')); |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | $form->addElement('hidden', 'action', $action); |
264 | 264 | |
265 | 265 | if (!empty($thematic_id)) { |
266 | - $form->addElement('hidden', 'thematic_id',$thematic_id); |
|
266 | + $form->addElement('hidden', 'thematic_id', $thematic_id); |
|
267 | 267 | } |
268 | 268 | |
269 | 269 | $form->addText('title', get_lang('Title'), true, array('size'=>'50')); |
@@ -275,8 +275,8 @@ discard block |
||
275 | 275 | if (!empty($thematic_data)) { |
276 | 276 | if (api_get_session_id()) { |
277 | 277 | if ($thematic_data['session_id'] != api_get_session_id()) { |
278 | - $show_form = false; |
|
279 | - Display::display_error_message(get_lang('NotAllowedClickBack'),false); |
|
278 | + $show_form = false; |
|
279 | + Display::display_error_message(get_lang('NotAllowedClickBack'), false); |
|
280 | 280 | } |
281 | 281 | } |
282 | 282 | // set default values |
@@ -287,14 +287,14 @@ discard block |
||
287 | 287 | |
288 | 288 | // error messages |
289 | 289 | if (isset($error)) { |
290 | - Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false); |
|
290 | + Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'), false); |
|
291 | 291 | } |
292 | 292 | if ($show_form) { |
293 | 293 | $form->display(); |
294 | 294 | } |
295 | 295 | } elseif ($action == 'thematic_import_select') { |
296 | 296 | // Create form to upload csv file. |
297 | - $form = new FormValidator('thematic_import','POST','index.php?action=thematic_import&'.api_get_cidreq().$url_token); |
|
297 | + $form = new FormValidator('thematic_import', 'POST', 'index.php?action=thematic_import&'.api_get_cidreq().$url_token); |
|
298 | 298 | $form->addElement('header', get_lang('ImportThematic')); |
299 | 299 | $form->addElement('file', 'file'); |
300 | 300 | $form->addElement('checkbox', 'replace', null, get_lang('DeleteAllThematic')); |