@@ -434,21 +434,21 @@ function tincanlaunch_get_creds_watershed($login, $pass, $endpoint, $expiry) {
434434 $ activityproviderid = $ getactivityproviderresponse ['content ' ]->results [0 ]->id ;
435435
436436 // Create a session.
437- $ createSessionResponse = tincanlaunch_send_api_request (
437+ $ createsessionresponse = tincanlaunch_send_api_request (
438438 $ auth ,
439439 "POST " ,
440- $ wsserver . "/api/organizations/ " . $ orgid . "/activity-providers/ "
440+ $ wsserver . "/api/organizations/ " . $ orgid . "/activity-providers/ "
441441 . $ activityproviderid . "/sessions?expireSeconds= " . $ expiry
442442 );
443443
444- if ($ createSessionResponse ["status " ] === 200 ) {
444+ if ($ createsessionresponse ["status " ] === 200 ) {
445445 return [
446- "key " => $ createSessionResponse ["content " ]->key ,
447- "secret " => $ createSessionResponse ["content " ]->secret
446+ "key " => $ createsessionresponse ["content " ]->key ,
447+ "secret " => $ createsessionresponse ["content " ]->secret
448448 ];
449449 } else {
450450 $ reason = get_string ('apCreationFailed ' , 'tincanlaunch ' )
451- ." Status: " . $ createSessionResponse ["status " ].". Response: " .$ createSessionResponse ["content " ]."<br/> " ;
451+ ." Status: " . $ createsessionresponse ["status " ].". Response: " .$ createsessionresponse ["content " ]."<br/> " ;
452452 throw new moodle_exception ($ reason , 'tincanlaunch ' , '' );
453453 }
454454}
@@ -483,7 +483,7 @@ function tincanlaunch_send_api_request($auth, $method, $url) {
483483 'method ' => $ method ,
484484 'header ' => array ()
485485 );
486-
486+
487487 array_push ($ http ['header ' ], 'Authorization: ' . $ auth );
488488
489489 if (($ method === 'PUT ' || $ method === 'POST ' ) && isset ($ options ['content ' ])) {
0 commit comments