Completed
Branch master (1de524)
by Seth
09:29
created
js/relative-grades.js.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 define('MEDIAN_STROKE', '#fff'); // white
13 13
 define('MEDIAN_FILL', THIRD_QUARTILE_FILL);
14 14
 define('FIRST_QUARTILE_STROKE', TRANSPARENT);
15
-define('FIRST_QUARTILE_FILL', '#ffe399');  // light yellow
15
+define('FIRST_QUARTILE_FILL', '#ffe399'); // light yellow
16 16
 define('LOW_STROKE', '#ff3f0c'); // medium red
17 17
 define('LOW_FILL', '#fff'); // white
18 18
 define('SCORE_STROKE', '#000'); // black
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		$first_quartiles = array();
55 55
 		$third_quartiles = array();
56 56
 		$scores = array();
57
-		foreach($analytic as $data) {
57
+		foreach ($analytic as $data) {
58 58
 			if ($data['points_possible'] > 0 && $data['max_score'] > 0) {
59 59
 				$labels[] = ''; // htmlentities($data['title']);
60 60
 				$max_scores[] = normalize($data['max_score'], $data['points_possible']);
Please login to merge, or discard this patch.
account/rename-advisory-groups.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
                         'course[course_code]' => $courseName
32 32
                     ]);
33 33
                     $sections = $toolbox->api_get("courses/{$course['id']}/sections");
34
-                    foreach($sections as $section) {
34
+                    foreach ($sections as $section) {
35 35
                         if ($section['name'] == $course['name']) {
36 36
                             $toolbox->api_put("sections/{$sections[0]['id']}", [
37 37
                                 'course_section[name]' => $courseName
Please login to merge, or discard this patch.
account/create-advisor-observers.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             $created = 0;
65 65
             $reset = 0;
66 66
 
67
-            foreach($advisories as $advisory) {
67
+            foreach ($advisories as $advisory) {
68 68
                 /* cache the teacher */
69 69
                 $advisors = $toolbox->api_get("courses/{$advisory['id']}/users", [
70 70
                     'enrollment_role' => 'TeacherEnrollment'
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                 } else {
76 76
                     $toolbox->smarty_addMessage(
77 77
                         "{$advisory['name']}",
78
-                        "No teacher was found in <a target=\"_parent\" href=\"" . $_SESSION[CANVAS_INSTANCE_URL]. "/courses/{$advisory['id']}\">this advisory</a> and it was skipped.",
78
+                        "No teacher was found in <a target=\"_parent\" href=\"" . $_SESSION[CANVAS_INSTANCE_URL] . "/courses/{$advisory['id']}\">this advisory</a> and it was skipped.",
79 79
                         NotificationMessage::ERROR
80 80
                     );
81 81
                     break;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                     'enrollment_role' => 'StudentEnrollment'
88 88
                 ]);
89 89
 
90
-                foreach($advisees as $advisee) {
90
+                foreach ($advisees as $advisee) {
91 91
 
92 92
                     /* generate what the advisor account info should be */
93 93
                     $observer = [
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                         $communicationChannels = $toolbox->api_get("users/{$existing['id']}/communication_channels");
126 126
                         $emailExists = false;
127 127
                         $channelsToDelete = [];
128
-                        foreach($communicationChannels as $communicationChannel) {
128
+                        foreach ($communicationChannels as $communicationChannel) {
129 129
                             if ($communicationChannel['address'] != $observer['email']) {
130 130
                                 $channelsToDelete[] = $communicationChannel['id'];
131 131
                             } else {
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                                 'position' => 1
141 141
                             ]);
142 142
                         }
143
-                        foreach($channelsToDelete as $channelToDelete) {
143
+                        foreach ($channelsToDelete as $channelToDelete) {
144 144
                             $toolbox->api_delete("users/{$existing['id']}/communication_channels/{$channelToDelete}");
145 145
                         }
146 146
 
Please login to merge, or discard this patch.
common.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 if (empty($_SESSION[Toolbox::class])) {
19 19
     $_SESSION[Toolbox::class] = Toolbox::fromConfiguration(CONFIG_FILE);
20 20
 }
21
-$toolbox =& $_SESSION[Toolbox::class];
21
+$toolbox = & $_SESSION[Toolbox::class];
22 22
 $toolbox->smarty_assign('category', DataUtilities::titleCase(preg_replace('/[\-_]+/', ' ', basename(__DIR__))));
23 23
 
24 24
 /* set the Tool Consumer's instance URL, if present */
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +4 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
 /* store any requested actions for future handling */
15 15
 $action = (empty($_REQUEST['action']) ?
16
-    ACTION_UNSPECIFIED :
17
-    strtolower($_REQUEST['action'])
16
+    ACTION_UNSPECIFIED : strtolower($_REQUEST['action'])
18 17
 );
19 18
 
20 19
 /* action requests only come from outside the LTI! */
@@ -30,7 +29,7 @@  discard block
 block discarded – undo
30 29
     @session_unset();
31 30
     @session_start();
32 31
     @session_regenerate_id(true);
33
-    $_SESSION[Toolbox::class] =& $toolbox;
32
+    $_SESSION[Toolbox::class] = & $toolbox;
34 33
     session_write_close();
35 34
     $toolbox->lti_authenticate();
36 35
     exit;
@@ -49,8 +48,7 @@  discard block
 block discarded – undo
49 48
 /* if not authenticated, default to showing credentials */
50 49
 } else {
51 50
     $action = (empty($action) ?
52
-        ACTION_CONFIG :
53
-        $action
51
+        ACTION_CONFIG : $action
54 52
     );
55 53
 }
56 54
 
@@ -60,7 +58,7 @@  discard block
 block discarded – undo
60 58
     /* reset cached install data from config file */
61 59
     case ACTION_INSTALL: {
62 60
         $_SESSION['toolbox'] = Toolbox::fromConfiguration(CONFIG_FILE, true);
63
-        $toolbox =& $_SESSION['toolbox'];
61
+        $toolbox = & $_SESSION['toolbox'];
64 62
 
65 63
         /* test to see if we can connect to the API */
66 64
         try {
Please login to merge, or discard this patch.
course/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-header ('Location: relative-grades.php');
3
+header('Location: relative-grades.php');
4 4
 exit;
Please login to merge, or discard this patch.