Completed
Branch master (30b563)
by Seth
04:44
created
common.inc.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 
6 6
 use smtech\CanvasManagement\Toolbox;
7 7
 use smtech\ReflexiveCanvasLTI\LTI\ToolProvider;
8
-use smtech\ReflexiveCanvasLTI\Exception\ConfigurationException;
9 8
 use Battis\DataUtilities;
10 9
 
11 10
 @session_start(); // TODO suppressing warnings is wrong
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 if (empty($_SESSION[Toolbox::class])) {
15 15
     $_SESSION[Toolbox::class] = Toolbox::fromConfiguration(CONFIG_FILE);
16 16
 }
17
-$toolbox =& $_SESSION[Toolbox::class];
17
+$toolbox = & $_SESSION[Toolbox::class];
18 18
 
19 19
 /* set the Tool Consumer's instance URL, if present */
20 20
 if (empty($_SESSION[CANVAS_INSTANCE_URL]) &&
Please login to merge, or discard this patch.
one-offs/archive-inbox.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 require_once('common.inc.php');
4 4
 
5 5
 use Battis\BootstrapSmarty\NotificationMessage;
6
-
7 6
 use smtech\StMarksSmarty\StMarksSmarty;
8 7
 
9 8
 $toolbox->getSmarty()->enable(StMarksSmarty::MODULE_DATEPICKER);
Please login to merge, or discard this patch.
src/Toolbox.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Battis\BootstrapSmarty\NotificationMessage;
6 6
 use Battis\HierarchicalSimpleCache;
7
-
8 7
 use smtech\LTI\Configuration\Option;
9 8
 
10 9
 class Toolbox extends \smtech\StMarksReflexiveCanvasLTI\Toolbox
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@
 block discarded – undo
136 136
                 print_r($this->getAPI()->last_request, true) .
137 137
                 '</pre><p>Last Headers</p><pre>' .
138 138
                 print_r($this->getAPI()->last_headers, true) .
139
-                '</pre><p>Error Message</p><pre>' . $e->getMessage() .'</pre>',
139
+                '</pre><p>Error Message</p><pre>' . $e->getMessage() . '</pre>',
140 140
             NotificationMessage::ERROR
141 141
         );
142 142
     }
Please login to merge, or discard this patch.
courses/publish-courses.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
                 );
31 31
                 $list[] = "<a target=\"_parent\" href=\"{$_SESSION[CANVAS_INSTANCE_URL]}/courses/{$course['id']}\">{$course['name']}</a>";
32 32
             }
33
-            $toolbox->smarty_addMessage($courses->count(). ' courses published', implode(', ', $list), NotificationMessage::GOOD);
33
+            $toolbox->smarty_addMessage($courses->count() . ' courses published', implode(', ', $list), NotificationMessage::GOOD);
34 34
         } catch (Exception $e) {
35 35
             $toolbox->exceptionErrorMessage($e);
36 36
         }
Please login to merge, or discard this patch.
custom-preferences/color-blocks.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@
 block discarded – undo
61 61
                     $sections = $toolbox->api_get("courses/{$course['id']}/sections");
62 62
                     foreach ($sections as $section) {
63 63
                         $sis_course_id = (isset($parentCourses[$section['sis_section_id']]) ?
64
-                                $parentCourses[$section['sis_section_id']] :
65
-                                false
64
+                                $parentCourses[$section['sis_section_id']] : false
66 65
                             );
67 66
                         if ($sis_course_id === false) {
68 67
                             $parentCourse = $course;
Please login to merge, or discard this patch.
custom-preferences/assign-user-roles.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 $cache = new \Battis\HierarchicalSimpleCache($sql, basename(__DIR__));
8 8
 $cache->pushKey(basename(__FILE__, '.php'));
9
-$cache->setLifetime(60*60);
9
+$cache->setLifetime(60 * 60);
10 10
 
11 11
 define('STEP_INSTRUCTIONS', 1);
12 12
 define('STEP_LISTING', 2);
Please login to merge, or discard this patch.
custom-preferences/apply-enrollment-rules.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Battis\BootstrapSmarty\NotificationMessage;
6 6
 
7 7
 $cache = new \Battis\HierarchicalSimpleCache($sql, basename(__DIR__) . '/' . basename(__FILE__, '.php'));
8
-$cache->setLifetime(60*60);
8
+$cache->setLifetime(60 * 60);
9 9
 
10 10
 define('ENROLL', true);
11 11
 // DELETE is the enrollment ID to be deleted (i.e. not a boolean value)
Please login to merge, or discard this patch.
enrollment/download-enrollments.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
                                 );
51 51
                             }
52 52
                         }
53
-                        $cache->setCache('enrollments', $data, 15*60);
53
+                        $cache->setCache('enrollments', $data, 15 * 60);
54 54
                     }
55 55
                     $toolbox->smarty_assign('account', $_REQUEST['account']);
56 56
                     $toolbox->smarty_assign('term', $_REQUEST['term']);
Please login to merge, or discard this patch.
enrollment/enroll-users.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -148,8 +148,7 @@
 block discarded – undo
148 148
                         $enrollment = $toolbox->api_post(
149 149
                             (
150 150
                                 $courseEnrollment ?
151
-                                "/courses/{$_REQUEST['course']}/enrollments" :
152
-                                "/sections/{$_REQUEST['section']}/enrollments"
151
+                                "/courses/{$_REQUEST['course']}/enrollments" : "/sections/{$_REQUEST['section']}/enrollments"
153 152
                             ),
154 153
                             array(
155 154
                                 'enrollment[user_id]' => $user['id'],
Please login to merge, or discard this patch.