@@ -13,8 +13,8 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | $is_allowed_to_edit = api_is_allowed_to_edit(null, true); |
| 15 | 15 | |
| 16 | -$isStudentView = isset($_REQUEST['isStudentView']) ? (int)$_REQUEST['isStudentView'] : null; |
|
| 17 | -$learnpath_id = (int)$_REQUEST['lp_id']; |
|
| 16 | +$isStudentView = isset($_REQUEST['isStudentView']) ? (int) $_REQUEST['isStudentView'] : null; |
|
| 17 | +$learnpath_id = (int) $_REQUEST['lp_id']; |
|
| 18 | 18 | $submit = isset($_POST['submit_button']) ? $_POST['submit_button'] : null; |
| 19 | 19 | |
| 20 | 20 | $type = isset($_GET['type']) ? $_GET['type'] : null; |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | if (!empty($gradebook) && $gradebook == 'view') { |
| 35 | - $interbreadcrumb[] = array ( |
|
| 35 | + $interbreadcrumb[] = array( |
|
| 36 | 36 | 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], |
| 37 | 37 | 'name' => get_lang('ToolGradebook') |
| 38 | 38 | ); |
@@ -56,12 +56,12 @@ discard block |
||
| 56 | 56 | ); |
| 57 | 57 | break; |
| 58 | 58 | default: |
| 59 | - $interbreadcrumb[]= array('url' => '#', 'name' => get_lang('NewStep')); |
|
| 59 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('NewStep')); |
|
| 60 | 60 | break; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | if ($action == 'add_item' && $type == 'document') { |
| 64 | - $interbreadcrumb[]= array ('url' => '#', 'name' => get_lang('NewDocumentCreated')); |
|
| 64 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('NewDocumentCreated')); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | // Theme calls. |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | $form = new FormValidator( |
| 78 | 78 | 'add_audio', |
| 79 | 79 | 'post', |
| 80 | - api_get_self() . '?action=add_audio&id=' . $lp_item_id . '&' . api_get_cidreq().'&lp_id='.$learnpath_id, |
|
| 80 | + api_get_self().'?action=add_audio&id='.$lp_item_id.'&'.api_get_cidreq().'&lp_id='.$learnpath_id, |
|
| 81 | 81 | null, |
| 82 | 82 | array('enctype' => 'multipart/form-data') |
| 83 | 83 | ); |
@@ -91,8 +91,8 @@ discard block |
||
| 91 | 91 | $urlFile = api_get_path(WEB_COURSE_PATH).$courseInfo['path'].'/document/audio/'.$lp_item->audio.'?'.api_get_cidreq(); |
| 92 | 92 | |
| 93 | 93 | if (!file_exists($file)) { |
| 94 | - $file = api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/document'.$lpPathInfo['dir'] . '/' . $lp_item->audio; |
|
| 95 | - $urlFile = api_get_path(WEB_COURSE_PATH).$courseInfo['path'].'/document'.$lpPathInfo['dir'] . '/' . $lp_item->audio.'?'.api_get_cidreq(); |
|
| 94 | + $file = api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/document'.$lpPathInfo['dir'].'/'.$lp_item->audio; |
|
| 95 | + $urlFile = api_get_path(WEB_COURSE_PATH).$courseInfo['path'].'/document'.$lpPathInfo['dir'].'/'.$lp_item->audio.'?'.api_get_cidreq(); |
|
| 96 | 96 | } |
| 97 | 97 | } |
| 98 | 98 | |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | Display::getMediaPlayer($file, array('url' => $urlFile)). |
| 133 | 133 | "</div>"; |
| 134 | 134 | $form->addElement('label', get_lang('Listen'), $audioPlayer); |
| 135 | - $url = api_get_path(WEB_CODE_PATH) . 'lp/lp_controller.php?lp_id='.$_SESSION['oLP']->get_id().'&action=add_audio&id='.$lp_item_id.'&delete_file=1&'.api_get_cidreq(); |
|
| 135 | + $url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?lp_id='.$_SESSION['oLP']->get_id().'&action=add_audio&id='.$lp_item_id.'&delete_file=1&'.api_get_cidreq(); |
|
| 136 | 136 | $form->addElement('label', null, Display::url(get_lang('RemoveAudio'), $url, array('class' => 'btn btn-danger'))); |
| 137 | 137 | } else { |
| 138 | 138 | $form->addElement('file', 'file'); |
@@ -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 || $groupRights || |
| 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) { |
@@ -125,8 +125,8 @@ discard block |
||
| 125 | 125 | $htmlHeadXtra[] = api_get_js('js/swfobject/swfobject.js'); |
| 126 | 126 | |
| 127 | 127 | $actions = Display::toolbarButton( |
| 128 | - get_lang('BackTo') . ' ' . get_lang('DocumentsOverview'), |
|
| 129 | - 'document.php?' . api_get_cidreq() . "&id=$document_id", |
|
| 128 | + get_lang('BackTo').' '.get_lang('DocumentsOverview'), |
|
| 129 | + 'document.php?'.api_get_cidreq()."&id=$document_id", |
|
| 130 | 130 | 'arrow-left', |
| 131 | 131 | 'default', |
| 132 | 132 | [], |