@@ -43,15 +43,15 @@ discard block |
||
43 | 43 | $event = $agenda->get_event($id); |
44 | 44 | |
45 | 45 | if (!empty($event)) { |
46 | - define('ICAL_LANG',api_get_language_isocode()); |
|
46 | + define('ICAL_LANG', api_get_language_isocode()); |
|
47 | 47 | |
48 | 48 | $ical = new vcalendar(); |
49 | - $ical->setConfig('unique_id',api_get_path(WEB_PATH)); |
|
50 | - $ical->setProperty( 'method', 'PUBLISH' ); |
|
51 | - $ical->setConfig('url',api_get_path(WEB_PATH)); |
|
49 | + $ical->setConfig('unique_id', api_get_path(WEB_PATH)); |
|
50 | + $ical->setProperty('method', 'PUBLISH'); |
|
51 | + $ical->setConfig('url', api_get_path(WEB_PATH)); |
|
52 | 52 | $vevent = new vevent(); |
53 | 53 | |
54 | - switch($_GET['class']) { |
|
54 | + switch ($_GET['class']) { |
|
55 | 55 | case 'public': |
56 | 56 | $vevent->setClass('PUBLIC'); |
57 | 57 | break; |
@@ -69,44 +69,44 @@ discard block |
||
69 | 69 | $event['start_date'] = api_get_local_time($event['start_date']); |
70 | 70 | $event['end_date'] = api_get_local_time($event['end_date']); |
71 | 71 | |
72 | - switch($type) { |
|
72 | + switch ($type) { |
|
73 | 73 | case 'personal': |
74 | 74 | case 'platform': |
75 | - $vevent->setProperty( 'summary', api_convert_encoding($event['title'],'UTF-8', $charset)); |
|
76 | - if(empty($event['start_date'])){header('location:'.Security::remove_XSS($_SERVER['HTTP_REFERER']));} |
|
77 | - list($y,$m,$d,$h,$M,$s) = preg_split('/[\s:-]/',$event['start_date']); |
|
78 | - $vevent->setProperty('dtstart',array('year'=>$y,'month'=>$m,'day'=>$d,'hour'=>$h,'min'=>$M,'sec'=>$s)); |
|
79 | - if(empty($event['end_date'])) { |
|
80 | - $y2=$y;$m2=$m;$d2=$d;$h2=$h;$M2=$M+15;$s2=$s; |
|
81 | - if($M2>60){$M2=$M2-60;$h2+=1;} |
|
75 | + $vevent->setProperty('summary', api_convert_encoding($event['title'], 'UTF-8', $charset)); |
|
76 | + if (empty($event['start_date'])) {header('location:'.Security::remove_XSS($_SERVER['HTTP_REFERER'])); } |
|
77 | + list($y, $m, $d, $h, $M, $s) = preg_split('/[\s:-]/', $event['start_date']); |
|
78 | + $vevent->setProperty('dtstart', array('year'=>$y, 'month'=>$m, 'day'=>$d, 'hour'=>$h, 'min'=>$M, 'sec'=>$s)); |
|
79 | + if (empty($event['end_date'])) { |
|
80 | + $y2 = $y; $m2 = $m; $d2 = $d; $h2 = $h; $M2 = $M + 15; $s2 = $s; |
|
81 | + if ($M2 > 60) {$M2 = $M2 - 60; $h2 += 1; } |
|
82 | 82 | } else { |
83 | - list($y2,$m2,$d2,$h2,$M2,$s2) = preg_split('/[\s:-]/',$event['end_date']); |
|
83 | + list($y2, $m2, $d2, $h2, $M2, $s2) = preg_split('/[\s:-]/', $event['end_date']); |
|
84 | 84 | } |
85 | - $vevent->setProperty('dtend',array('year'=>$y2,'month'=>$m2,'day'=>$d2,'hour'=>$h2,'min'=>$M2,'sec'=>$s2)); |
|
85 | + $vevent->setProperty('dtend', array('year'=>$y2, 'month'=>$m2, 'day'=>$d2, 'hour'=>$h2, 'min'=>$M2, 'sec'=>$s2)); |
|
86 | 86 | //$vevent->setProperty( 'LOCATION', get_lang('Unknown') ); // property name - case independent |
87 | - $vevent->setProperty( 'description', api_convert_encoding($event['description'],'UTF-8',$charset)); |
|
87 | + $vevent->setProperty('description', api_convert_encoding($event['description'], 'UTF-8', $charset)); |
|
88 | 88 | //$vevent->setProperty( 'comment', 'This is a comment' ); |
89 | 89 | //$user = api_get_user_info($event['user']); |
90 | 90 | //$vevent->setProperty('organizer',$user['mail']); |
91 | 91 | //$vevent->setProperty('attendee',$user['mail']); |
92 | 92 | //$vevent->setProperty( 'rrule', array( 'FREQ' => 'WEEKLY', 'count' => 4));// occurs also four next weeks |
93 | - $ical->setConfig('filename',$y.$m.$d.$h.$M.$s.'-'.rand(1,1000).'.ics'); |
|
94 | - $ical->setComponent ($vevent); // add event to calendar |
|
93 | + $ical->setConfig('filename', $y.$m.$d.$h.$M.$s.'-'.rand(1, 1000).'.ics'); |
|
94 | + $ical->setComponent($vevent); // add event to calendar |
|
95 | 95 | $ical->returnCalendar(); |
96 | 96 | break; |
97 | 97 | case 'course': |
98 | - $vevent->setProperty( 'summary', api_convert_encoding($event['title'],'UTF-8',$charset)); |
|
99 | - if(empty($event['start_date'])){header('location:'.Security::remove_XSS($_SERVER['HTTP_REFERER']));} |
|
100 | - list($y,$m,$d,$h,$M,$s) = preg_split('/[\s:-]/',$event['start_date']); |
|
101 | - $vevent->setProperty('dtstart',array('year'=>$y,'month'=>$m,'day'=>$d,'hour'=>$h,'min'=>$M,'sec'=>$s)); |
|
98 | + $vevent->setProperty('summary', api_convert_encoding($event['title'], 'UTF-8', $charset)); |
|
99 | + if (empty($event['start_date'])) {header('location:'.Security::remove_XSS($_SERVER['HTTP_REFERER'])); } |
|
100 | + list($y, $m, $d, $h, $M, $s) = preg_split('/[\s:-]/', $event['start_date']); |
|
101 | + $vevent->setProperty('dtstart', array('year'=>$y, 'month'=>$m, 'day'=>$d, 'hour'=>$h, 'min'=>$M, 'sec'=>$s)); |
|
102 | 102 | if (empty($event['end_date'])) { |
103 | - $y2=$y;$m2=$m;$d2=$d;$h2=$h;$M2=$M+15;$s2=$s; |
|
104 | - if($M2>60){$M2=$M2-60;$h2+=1;} |
|
103 | + $y2 = $y; $m2 = $m; $d2 = $d; $h2 = $h; $M2 = $M + 15; $s2 = $s; |
|
104 | + if ($M2 > 60) {$M2 = $M2 - 60; $h2 += 1; } |
|
105 | 105 | } else { |
106 | - list($y2,$m2,$d2,$h2,$M2,$s2) = preg_split('/[\s:-]/',$event['end_date']); |
|
106 | + list($y2, $m2, $d2, $h2, $M2, $s2) = preg_split('/[\s:-]/', $event['end_date']); |
|
107 | 107 | } |
108 | - $vevent->setProperty('dtend',array('year'=>$y2,'month'=>$m2,'day'=>$d2,'hour'=>$h2,'min'=>$M2,'sec'=>$s2)); |
|
109 | - $vevent->setProperty( 'description', api_convert_encoding($event['description'],'UTF-8',$charset)); |
|
108 | + $vevent->setProperty('dtend', array('year'=>$y2, 'month'=>$m2, 'day'=>$d2, 'hour'=>$h2, 'min'=>$M2, 'sec'=>$s2)); |
|
109 | + $vevent->setProperty('description', api_convert_encoding($event['description'], 'UTF-8', $charset)); |
|
110 | 110 | //$vevent->setProperty( 'comment', 'This is a comment' ); |
111 | 111 | //$user = api_get_user_info($event['user']); |
112 | 112 | //$vevent->setProperty('organizer',$user['mail']); |
@@ -120,8 +120,8 @@ discard block |
||
120 | 120 | $vevent->setProperty('rrule',array('FREQ'=>$freq,'UNTIL'=>array('year'=>$e_y,'month'=>$e_m,'day'=>$e_d),'INTERVAL'=>'1')); |
121 | 121 | }*/ |
122 | 122 | //$vevent->setProperty( 'rrule', array( 'FREQ' => 'WEEKLY', 'count' => 4));// occurs also four next weeks |
123 | - $ical->setConfig('filename',$y.$m.$d.$h.$M.$s.'-'.rand(1,1000).'.ics'); |
|
124 | - $ical->setComponent ($vevent); // add event to calendar |
|
123 | + $ical->setConfig('filename', $y.$m.$d.$h.$M.$s.'-'.rand(1, 1000).'.ics'); |
|
124 | + $ical->setComponent($vevent); // add event to calendar |
|
125 | 125 | $ical->returnCalendar(); |
126 | 126 | break; |
127 | 127 | default: |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | (api_get_course_setting('allow_user_edit_agenda') && |
93 | 93 | !api_is_anonymous() && |
94 | 94 | api_is_allowed_to_session_edit(false, true)) || |
95 | - GroupManager::user_has_access(api_get_user_id(), $group_id, GroupManager::GROUP_TOOL_CALENDAR) && |
|
95 | + GroupManager::user_has_access(api_get_user_id(), $group_id, GroupManager::GROUP_TOOL_CALENDAR) && |
|
96 | 96 | GroupManager::is_tutor_of_group(api_get_user_id(), $group_id) |
97 | 97 | ) { |
98 | 98 | switch ($action) { |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | } |
273 | 273 | break; |
274 | 274 | case "delete": |
275 | - if (!(api_is_course_coach() && !api_is_element_in_the_session(TOOL_AGENDA, $eventId) )) { |
|
275 | + if (!(api_is_course_coach() && !api_is_element_in_the_session(TOOL_AGENDA, $eventId))) { |
|
276 | 276 | // a coach can only delete an element belonging to his session |
277 | 277 | $content = $agenda->delete_event($eventId); |
278 | 278 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | if (isset($_REQUEST['cidReq']) && !empty($_REQUEST['cidReq'])) { |
37 | 37 | if ($_REQUEST['cidReq'] == -1) { |
38 | 38 | // When is out of the course tool (e.g My agenda) |
39 | - header('Location: ' . api_get_self()); |
|
39 | + header('Location: '.api_get_self()); |
|
40 | 40 | exit; |
41 | 41 | } else { |
42 | 42 | $type = 'course'; |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | require_once '../inc/global.inc.php'; |
8 | 8 | |
9 | 9 | $interbreadcrumb[] = array( |
10 | - 'url' => api_get_path(WEB_CODE_PATH) . "calendar/agenda_js.php", |
|
10 | + 'url' => api_get_path(WEB_CODE_PATH)."calendar/agenda_js.php", |
|
11 | 11 | 'name' => get_lang('Agenda') |
12 | 12 | ); |
13 | 13 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | if (!empty($currentCourseId) && $currentCourseId != -1) { |
31 | 31 | // Agenda is inside a course tool |
32 | - $url = api_get_self() . '?' . api_get_cidreq(); |
|
32 | + $url = api_get_self().'?'.api_get_cidreq(); |
|
33 | 33 | $this_section = SECTION_COURSES; |
34 | 34 | } else { |
35 | 35 | // Agenda is out of the course tool (e.g personal agenda) |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | if (!empty($events)) { |
46 | 46 | foreach ($events as &$event) { |
47 | 47 | $courseId = isset($event['course_id']) ? $event['course_id'] : ''; |
48 | - $event['url'] = api_get_self() . '?cid=' . $courseId . '&type=' . $event['type']; |
|
48 | + $event['url'] = api_get_self().'?cid='.$courseId.'&type='.$event['type']; |
|
49 | 49 | } |
50 | 50 | } |
51 | 51 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | // personal and admin do not have visibility property |
77 | 77 | } |
78 | 78 | } |
79 | - header('Location: '. api_get_self()); |
|
79 | + header('Location: '.api_get_self()); |
|
80 | 80 | exit; |
81 | 81 | } |
82 | 82 | } |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | $dir = $document_data['path']; |
34 | 34 | |
35 | 35 | //make some vars |
36 | -$wamidir=$dir; |
|
37 | -if($wamidir=="/"){ |
|
38 | - $wamidir=""; |
|
36 | +$wamidir = $dir; |
|
37 | +if ($wamidir == "/") { |
|
38 | + $wamidir = ""; |
|
39 | 39 | } |
40 | 40 | $wamiurlplay = api_get_path(WEB_COURSE_PATH).api_get_course_path().'/document'.$wamidir."/"; |
41 | 41 | $groupId = api_get_group_id(); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | //groups //TODO: clean |
71 | 71 | if (!empty($groupId)) { |
72 | - $interbreadcrumb[] = array ("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace')); |
|
72 | + $interbreadcrumb[] = array("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace')); |
|
73 | 73 | $noPHP_SELF = true; |
74 | 74 | $group = GroupManager :: get_group_properties($groupId); |
75 | 75 | $path = explode('/', $dir); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | if (!($is_allowed_to_edit || $_SESSION['group_member_with_upload_rights'] || |
88 | - DocumentManager::is_my_shared_folder(api_get_user_id(), Security::remove_XSS($dir),api_get_session_id()))) { |
|
88 | + DocumentManager::is_my_shared_folder(api_get_user_id(), Security::remove_XSS($dir), api_get_session_id()))) { |
|
89 | 89 | api_not_allowed(true); |
90 | 90 | } |
91 | 91 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | // Interbreadcrumb for the current directory root path |
104 | 104 | $counter = 0; |
105 | 105 | if (isset($document_data['parents'])) { |
106 | - foreach($document_data['parents'] as $document_sub_data) { |
|
106 | + foreach ($document_data['parents'] as $document_sub_data) { |
|
107 | 107 | //fixing double group folder in breadcrumb |
108 | 108 | if (api_get_group_id()) { |
109 | 109 | if ($counter == 0) { |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | |
122 | 122 | Display :: display_header($nameTools, 'Doc'); |
123 | 123 | echo '<div class="actions">'; |
124 | - echo '<a href="document.php?id='.$document_id.'">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
124 | + echo '<a href="document.php?id='.$document_id.'">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
125 | 125 | echo '</div>'; |
126 | 126 | ?> |
127 | 127 | <!-- swfobject is a commonly used library to embed Flash content https://ajax.googleapis.com/ajax/libs/swfobject/2.2/ --> |
@@ -41,7 +41,7 @@ |
||
41 | 41 | |
42 | 42 | $doc_url = str_replace(array('../', '\\..', '\\0', '..\\'), array('', '', '', ''), $doc_url); //echo $doc_url; |
43 | 43 | |
44 | -if (strpos($doc_url,'../') OR strpos($doc_url,'/..')) { |
|
44 | +if (strpos($doc_url, '../') OR strpos($doc_url, '/..')) { |
|
45 | 45 | $doc_url = ''; |
46 | 46 | } |
47 | 47 |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $web_odf_supported_files = DocumentManager::get_web_odf_extension_list(); |
35 | 35 | |
36 | 36 | if (in_array(strtolower($pathinfo['extension']), $web_odf_supported_files)) { |
37 | - $show_web_odf = true; |
|
37 | + $show_web_odf = true; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | $file_url_web = api_get_path(WEB_COURSE_PATH).$_course['path'].'/document'.$header_file; |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | echo Display::display_header(''); |
86 | 86 | |
87 | 87 | echo '<div class="actions">'; |
88 | -echo '<a href="document.php?id='.$parent_id.'">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
89 | -echo '<a href="edit_document.php?'.api_get_cidreq().'&id='.$document_id.$req_gid.'&origin=editodf">'.Display::return_icon('edit.png',get_lang('Rename').'/'.get_lang('Comments'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
88 | +echo '<a href="document.php?id='.$parent_id.'">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
89 | +echo '<a href="edit_document.php?'.api_get_cidreq().'&id='.$document_id.$req_gid.'&origin=editodf">'.Display::return_icon('edit.png', get_lang('Rename').'/'.get_lang('Comments'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
90 | 90 | echo '</div>'; |
91 | 91 | |
92 | 92 | // echo '<div id="odf"></div>'; |
@@ -32,9 +32,9 @@ discard block |
||
32 | 32 | $dir = $document_data['path']; |
33 | 33 | |
34 | 34 | //make some vars |
35 | -$webcamdir=$dir; |
|
36 | -if($webcamdir=="/"){ |
|
37 | - $webcamdir=""; |
|
35 | +$webcamdir = $dir; |
|
36 | +if ($webcamdir == "/") { |
|
37 | + $webcamdir = ""; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $groupId = api_get_group_id(); |
69 | 69 | |
70 | 70 | if (!empty($groupId)) { |
71 | - $interbreadcrumb[] = array ("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace')); |
|
71 | + $interbreadcrumb[] = array("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace')); |
|
72 | 72 | $noPHP_SELF = true; |
73 | 73 | $group = GroupManager :: get_group_properties($groupId); |
74 | 74 | $path = explode('/', $dir); |
@@ -77,14 +77,14 @@ discard block |
||
77 | 77 | } |
78 | 78 | } |
79 | 79 | |
80 | -$interbreadcrumb[] = array ("url" => "./document.php?id=".$document_id."&".api_get_cidreq(), "name" => get_lang('Documents')); |
|
80 | +$interbreadcrumb[] = array("url" => "./document.php?id=".$document_id."&".api_get_cidreq(), "name" => get_lang('Documents')); |
|
81 | 81 | |
82 | 82 | if (!$is_allowed_in_course) { |
83 | 83 | api_not_allowed(true); |
84 | 84 | } |
85 | 85 | |
86 | 86 | if (!($is_allowed_to_edit || $_SESSION['group_member_with_upload_rights'] || |
87 | - DocumentManager::is_my_shared_folder(api_get_user_id(), Security::remove_XSS($dir),api_get_session_id()))) { |
|
87 | + DocumentManager::is_my_shared_folder(api_get_user_id(), Security::remove_XSS($dir), api_get_session_id()))) { |
|
88 | 88 | api_not_allowed(true); |
89 | 89 | } |
90 | 90 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | // Interbreadcrumb for the current directory root path |
103 | 103 | $counter = 0; |
104 | 104 | if (isset($document_data['parents'])) { |
105 | - foreach($document_data['parents'] as $document_sub_data) { |
|
105 | + foreach ($document_data['parents'] as $document_sub_data) { |
|
106 | 106 | //fixing double group folder in breadcrumb |
107 | 107 | if (api_get_group_id()) { |
108 | 108 | if ($counter == 0) { |
@@ -116,12 +116,12 @@ discard block |
||
116 | 116 | } |
117 | 117 | |
118 | 118 | //make some vars |
119 | -$webcamuserid=api_get_user_id(); |
|
119 | +$webcamuserid = api_get_user_id(); |
|
120 | 120 | |
121 | 121 | Display :: display_header($nameTools, 'Doc'); |
122 | 122 | echo '<div class="actions">'; |
123 | 123 | echo '<a href="document.php?id='.$document_id.'">'. |
124 | - Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
124 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
125 | 125 | echo '</div>'; |
126 | 126 | ?> |
127 | 127 |
@@ -29,25 +29,25 @@ discard block |
||
29 | 29 | $my_cur_dir_path = Security::remove_XSS($_GET['curdirpath']); |
30 | 30 | } |
31 | 31 | |
32 | -$dir= str_replace('\\', '/',$dir);//and urlencode each url $curdirpath (hack clean $curdirpath under Windows - Bug #3261) |
|
32 | +$dir = str_replace('\\', '/', $dir); //and urlencode each url $curdirpath (hack clean $curdirpath under Windows - Bug #3261) |
|
33 | 33 | |
34 | 34 | /* Constants & Variables */ |
35 | -$current_session_id=api_get_session_id(); |
|
35 | +$current_session_id = api_get_session_id(); |
|
36 | 36 | $group_id = api_get_group_id(); |
37 | 37 | |
38 | 38 | //path for svg-edit save |
39 | -$_SESSION['draw_dir']=Security::remove_XSS($dir); |
|
40 | -if ($_SESSION['draw_dir']=='/'){ |
|
39 | +$_SESSION['draw_dir'] = Security::remove_XSS($dir); |
|
40 | +if ($_SESSION['draw_dir'] == '/') { |
|
41 | 41 | $_SESSION['draw_dir'] = ''; |
42 | 42 | } |
43 | -$_SESSION['draw_file']=basename(Security::remove_XSS($file_path)); |
|
43 | +$_SESSION['draw_file'] = basename(Security::remove_XSS($file_path)); |
|
44 | 44 | $get_file = Security::remove_XSS($file_path); |
45 | 45 | $file = basename($get_file); |
46 | -$temp_file = explode(".",$file); |
|
47 | -$filename=$temp_file[0]; |
|
48 | -$nameTools = get_lang('EditDocument') . ': '.$filename; |
|
46 | +$temp_file = explode(".", $file); |
|
47 | +$filename = $temp_file[0]; |
|
48 | +$nameTools = get_lang('EditDocument').': '.$filename; |
|
49 | 49 | |
50 | -$courseDir = $_course['path'].'/document'; |
|
50 | +$courseDir = $_course['path'].'/document'; |
|
51 | 51 | $is_allowed_to_edit = api_is_allowed_to_edit(null, true); |
52 | 52 | |
53 | 53 | /* Other initialization code */ |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | //groups //TODO:clean |
81 | 81 | if (!empty($group_id)) { |
82 | 82 | $req_gid = '&gidReq='.$group_id; |
83 | - $interbreadcrumb[] = array ('url' => '../group/group_space.php?gidReq='.$group_id, 'name' => get_lang('GroupSpace')); |
|
83 | + $interbreadcrumb[] = array('url' => '../group/group_space.php?gidReq='.$group_id, 'name' => get_lang('GroupSpace')); |
|
84 | 84 | $group_document = true; |
85 | 85 | $noPHP_SELF = true; |
86 | 86 | } |
@@ -88,15 +88,15 @@ discard block |
||
88 | 88 | $is_certificate_mode = DocumentManager::is_certificate_mode($dir); |
89 | 89 | |
90 | 90 | if (!$is_certificate_mode) |
91 | - $interbreadcrumb[]= array("url" => "./document.php?curdirpath=".urlencode($my_cur_dir_path).$req_gid, "name"=> get_lang('Documents')); |
|
91 | + $interbreadcrumb[] = array("url" => "./document.php?curdirpath=".urlencode($my_cur_dir_path).$req_gid, "name"=> get_lang('Documents')); |
|
92 | 92 | else |
93 | - $interbreadcrumb[]= array ('url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook')); |
|
93 | + $interbreadcrumb[] = array('url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook')); |
|
94 | 94 | |
95 | 95 | // Interbreadcrumb for the current directory root path |
96 | 96 | if (empty($document_data['parents'])) { |
97 | 97 | $interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']); |
98 | 98 | } else { |
99 | - foreach($document_data['parents'] as $document_sub_data) { |
|
99 | + foreach ($document_data['parents'] as $document_sub_data) { |
|
100 | 100 | if ($document_data['title'] == $document_sub_data['title']) { |
101 | 101 | continue; |
102 | 102 | } |
@@ -115,18 +115,18 @@ discard block |
||
115 | 115 | |
116 | 116 | Display :: display_header($nameTools, 'Doc'); |
117 | 117 | echo '<div class="actions">'; |
118 | - echo '<a href="document.php?id='.$parent_id.'">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
119 | - echo '<a href="edit_document.php?'.api_get_cidreq().'&id='.$document_id.$req_gid.'&origin=editdraw">'.Display::return_icon('edit.png',get_lang('Rename').'/'.get_lang('Comments'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
118 | + echo '<a href="document.php?id='.$parent_id.'">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
119 | + echo '<a href="edit_document.php?'.api_get_cidreq().'&id='.$document_id.$req_gid.'&origin=editdraw">'.Display::return_icon('edit.png', get_lang('Rename').'/'.get_lang('Comments'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
120 | 120 | echo '</div>'; |
121 | 121 | |
122 | 122 | if (api_browser_support('svg')) { |
123 | 123 | //automatic loading the course language |
124 | 124 | $svgedit_code_translation_table = array('' => 'en', 'pt' => 'pt-Pt', 'sr' => 'sr_latn'); |
125 | - $langsvgedit = api_get_language_isocode(); |
|
125 | + $langsvgedit = api_get_language_isocode(); |
|
126 | 126 | $langsvgedit = isset($svgedit_code_translation_table[$langsvgedit]) ? $svgedit_code_translation_table[$langsvgedit] : $langsvgedit; |
127 | 127 | $langsvgedit = file_exists(api_get_path(LIBRARY_PATH).'svg-edit/locale/lang.'.$langsvgedit.'.js') ? $langsvgedit : 'en'; |
128 | 128 | |
129 | - $svg_url= api_get_path(WEB_LIBRARY_PATH).'svg-edit/svg-editor.php?url=../../../../courses/'.$courseDir.$dir.$file.'&lang='.$langsvgedit; |
|
129 | + $svg_url = api_get_path(WEB_LIBRARY_PATH).'svg-edit/svg-editor.php?url=../../../../courses/'.$courseDir.$dir.$file.'&lang='.$langsvgedit; |
|
130 | 130 | |
131 | 131 | ?> |
132 | 132 |