@@ -51,7 +51,8 @@ discard block |
||
| 51 | 51 | ?> |
| 52 | 52 | <span class="grey">(It's you)</span> |
| 53 | 53 | <?php |
| 54 | - else: |
|
| 54 | + else { |
|
| 55 | + : |
|
| 55 | 56 | ?> |
| 56 | 57 | <form action="" method="post" style="display: inline-block;"> |
| 57 | 58 | <input type="hidden" name="file_id" value="<?= $id ?>"/> |
@@ -63,6 +64,7 @@ discard block |
||
| 63 | 64 | </form> |
| 64 | 65 | <?php |
| 65 | 66 | endif; |
| 67 | + } |
|
| 66 | 68 | ?> |
| 67 | 69 | </li> |
| 68 | 70 | <?php |
@@ -6,9 +6,12 @@ |
||
| 6 | 6 | <li><a href="<?= base_url() ?>sap/portal/">Dashboard</a></li> |
| 7 | 7 | <li><a href="<?= base_url() ?>sap/portal/leaderboard">Leaderboard</a></li> |
| 8 | 8 | <li><a href="<?= base_url() ?>sap/logout/">Logout</a></li> |
| 9 | - <?php else: ?> |
|
| 9 | + <?php else { |
|
| 10 | + : ?> |
|
| 10 | 11 | <li><a href="<?= base_url() ?>sap/login/">Login</a></li> |
| 11 | - <?php endif; ?> |
|
| 12 | + <?php endif; |
|
| 13 | +} |
|
| 14 | +?> |
|
| 12 | 15 | </ul> |
| 13 | 16 | <a href="javascript:void(0)" class="menu-toggle-button">≡</a> |
| 14 | 17 | </a> |
@@ -64,7 +64,8 @@ discard block |
||
| 64 | 64 | <input type="hidden" name="user-id" value="<?= $user['id'] ?>"> |
| 65 | 65 | <button class="btn btn-green">Resend email</button> |
| 66 | 66 | </form> |
| 67 | - <?php else: ?> |
|
| 67 | + <?php else { |
|
| 68 | + : ?> |
|
| 68 | 69 | <form method="post" |
| 69 | 70 | action="<?= base_url() ?>sap/portal/users/approve/<?= $user['id'] ?>" |
| 70 | 71 | onsubmit="return confirm('Are you sure you want to approve <?= htmlspecialchars($user['name']) ?>?')"> |
@@ -82,6 +83,8 @@ discard block |
||
| 82 | 83 | <?php endforeach ?> |
| 83 | 84 | </table> |
| 84 | 85 | </div> |
| 85 | - <?php $this->load_fragment('google_analytics'); ?> |
|
| 86 | + <?php $this->load_fragment('google_analytics'); |
|
| 87 | +} |
|
| 88 | +?> |
|
| 86 | 89 | </body> |
| 87 | 90 | </html> |
@@ -15,7 +15,8 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | An admin has approved your submission! :D |
| 17 | 17 | |
| 18 | -<?php else: ?> |
|
| 18 | +<?php else { |
|
| 19 | + : ?> |
|
| 19 | 20 | |
| 20 | 21 | Unfortunately, an admin has rejected your submission. :/ |
| 21 | 22 | |
@@ -24,7 +25,9 @@ discard block |
||
| 24 | 25 | |
| 25 | 26 | <?= $reason ?> |
| 26 | 27 | |
| 27 | -<?php endif; ?> |
|
| 28 | +<?php endif; |
|
| 29 | +} |
|
| 30 | +?> |
|
| 28 | 31 | <?php endif; ?> |
| 29 | 32 | |
| 30 | 33 | Link to mission: <?= $mission_url?> |
@@ -24,14 +24,17 @@ |
||
| 24 | 24 | <?php endif; ?> |
| 25 | 25 | <?php if ($approved): ?> |
| 26 | 26 | <p>An admin has approved your submission! :D</p> |
| 27 | - <?php else: ?> |
|
| 27 | + <?php else { |
|
| 28 | + : ?> |
|
| 28 | 29 | <p>Unfortunately, an admin has rejected your submission. :/</p> |
| 29 | 30 | <?php if (isset($reason)): ?> |
| 30 | 31 | <p>The reason given was:</p> |
| 31 | 32 | <blockquote> |
| 32 | 33 | <?= $reason ?> |
| 33 | 34 | </blockquote> |
| 34 | - <?php endif; ?> |
|
| 35 | + <?php endif; |
|
| 36 | +} |
|
| 37 | +?> |
|
| 35 | 38 | <?php endif; ?> |
| 36 | 39 | <p>Link to mission: <a href="<?= $mission_url ?>"><?= $mission_url?> </a></p> |
| 37 | 40 | <p> |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | <?php if (isset($mission['description'])): ?> |
| 22 | 22 | <p><?= linkify(nl2br(htmlspecialchars($mission['description']))) ?></p> |
| 23 | 23 | <?php endif; ?> |
| 24 | - <?php if(!$mission['published']): ?> |
|
| 24 | + <?php if (!$mission['published']): ?> |
|
| 25 | 25 | <p>This mission is unpublished.</p> |
| 26 | 26 | <form method="post" action="./publish"> |
| 27 | 27 | <button type="submit" class="btn btn-red">Publish mission</button> |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | </strong> |
| 41 | 41 | </p> |
| 42 | 42 | <?php if ($is_admin): ?> |
| 43 | - <?php if(!$mission['published']): ?> |
|
| 43 | + <?php if (!$mission['published']): ?> |
|
| 44 | 44 | <a href="./createtask/" class="btn btn-green">Create new task</a> |
| 45 | 45 | <?php endif; ?> |
| 46 | 46 | <a href="../../review/mission/<?= $mission['id'] ?>/" class="btn btn-blue"> |
@@ -66,7 +66,8 @@ discard block |
||
| 66 | 66 | <?php elseif ($task['submission']['done'] == 1): ?> |
| 67 | 67 | <p class="text-success"><strong>Done! :)</strong></p> |
| 68 | 68 | <?php endif; ?> |
| 69 | - <?php else: ?> |
|
| 69 | + <?php else { |
|
| 70 | + : ?> |
|
| 70 | 71 | <form class="block" method="post" action="./submittask/"> |
| 71 | 72 | <p><?= linkify(nl2br(htmlspecialchars($task['description']))) ?></p> |
| 72 | 73 | <?php if (isset($task['submission']) && $task['submission']['done'] == 2): ?> |
@@ -76,7 +77,9 @@ discard block |
||
| 76 | 77 | <strong>Reason given</strong>:<br> |
| 77 | 78 | <?= nl2br(htmlspecialchars($task['submission']['reason'])) ?> |
| 78 | 79 | </p> |
| 79 | - <?php endif; ?> |
|
| 80 | + <?php endif; |
|
| 81 | +} |
|
| 82 | +?> |
|
| 80 | 83 | <?php endif; ?> |
| 81 | 84 | <?php if ($task['has_text_answer']): ?> |
| 82 | 85 | <textarea name="text-answer" required></textarea> |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | foreach ($user_scores as $user_score) { |
| 23 | 23 | $name = $user_score['name']; |
| 24 | 24 | $score = $user_score['score']; |
| 25 | - if ($score_prev > $score){ |
|
| 25 | + if ($score_prev > $score) { |
|
| 26 | 26 | $score_prev = $score; |
| 27 | 27 | $rank += 1; |
| 28 | 28 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | - $this->load_fragment('auth/form_header', ['heading' => __('Forgot your password?') ]); |
|
| 2 | + $this->load_fragment('auth/form_header', ['heading' => __('Forgot your password?')]); |
|
| 3 | 3 | ?> |
| 4 | 4 | <?php if ($sent): ?> |
| 5 | 5 | <div class="success"><?= __('Mail sent!') ?></div> |
@@ -3,7 +3,8 @@ discard block |
||
| 3 | 3 | ?> |
| 4 | 4 | <?php if ($sent): ?> |
| 5 | 5 | <div class="success"><?= __('Mail sent!') ?></div> |
| 6 | -<?php else: ?> |
|
| 6 | +<?php else { |
|
| 7 | + : ?> |
|
| 7 | 8 | <p><?= __('Please enter your email address.') ?></p> |
| 8 | 9 | <form action="" method="post" class="pure-form pure-form-stacked"> |
| 9 | 10 | <fieldset> |
@@ -13,5 +14,7 @@ discard block |
||
| 13 | 14 | <input type="submit" name="register" value="<?= __('Next') ?>" class="pure-button pure-button-primary"> |
| 14 | 15 | </fieldset> |
| 15 | 16 | </form> |
| 16 | -<?php endif; ?> |
|
| 17 | +<?php endif; |
|
| 18 | +} |
|
| 19 | +?> |
|
| 17 | 20 | <?php $this->load_fragment('auth/form_footer'); ?> |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | - $this->load_fragment('auth/form_header', ['heading' => __('Email successfully verified!') ]); |
|
| 2 | + $this->load_fragment('auth/form_header', ['heading' => __('Email successfully verified!')]); |
|
| 3 | 3 | ?> |
| 4 | 4 | <div class="row"> |
| 5 | 5 | <div class="col6 offset3 text-center"> |