@@ -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 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | // Only a teachers page. |
| 30 | 30 | |
| 31 | 31 | if (!empty($group_id)) { |
| 32 | - $group_properties = GroupManager :: get_group_properties($group_id); |
|
| 32 | + $group_properties = GroupManager :: get_group_properties($group_id); |
|
| 33 | 33 | $show_work = false; |
| 34 | 34 | |
| 35 | 35 | if (api_is_allowed_to_edit(false, true)) { |
@@ -74,8 +74,8 @@ discard block |
||
| 74 | 74 | $usersAdded[] = $myUserId; |
| 75 | 75 | $userInfo = api_get_user_info($myUserId); |
| 76 | 76 | $url = api_get_path(WEB_CODE_PATH).'work/add_user.php?action=delete&id='.$workId.'&user_id='.$myUserId; |
| 77 | - $link = Display::url('<em class="fa fa-trash"></em> ' . get_lang('Delete'), $url, array('class' => 'btn btn-danger btn-sm')); |
|
| 78 | - echo '<li class="list-group-item">' . $userInfo['complete_name_with_username'] . '<div class="pull-right">' . $link . '</div></li>'; |
|
| 77 | + $link = Display::url('<em class="fa fa-trash"></em> '.get_lang('Delete'), $url, array('class' => 'btn btn-danger btn-sm')); |
|
| 78 | + echo '<li class="list-group-item">'.$userInfo['complete_name_with_username'].'<div class="pull-right">'.$link.'</div></li>'; |
|
| 79 | 79 | } |
| 80 | 80 | echo '</ul>'; |
| 81 | 81 | } |
@@ -108,8 +108,8 @@ discard block |
||
| 108 | 108 | foreach ($userToAddList as $user) { |
| 109 | 109 | $userName = api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].') '; |
| 110 | 110 | $url = api_get_path(WEB_CODE_PATH).'work/add_user.php?action=add&id='.$workId.'&user_id='.$user['user_id']; |
| 111 | - $link = Display::url('<em class="fa fa-plus"></em> ' . get_lang('Add'), $url, array('class' => 'btn btn-primary btn-sm')); |
|
| 112 | - echo '<li class="list-group-item">' . $userName . '<div class="pull-right"> ' . $link . '</div></li>'; |
|
| 111 | + $link = Display::url('<em class="fa fa-plus"></em> '.get_lang('Add'), $url, array('class' => 'btn btn-primary btn-sm')); |
|
| 112 | + echo '<li class="list-group-item">'.$userName.'<div class="pull-right"> '.$link.'</div></li>'; |
|
| 113 | 113 | } |
| 114 | 114 | echo '</ul>'; |
| 115 | 115 | } else { |
@@ -4,7 +4,7 @@ |
||
| 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 | |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | |
| 8 | 8 | // Setting the global file that gets the general configuration, the databases, the languages, ... |
| 9 | 9 | require_once '../inc/global.inc.php'; |
| 10 | -$current_course_tool = TOOL_COURSE_MAINTENANCE; |
|
| 10 | +$current_course_tool = TOOL_COURSE_MAINTENANCE; |
|
| 11 | 11 | api_protect_course_script(true); |
| 12 | 12 | |
| 13 | 13 | // Including additional libraries |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | $form->addGroup($group, '', get_lang('SameFilename')); |
| 121 | 121 | $form->add_progress_bar(); |
| 122 | 122 | $form->addButtonSave(get_lang('CopyCourse')); |
| 123 | - $form->setDefaults(array('copy_option' =>'select_items','same_file_name_option' => FILE_OVERWRITE)); |
|
| 123 | + $form->setDefaults(array('copy_option' =>'select_items', 'same_file_name_option' => FILE_OVERWRITE)); |
|
| 124 | 124 | |
| 125 | 125 | // Add Security token |
| 126 | 126 | $token = Security::get_token(); |
@@ -98,21 +98,21 @@ discard block |
||
| 98 | 98 | $cr->set_file_option($_POST['same_file_name_option']); |
| 99 | 99 | $cr->restore(); |
| 100 | 100 | Display::display_normal_message(get_lang('ImportFinished')); |
| 101 | - echo '<a class="btn btn-default" href="' . api_get_path(WEB_COURSE_PATH) . api_get_course_path() . '/index.php">' . get_lang('CourseHomepage') . '</a>'; |
|
| 101 | + echo '<a class="btn btn-default" href="'.api_get_path(WEB_COURSE_PATH).api_get_course_path().'/index.php">'.get_lang('CourseHomepage').'</a>'; |
|
| 102 | 102 | } else { |
| 103 | 103 | if (!$error) { |
| 104 | 104 | Display::display_warning_message(get_lang('NoResourcesInBackupFile')); |
| 105 | - echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>'; |
|
| 105 | + echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>'; |
|
| 106 | 106 | } elseif ($filename === false) { |
| 107 | 107 | Display::display_error_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin')); |
| 108 | - echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>'; |
|
| 108 | + echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>'; |
|
| 109 | 109 | } else { |
| 110 | 110 | if ($filename == '') { |
| 111 | 111 | Display::display_error_message(get_lang('SelectBackupFile')); |
| 112 | - echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>'; |
|
| 112 | + echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>'; |
|
| 113 | 113 | } else { |
| 114 | 114 | Display::display_error_message(get_lang('UploadError')); |
| 115 | - echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>'; |
|
| 115 | + echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>'; |
|
| 116 | 116 | } |
| 117 | 117 | } |
| 118 | 118 | } |
@@ -142,10 +142,10 @@ discard block |
||
| 142 | 142 | CourseSelectForm::display_form($course, $hiddenFields); |
| 143 | 143 | } elseif ($filename === false) { |
| 144 | 144 | Display::display_error_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin')); |
| 145 | - echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>'; |
|
| 145 | + echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>'; |
|
| 146 | 146 | } else { |
| 147 | 147 | Display::display_warning_message(get_lang('NoResourcesInBackupFile')); |
| 148 | - echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>'; |
|
| 148 | + echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>'; |
|
| 149 | 149 | } |
| 150 | 150 | } else { |
| 151 | 151 | $user = api_get_user_info(); |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | $form = new FormValidator( |
| 158 | 158 | 'import_backup_form', |
| 159 | 159 | 'post', |
| 160 | - api_get_path(WEB_CODE_PATH) . 'coursecopy/import_backup.php?' . api_get_cidreq(), |
|
| 160 | + api_get_path(WEB_CODE_PATH).'coursecopy/import_backup.php?'.api_get_cidreq(), |
|
| 161 | 161 | '', |
| 162 | 162 | array('enctype' => 'multipart/form-data') |
| 163 | 163 | ); |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | ); |
| 190 | 190 | $options['null'] = '-'; |
| 191 | 191 | foreach ($backups as $index => $backup) { |
| 192 | - $options[$backup['file']] = $backup['course_code'] . ' (' . $backup['date'] . ')'; |
|
| 192 | + $options[$backup['file']] = $backup['course_code'].' ('.$backup['date'].')'; |
|
| 193 | 193 | } |
| 194 | 194 | $form->addElement( |
| 195 | 195 | 'select', |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | 'radio', |
| 208 | 208 | '', |
| 209 | 209 | '', |
| 210 | - '<i>' . get_lang('NoBackupsAvailable') . '</i>', |
|
| 210 | + '<i>'.get_lang('NoBackupsAvailable').'</i>', |
|
| 211 | 211 | '', |
| 212 | 212 | 'disabled="true"' |
| 213 | 213 | ); |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | require_once '../inc/global.inc.php'; |
| 10 | -$this_section = SECTION_COURSES; |
|
| 10 | +$this_section = SECTION_COURSES; |
|
| 11 | 11 | |
| 12 | 12 | if (extension_loaded('xapian')) { |
| 13 | 13 | require '../newscorm/lp_list_search.php'; |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | $this_section = SECTION_COURSES; |
| 11 | 11 | |
| 12 | 12 | if (extension_loaded('xapian')) { |
| 13 | - require '../lp/lp_list_search.php'; |
|
| 13 | + require '../lp/lp_list_search.php'; |
|
| 14 | 14 | } else { |
| 15 | 15 | Display::display_header(get_lang('Search')); |
| 16 | 16 | Display::display_error_message(get_lang('SearchXapianModuleNotInstalled')); |
@@ -101,8 +101,8 @@ |
||
| 101 | 101 | $group_url = "group_view.php?id=$id"; |
| 102 | 102 | |
| 103 | 103 | $result['name'] = '<div class="group-name">'.Display::url( |
| 104 | - api_ucwords(cut($result['name'], 40, true)), $group_url) |
|
| 105 | - .'</div><div class="count-username">'. |
|
| 104 | + api_ucwords(cut($result['name'], 40, true)), $group_url) |
|
| 105 | + .'</div><div class="count-username">'. |
|
| 106 | 106 | Display::returnFontAwesomeIcon('user').$result['count'].'</div>'; |
| 107 | 107 | |
| 108 | 108 | $picture = $userGroup->get_picture_group( |
@@ -20,8 +20,8 @@ discard block |
||
| 20 | 20 | api_block_anonymous_users(); |
| 21 | 21 | |
| 22 | 22 | if (api_get_setting('allow_social_tool') != 'true') { |
| 23 | - $url = api_get_path(WEB_CODE_PATH) . 'auth/profile.php'; |
|
| 24 | - header('Location: ' . $url); |
|
| 23 | + $url = api_get_path(WEB_CODE_PATH).'auth/profile.php'; |
|
| 24 | + header('Location: '.$url); |
|
| 25 | 25 | exit; |
| 26 | 26 | } |
| 27 | 27 | |
@@ -45,10 +45,10 @@ discard block |
||
| 45 | 45 | $allowed_picture_types = api_get_supported_image_extensions(); |
| 46 | 46 | $form->addRule( |
| 47 | 47 | 'picture', |
| 48 | - get_lang('OnlyImagesAllowed') . ' (' . implode( |
|
| 48 | + get_lang('OnlyImagesAllowed').' ('.implode( |
|
| 49 | 49 | ',', |
| 50 | 50 | $allowed_picture_types |
| 51 | - ) . ')', |
|
| 51 | + ).')', |
|
| 52 | 52 | 'filetype', |
| 53 | 53 | $allowed_picture_types |
| 54 | 54 | ); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $table_user = Database :: get_main_table(TABLE_MAIN_USER); |
| 68 | 68 | |
| 69 | 69 | $sql = "UPDATE $table_user |
| 70 | - SET picture_uri = '$new_picture' WHERE user_id = " . api_get_user_id(); |
|
| 70 | + SET picture_uri = '$new_picture' WHERE user_id = ".api_get_user_id(); |
|
| 71 | 71 | |
| 72 | 72 | $result = Database::query($sql); |
| 73 | 73 | } |
@@ -94,9 +94,9 @@ discard block |
||
| 94 | 94 | $result['name'] = Security::remove_XSS($result['name'], STUDENT, true); |
| 95 | 95 | |
| 96 | 96 | if ($result['count'] == 1) { |
| 97 | - $result['count'] = '1 ' . get_lang('Member'); |
|
| 97 | + $result['count'] = '1 '.get_lang('Member'); |
|
| 98 | 98 | } else { |
| 99 | - $result['count'] = $result['count'] . ' ' . get_lang('Members'); |
|
| 99 | + $result['count'] = $result['count'].' '.get_lang('Members'); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | $group_url = "group_view.php?id=$id"; |
@@ -113,9 +113,9 @@ discard block |
||
| 113 | 113 | GROUP_IMAGE_SIZE_BIG |
| 114 | 114 | ); |
| 115 | 115 | |
| 116 | - $result['picture'] = '<img class="img-responsive" src="' . $picture['file'] . '" />'; |
|
| 117 | - $group_actions = '<div class="group-more"><a href="groups.php?#tab_browse-2">' . get_lang('SeeMore') . '</a></div>'; |
|
| 118 | - $group_info= '<div class="description"><p>' . cut($result['description'], 120, true) . "</p></div>"; |
|
| 116 | + $result['picture'] = '<img class="img-responsive" src="'.$picture['file'].'" />'; |
|
| 117 | + $group_actions = '<div class="group-more"><a href="groups.php?#tab_browse-2">'.get_lang('SeeMore').'</a></div>'; |
|
| 118 | + $group_info = '<div class="description"><p>'.cut($result['description'], 120, true)."</p></div>"; |
|
| 119 | 119 | $groups_newest[] = array( |
| 120 | 120 | Display::url( |
| 121 | 121 | $result['picture'], |
@@ -142,12 +142,12 @@ discard block |
||
| 142 | 142 | $group_url = "group_view.php?id=$id"; |
| 143 | 143 | |
| 144 | 144 | if ($result['count'] == 1) { |
| 145 | - $result['count'] = '1 ' . get_lang('Member'); |
|
| 145 | + $result['count'] = '1 '.get_lang('Member'); |
|
| 146 | 146 | } else { |
| 147 | - $result['count'] = $result['count'] . ' ' . get_lang('Members'); |
|
| 147 | + $result['count'] = $result['count'].' '.get_lang('Members'); |
|
| 148 | 148 | } |
| 149 | 149 | $result['name'] = '<div class="group-name">'.Display::url( |
| 150 | - api_ucwords(cut($result['name'], 40, true)),$group_url) |
|
| 150 | + api_ucwords(cut($result['name'], 40, true)), $group_url) |
|
| 151 | 151 | .'</div><div class="count-username">'.Display::returnFontAwesomeIcon('user').$result['count'].'</div>'; |
| 152 | 152 | |
| 153 | 153 | $picture = $userGroup->get_picture_group( |
@@ -156,42 +156,42 @@ discard block |
||
| 156 | 156 | null, |
| 157 | 157 | GROUP_IMAGE_SIZE_BIG |
| 158 | 158 | ); |
| 159 | - $result['picture_uri'] = '<img class="img-responsive" src="' . $picture['file'] . '" />'; |
|
| 160 | - $group_actions = '<div class="group-more" ><a href="groups.php?#tab_browse-3">' . get_lang('SeeMore') . '</a></div>'; |
|
| 161 | - $group_info= '<div class="description"><p>' . cut($result['description'], 120, true) . "</p></div>"; |
|
| 159 | + $result['picture_uri'] = '<img class="img-responsive" src="'.$picture['file'].'" />'; |
|
| 160 | + $group_actions = '<div class="group-more" ><a href="groups.php?#tab_browse-3">'.get_lang('SeeMore').'</a></div>'; |
|
| 161 | + $group_info = '<div class="description"><p>'.cut($result['description'], 120, true)."</p></div>"; |
|
| 162 | 162 | $groups_pop[] = array( |
| 163 | 163 | Display::url($result['picture_uri'], $group_url), |
| 164 | - $result['name'],$group_info. $group_actions |
|
| 164 | + $result['name'], $group_info.$group_actions |
|
| 165 | 165 | ); |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | -$list=count($groups_newest); |
|
| 168 | +$list = count($groups_newest); |
|
| 169 | 169 | $social_group_block = null; |
| 170 | 170 | if ($list > 0) { |
| 171 | 171 | $social_group_block .= '<div class="list-group-newest">'; |
| 172 | - $social_group_block .= '<div class="group-title">' . get_lang('Newest') . '</div>'; |
|
| 173 | - for($i = 0;$i < $list; $i++){ |
|
| 174 | - $social_group_block.='<div class="row">'; |
|
| 175 | - $social_group_block.='<div class="col-md-3">' . $groups_newest[$i][0] . '</div>'; |
|
| 176 | - $social_group_block.='<div class="col-md-9">' . $groups_newest[$i][1]; |
|
| 177 | - $social_group_block.= $groups_newest[$i][2] . '</div>'; |
|
| 178 | - $social_group_block.="</div>"; |
|
| 172 | + $social_group_block .= '<div class="group-title">'.get_lang('Newest').'</div>'; |
|
| 173 | + for ($i = 0; $i < $list; $i++) { |
|
| 174 | + $social_group_block .= '<div class="row">'; |
|
| 175 | + $social_group_block .= '<div class="col-md-3">'.$groups_newest[$i][0].'</div>'; |
|
| 176 | + $social_group_block .= '<div class="col-md-9">'.$groups_newest[$i][1]; |
|
| 177 | + $social_group_block .= $groups_newest[$i][2].'</div>'; |
|
| 178 | + $social_group_block .= "</div>"; |
|
| 179 | 179 | } |
| 180 | - $social_group_block.= "</div>"; |
|
| 180 | + $social_group_block .= "</div>"; |
|
| 181 | 181 | } |
| 182 | -$list=count($groups_pop); |
|
| 182 | +$list = count($groups_pop); |
|
| 183 | 183 | if ($list > 0) { |
| 184 | 184 | $social_group_block .= '<div class="list-group-newest">'; |
| 185 | - $social_group_block .= '<div class="group-title">' . get_lang('Popular') . '</div>'; |
|
| 186 | - |
|
| 187 | - for($i = 0;$i < $list; $i++){ |
|
| 188 | - $social_group_block.='<div class="row">'; |
|
| 189 | - $social_group_block.='<div class="col-md-3">' . $groups_pop[$i][0] . '</div>'; |
|
| 190 | - $social_group_block.='<div class="col-md-9">' . $groups_pop[$i][1]; |
|
| 191 | - $social_group_block.= $groups_pop[$i][2] . '</div>'; |
|
| 192 | - $social_group_block.="</div>"; |
|
| 185 | + $social_group_block .= '<div class="group-title">'.get_lang('Popular').'</div>'; |
|
| 186 | + |
|
| 187 | + for ($i = 0; $i < $list; $i++) { |
|
| 188 | + $social_group_block .= '<div class="row">'; |
|
| 189 | + $social_group_block .= '<div class="col-md-3">'.$groups_pop[$i][0].'</div>'; |
|
| 190 | + $social_group_block .= '<div class="col-md-9">'.$groups_pop[$i][1]; |
|
| 191 | + $social_group_block .= $groups_pop[$i][2].'</div>'; |
|
| 192 | + $social_group_block .= "</div>"; |
|
| 193 | 193 | } |
| 194 | - $social_group_block.= "</div>"; |
|
| 194 | + $social_group_block .= "</div>"; |
|
| 195 | 195 | } |
| 196 | 196 | // My friends |
| 197 | 197 | $friend_html = SocialManager::listMyFriendsBlock( |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | $isDRH = api_is_drh(); |
| 13 | 13 | |
| 14 | 14 | if (!$isStudent && !$isStudentBoss && !$isDRH) { |
| 15 | - header('Location: ' . api_get_path(WEB_CODE_PATH) . 'social/skills_wheel.php'); |
|
| 15 | + header('Location: '.api_get_path(WEB_CODE_PATH).'social/skills_wheel.php'); |
|
| 16 | 16 | exit; |
| 17 | 17 | } |
| 18 | 18 | |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | |
| 192 | 192 | $tpl->assign('rows', $tableRows); |
| 193 | 193 | |
| 194 | -$contentTemplate = $tpl->fetch("default/" . $tplPath); |
|
| 194 | +$contentTemplate = $tpl->fetch("default/".$tplPath); |
|
| 195 | 195 | |
| 196 | 196 | $tpl->assign('content', $contentTemplate); |
| 197 | 197 | $tpl->display_one_col_template(); |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | api_block_anonymous_users(); |
| 15 | 15 | |
| 16 | 16 | if (isset($_REQUEST['userId'])) { |
| 17 | - $userId = intval($_REQUEST['userId']); |
|
| 17 | + $userId = intval($_REQUEST['userId']); |
|
| 18 | 18 | } else { |
| 19 | 19 | api_not_allowed(); |
| 20 | 20 | } |