Passed
Push — 1.10.x ( e3bfbb...b3ef90 )
by Yannick
49:24
created
main/newscorm/lp_final_item.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 // Initialize context
9 9
 $_in_course = true;
10 10
 require_once '../inc/global.inc.php';
11
-$current_course_tool  = TOOL_GRADEBOOK;
11
+$current_course_tool = TOOL_GRADEBOOK;
12 12
 
13 13
 // Make sure no anonymous user gets here without permission
14 14
 api_protect_course_script(true);
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 $currentItem = $lp->items[$currentItemId];
41 41
 $currentItemStatus = $currentItem->get_status();
42 42
 $accessGranted = false;
43
-if (($count - $completed == 0) or (($count - $completed == 1 && ($currentItemStatus == 'incomplete') or ($currentItemStatus == 'not attempted') ))) {
43
+if (($count - $completed == 0) or (($count - $completed == 1 && ($currentItemStatus == 'incomplete') or ($currentItemStatus == 'not attempted')))) {
44 44
     if ($lp->prerequisites_match($currentItemId)) {
45 45
         $accessGranted = true;
46 46
     }
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
  * @param string $badgeLink
119 119
  * @return mixed|string
120 120
  */
121
-function generateLPFinalItemTemplate($lpItemId, $courseCode, $sessionId=0, $downloadCertificateLink='', $badgeLink='')
121
+function generateLPFinalItemTemplate($lpItemId, $courseCode, $sessionId = 0, $downloadCertificateLink = '', $badgeLink = '')
122 122
 {
123 123
     $documentInfo = DocumentManager::get_document_data_by_id(
124 124
         $lpItemId,
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
  * @param int $sessionId
142 142
  * @return string HTML string for badges
143 143
  */
144
-function generateLPFinalItemTemplateBadgeLinks($userId, $courseId, $sessionId=0)
144
+function generateLPFinalItemTemplateBadgeLinks($userId, $courseId, $sessionId = 0)
145 145
 {
146 146
     $skillRelUser = new SkillRelUser();
147 147
     $userSkills = $skillRelUser->get_user_skills($userId, $courseId, $sessionId);
@@ -156,19 +156,19 @@  discard block
 block discarded – undo
156 156
                                     <div class='row'>
157 157
                                         <div class='col-md-2 col-xs-6'>
158 158
                                             <div class='thumbnail'>
159
-                                              <img class='skill-badge-img' src='" . $oneSkill['web_icon_path'] . "' >
159
+                                              <img class='skill-badge-img' src='" . $oneSkill['web_icon_path']."' >
160 160
                                             </div>
161 161
                                         </div>
162 162
                                         <div class='col-md-8 col-xs-6'>
163
-                                            <h5><b>" . $oneSkill['name'] . "</b></h5>
164
-                                            " . $oneSkill['description'] . "
163
+                                            <h5><b>" . $oneSkill['name']."</b></h5>
164
+                                            " . $oneSkill['description']."
165 165
                                         </div>
166 166
                                         <div class='col-md-2 col-xs-12'>
167
-                                            <h5><b>" . get_lang('ShareWithYourFriends') . "</b></h5>
168
-                                            <a href='http://www.facebook.com/sharer.php?u=" . api_get_path(WEB_PATH) . "badge/" . $oneSkill['id'] . "/user/" . $userId . "' target='_new'>
167
+                                            <h5><b>" . get_lang('ShareWithYourFriends')."</b></h5>
168
+                                            <a href='http://www.facebook.com/sharer.php?u=" . api_get_path(WEB_PATH)."badge/".$oneSkill['id']."/user/".$userId."' target='_new'>
169 169
                                                 <em class='fa fa-facebook-square fa-3x text-info' aria-hidden='true'></em>
170 170
                                             </a>
171
-                                            <a href='https://twitter.com/home?status=" . api_get_path(WEB_PATH) . "badge/" . $oneSkill['id'] . "/user/" . $userId . "' target='_new'>
171
+                                            <a href='https://twitter.com/home?status=" . api_get_path(WEB_PATH)."badge/".$oneSkill['id']."/user/".$userId."' target='_new'>
172 172
                                                 <em class='fa fa-twitter-square fa-3x text-light' aria-hidden='true'></em>
173 173
                                             </a>
174 174
                                         </div>
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         $badgeLink .= "
179 179
                                 <div class='panel panel-default'>
180 180
                                     <div class='panel-body'>
181
-                                        <h3 class='text-center'>" . get_lang('AdditionallyYouHaveObtainedTheFollowingSkills') . "</h3>
181
+                                        <h3 class='text-center'>" . get_lang('AdditionallyYouHaveObtainedTheFollowingSkills')."</h3>
182 182
                                         $skillList
183 183
                                     </div>
184 184
                                 </div>
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
  */
195 195
 function generateLPFinalItemTemplateCertificateLinks($certificate)
196 196
 {
197
-    $downloadCertificateLink = Display::url(Display::returnFontAwesomeIcon('file-pdf-o') .
197
+    $downloadCertificateLink = Display::url(Display::returnFontAwesomeIcon('file-pdf-o').
198 198
         get_lang('DownloadCertificatePdf'),
199 199
         $certificate['pdf_url'],
200 200
         ['class' => 'btn btn-default']
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
     $downloadCertificateLink = "
204 204
                             <div class='panel panel-default'>
205 205
                                 <div class='panel-body'>
206
-                                    <h3 class='text-center'>" . get_lang('NowDownloadYourCertificateClickHere') . "</h3>
206
+                                    <h3 class='text-center'>" . get_lang('NowDownloadYourCertificateClickHere')."</h3>
207 207
                                     <div class='text-center'>$downloadCertificateLink $viewCertificateLink</div>
208 208
                                 </div>
209 209
                             </div>
Please login to merge, or discard this patch.