Completed
Push — develop ( f57c6e...f06e67 )
by Seth
08:56 queued 06:28
created
classes/UserAPIToken.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
116 116
 				UserAPIToken_Exception::TOKEN_REQUIRED
117 117
 			);
118 118
 		}
119
-		if($this->consumerKey && $this->id && $this->sql) {
119
+		if ($this->consumerKey && $this->id && $this->sql) {
120 120
 			$_token = $this->sql->real_escape_string($token);
121 121
 			if (!$this->sql->query("UPDATE `" . self::USER_TOKENS_TABLE . "` set `token` = '$_token' WHERE `consumer_key` = '{$this->consumerKey}' AND `id` = '{$this->id}'")) {
122 122
 				throw new UserAPIToken_Exception(
Please login to merge, or discard this patch.
classes/CanvasAPIviaLTI_Installer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 						}
97 97
 						
98 98
 						$htaccessFile = __DIR__ . '/.htaccess';
99
-						if(!file_put_contents($htaccessFile, "AuthType Basic\nAuthName \"{$secrets->app->name} Admin\"\nAuthUserFile $htpasswdFile\nRequire valid-user\n")) {
99
+						if (!file_put_contents($htaccessFile, "AuthType Basic\nAuthName \"{$secrets->app->name} Admin\"\nAuthUserFile $htpasswdFile\nRequire valid-user\n")) {
100 100
 							throw new CanvasAPIviaLTI_Installer_Exception(
101 101
 								"Failed to create $htaccessFile",
102 102
 								CanvasAPIviaLTI_Installer_Exception::HTACCESS_FILE
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 		} elseif (file_exists($ltiSchema)) {
155 155
 			$queries = explode(";", file_get_contents($ltiSchema));
156 156
 			$created = true;
157
-			foreach($queries as $query) {
157
+			foreach ($queries as $query) {
158 158
 				if (!empty(trim($query))) {
159 159
 					if (!$sql->query($query)) {
160 160
 						throw new CanvasAPIviaLTI_Installer_Exception(
Please login to merge, or discard this patch.
sync.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 			`synced` ASC
15 15
 ");
16 16
 
17
-while($schedule = $schedulesResponse->fetch_assoc()) {
17
+while ($schedule = $schedulesResponse->fetch_assoc()) {
18 18
 	$calendarResponse = $sql->query("
19 19
 		SELECT *
20 20
 			FROM `calendars`
Please login to merge, or discard this patch.
app.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
 $smarty->assign('category', '');
7 7
 $smarty->assign('formAction', $metadata['APP_URL'] . '/import.php');
8 8
 $smarty->assign('formHidden', array(
9
-	'canvas_url' => $_SESSION['canvasInstanceUrl']. '/courses/' . $_SESSION['toolProvider']->user->getResourceLink()->settings['custom_canvas_course_id']
9
+	'canvas_url' => $_SESSION['canvasInstanceUrl'] . '/courses/' . $_SESSION['toolProvider']->user->getResourceLink()->settings['custom_canvas_course_id']
10 10
 ));
11 11
 $smarty->display('course.tpl');
12 12
 
Please login to merge, or discard this patch.
visualize.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,5 +33,5 @@
 block discarded – undo
33 33
 }
34 34
 
35 35
 $smarty->assign('ics', $ics);
36
-$smarty->assign('veventProperties', array('unique' => array('CLASS','CREATED','SUMMARY','DESCRIPTION','DTSTART','X-CURRENT-DTSTART','DTEND','X-CURRENT-DTEND','DURATION','GEO','LAST-MOD','LOCATION','ORGANIZER','PRIORITY','DTSTAMP','SEQ','STATUS','TRANSP','UID','URL','RECURID'),'multiple'=>array('ATTACH','ATTENDEE','CATEGORIES','COMMENT','CONTACT','EXDATE','EXRULE','RSTATUS','RELATED','RESOURCES','RDATE','RRULE','X-PROP')));
36
+$smarty->assign('veventProperties', array('unique' => array('CLASS', 'CREATED', 'SUMMARY', 'DESCRIPTION', 'DTSTART', 'X-CURRENT-DTSTART', 'DTEND', 'X-CURRENT-DTEND', 'DURATION', 'GEO', 'LAST-MOD', 'LOCATION', 'ORGANIZER', 'PRIORITY', 'DTSTAMP', 'SEQ', 'STATUS', 'TRANSP', 'UID', 'URL', 'RECURID'), 'multiple'=>array('ATTACH', 'ATTENDEE', 'CATEGORIES', 'COMMENT', 'CONTACT', 'EXDATE', 'EXRULE', 'RSTATUS', 'RELATED', 'RESOURCES', 'RDATE', 'RRULE', 'X-PROP')));
37 37
 $smarty->display('visualize.tpl');
38 38
\ No newline at end of file
Please login to merge, or discard this patch.
admin/install.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 	
16 16
 /* ...otherwise, let's start with the SECRETS_FILE */
17 17
 } else {
18
-	if(!file_exists(SECRETS_FILE)) {
18
+	if (!file_exists(SECRETS_FILE)) {
19 19
 		if (isset($_REQUEST['step']) && $_REQUEST['step'] == CanvasAPIviaLTI_Installer::SECRETS_ENTERED_STEP) {
20 20
 			CanvasAPIviaLTI_Installer::createSecretsFile(CanvasAPIviaLTI_Installer::SECRETS_ENTERED_STEP);
21 21
 		} else {
Please login to merge, or discard this patch.
purge.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,14 +15,14 @@
 block discarded – undo
15 15
 		)
16 16
 	);
17 17
 	do {
18
-		foreach($events as $event) {
18
+		foreach ($events as $event) {
19 19
 			$api->delete("calendar_events/{$event['id']}",
20 20
 				array(
21 21
 					'cancel_reason' => $metadata['APP_NAME'] . " course_url={$_REQUEST['course_url']}"
22 22
 				)
23 23
 			);
24 24
 		}
25
-	} while($events = $eventsApi->nextPage());
25
+	} while ($events = $eventsApi->nextPage());
26 26
 	
27 27
 	$smarty->assign('content', 'Calendar purged.');
28 28
 } else {
Please login to merge, or discard this patch.
common-app.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
 $FIELD_MAP = array(
86 86
 	'calendar_event[title]' => 'SUMMARY',
87 87
 	'calendar_event[description]' => 'DESCRIPTION',
88
-	'calendar_event[start_at]' => array (
88
+	'calendar_event[start_at]' => array(
89 89
 		0 => 'X-CURRENT-DTSTART',
90 90
 		1 => 'DTSTART'
91 91
 	),
Please login to merge, or discard this patch.
import.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 	$_REQUEST['canvas_url'] = $argv[2];
7 7
 	$_REQUEST['schedule'] = $argv[3];
8 8
 
9
-	define ('IGNORE_LTI', true);
9
+	define('IGNORE_LTI', true);
10 10
 }
11 11
 
12 12
 require_once 'common.inc.php';
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
 	if ($canvasContext = getCanvasContext($_REQUEST['canvas_url'])) {
101 101
 		/* check ICS feed to be sure it exists */
102
-		if(urlExists($_REQUEST['cal'])) {
102
+		if (urlExists($_REQUEST['cal'])) {
103 103
 			/* look up the canvas object -- mostly to make sure that it exists! */
104 104
 			if ($canvasObject = $api->get($canvasContext['verification_url'])) {
105 105
 
@@ -185,10 +185,10 @@  discard block
 block discarded – undo
185 185
 				// TODO:0 the best window for syncing would be the term of the course in question, right? issue:12
186 186
 				// TODO:0 Arbitrarily selecting events in for a year on either side of today's date, probably a better system? issue:12
187 187
 				foreach ($ics->selectComponents(
188
-					date('Y')-1, // startYear
188
+					date('Y') - 1, // startYear
189 189
 					date('m'), // startMonth
190 190
 					date('d'), // startDay
191
-					date('Y')+1, // endYEar
191
+					date('Y') + 1, // endYEar
192 192
 					date('m'), // endMonth
193 193
 					date('d'), // endDay
194 194
 					'vevent', // cType
Please login to merge, or discard this patch.