Activity Feed
- Posted Trying to use LTI 1.3 NRPS on canvas test environment, but get token error on Canvas Developers Group. 08-19-2021 08:26 AM
- Got a Kudo for Re: "UDOIT FAILED TO SCAN THIS COURSE". 08-06-2020 01:59 AM
- Got a Kudo for Re: "UDOIT FAILED TO SCAN THIS COURSE". 12-18-2018 07:05 AM
- Got a Kudo for Re: "UDOIT FAILED TO SCAN THIS COURSE". 12-17-2018 01:30 PM
- Posted Re: "UDOIT FAILED TO SCAN THIS COURSE" on Accessibility. 12-17-2018 12:30 PM
- Posted Re: UDOIT Version 2.3.5 on Accessibility. 12-17-2018 12:03 PM
- Kudoed Re: UDOIT Version 2.3.5 for tr_jbates. 12-17-2018 11:54 AM
- Posted Re: UDOIT Information on Accessibility. 10-10-2018 12:16 PM
- Got a Kudo for Re: All thing API. 04-05-2017 10:05 AM
- Got a Kudo for Re: All thing API. 04-05-2017 07:20 AM
- Posted Re: All thing API on Canvas Developers Group. 04-05-2017 07:03 AM
- Got a Kudo for Re: All thing API. 12-06-2016 03:03 PM
- Got a Kudo for Re: All thing API. 12-06-2016 11:12 AM
- Got a Kudo for Re: All thing API. 12-06-2016 09:39 AM
- Got a Kudo for Re: All thing API. 12-06-2016 09:39 AM
- Posted Re: All thing API on Canvas Developers Group. 12-06-2016 09:38 AM
- Kudoed Re: All thing API for kenneth_larsen. 12-06-2016 09:38 AM
- Posted Re: All thing API on Canvas Developers Group. 12-06-2016 09:24 AM
- Got a Kudo for Re: All thing API. 12-05-2016 03:39 PM
- Got a Kudo for Re: All thing API. 12-05-2016 03:39 PM
My Posts
Post Details | Date Published | Views | Kudos |
---|---|---|---|
Trying to use LTI 1.3 NRPS on canvas test environment, but get token error Hello, We're planning to enable Names and Roles Provisioning Service on our LTI1.3. tool, but were not be able to obtain an auth access token from beta or test environment to retrieve the user enro... |
08-19-2021 |
370 |
0 |
08-19-2021
08:26 AM
Hello,
We're planning to enable Names and Roles Provisioning Service on our LTI1.3. tool, but were not be able to obtain an auth access token from beta or test environment to retrieve the user enrollments from the course on the claim (attached error). We could obtain auth access token to retrieve enrollments in canvas production environment. Is some extra setting or configuration need to use NRPS on canvas test environment? Any ideas?
Thanks,
Ruiling
... View more
12-17-2018
12:30 PM
2 Kudos
Sure Jacob. Santhosh passed your message to me. I just twisted some change for our institution purpose on saved_resports.php to show local time zone, and would be happy to contribute the changes to the project if need. Feel free to ping me the instruction to checked in the changes. Thanks, Ruiling
... View more
12-17-2018
12:03 PM
Hi Jacob, Our institution had similar question regarding the Vimeo key. In the past, we didn't setup vimeo api key, if there's error if some canvas course did have vimeo content. We use some Kaltura for video content, first is there some parameter on the config which we could disable scanning on vimeo video? Second, instead could we twist on config to point to scan on Kaltura for media content instead of Vimeo? Thanks! Ruiling
... View more
10-10-2018
12:16 PM
Thanks Jacob. Make progress! By twisting my local config with curl_ssl_verify and also modified xml domain with https, now the app displayed correctly and linked to canvas. But when I scanned the course(very simple test course), it showed 'UDOIT failed to scan this course'. Looked into the log under /var/log/httpd. there's indicated: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/phpudoit/config/log.log" could not be opened: failed to open stream: Permission denied' in /var/www/phpudoit/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:.... the source structure I put Document root to my 'public' folder, so config/ is set under /var/www. the folder var/www I already gave all rw permission to ec2-user. so why write permission failed? is other place I need set permission? Where is the good place to see the detail log? thanks! Ruiling
... View more
04-05-2017
07:03 AM
2 Kudos
First you need have your authorized user's access token. then in php, pass in your authorized tokenHeader, and pass as_user_id parameter to masquerade the userid who you are authorized to access the profile. e.g. $asuser = array ('as_user_id' => $userid); $user = http_build_query($asuser, '', '&'); ... curl_setopt($ch, CURLOPT_URL, $canvasapiUrl' . '?'. $user); Hopefully it helps.
... View more
12-06-2016
09:38 AM
2 Kudos
No Garth. I didn't pass sub folder id, my understanding the passing parent_folder_path would created if doesn't exist. according to canvas fileupload api guidedoc: "parent_folder_path: The path of the folder to store the file in. The path separator is the forward slash `/`, never a back slash. The folder will be created if it does not already exist. This parameter only applies to file uploads in a context that has folders, such as a user, a course, or a group. If this and parent_folder_id are sent an error will be returned. If neither is given, a default folder will be used"
... View more
12-06-2016
09:24 AM
2 Kudos
Thanks Kenneth, We have similar file structure as yours, but we don't have sub_folder 'my_files'. but even though I manually add the folder 'my_files' under root folder My Files, then pass in the parent_folder_path="my_files/test". after uploadfile api call, the new folder 'unfiled' is created, and the file is uploaded in 'unfiled' folder, while not in the expected my_files folder. Here below is the cUrl I used to call the API: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url ); //url for api/v1/users/{id}/files curl_setopt ($ch, CURLOPT_HTTPHEADER, $tokenHeader);//Authorization curl_setopt($ch, CURLOPT_POST, count($fields)); // TRUE curl_setopt($ch, CURLOPT_POSTFIELDS, $step1_params); //step1_params :name=test.pdf&size=228394&parent_folder_path=test&content_type=application%2Fpdf" curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // capture the response to a variable $response = curl_exec($ch); curl_close($ch); What does the upload_params look like in your uploadfile api call response? One place I noted in the upload_params on my response, the key is indicated under ../attachments/, but canvas API document give sample response result as " "key": ".../files/testfile". but not sure if related. array(9) { 'AWSAccessKeyId' =>string(20) "testid" 'Filename' => string(50) "test.pdf" 'key' =>string(96) "account_45110000000000001/attachments/2308001/test.pdf" ...} Thanks! Ruiling
... View more
12-05-2016
01:41 PM
1 Kudo
Thanks Kenneth for your reply. I tried both add "my_files" or "./my_files" to parent_folder_path parameter like below. but the file still pulled the file in default "unfiled" folder but not creating new "testfolder" . Is it "my_files" a static foldername? Thanks! array(4) { 'name' => string(50) "mytestfile.pdf" 'size' => int(228394) 'parent_folder_path' => string(20) "my_files/testfolder" 'content_type' => string(15) "application/pdf" }
... View more
12-05-2016
12:48 PM
1 Kudo
Hello all, Question regarding to upload new file; We are to upload some report file to user's File. I called Canvas uploadfile API passing the file parameters via guideline Uploading Files - Canvas LMS REST API Documentation . The file was uploaded correctly, but uploaded in the user's default File foder 'unfiled' instead of creating a new folder I defined in 'parent_folder_path' parameter passing in API call, It used to work correctly creating and uploading the file in a new folder specified in 'parent_folder_path'. Anyone has idea or experience using the uploadingfile api recently? Thanks in advance, Ruiling
... View more
02-08-2016
11:25 AM
1 Kudo
Thanks Martin. Actually the folder looks like works correctly for me, Since from UI, I could see the folder was created after the POST request was completed (no matter there's a space in the folder name or not). The issue is the name of the file wasn't passed in via my POST. Thanks,
... View more
02-08-2016
11:02 AM
1 Kudo
Hi Kenneth, Thanks for your reply. Yes. The original filedata I was testing on POST was string 'name=words.txt&size=475954&content_type=text/plain&parent_folder_path=Eval Reports/Fall2015'. I simplified the note on the code paste above. I did just tried the suggestion you gave, changed the folder name without space, but still didn't got the file name passed in. Thanks,
... View more
02-08-2016
09:09 AM
2 Kudos
Hey, I am new to use Canvas API. I am trying now to upload file into the user's file section via API. By reading the uploading file document described @ https://canvas.instructure.com/doc/api/file.file_uploads.html. I tested to upload the file via POST using php cURL below , but looks like the name of the file wasn't pass in. Any one have idea why the file name got failed to post, or I misunderstood something here? Thanks in advance! //CURL POST File <?php //path to test user's file section $apiUrl = 'users/' . $testuserid .'/files' ; $uploadfolder ='Upload testfolder' //test data information $content_type = "text/plain"; $name = 'test.txt'; $size=filesize("./test.txt"); $parent_folder_path =$uploadfolder; //new folder $postdata = 'content_type=' . $content_type . '&name=' . urlencode($name) . '&size=' . $size . '&parent_folder_path=' . $parent_folder_path; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, TESTINSTANCE . '/api/v1/' . $url); //api target post url curl_setopt ($ch, CURLOPT_HTTPHEADER, AUTHINFO);//Authorization curl_setopt($ch, CURLOPT_POST,1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata); //file information curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($ch); curl_close($ch); echo $response; ?> //POSTDATA and RESPONSE DUMP string 'name=words.txt&size=475954&content_type=text/plain&parent_folder_path=Upload test folder' (length=91) array (size=3) 'upload_url' => string 'https://instructure-uploads.s3.amazonaws.com/' (length=45) 'upload_params' => array (size=8) 'AWSAccessKeyId' => string 'XXXXXXXXX' (length=20) 'Filename' => string '' (length=0) 'key' => string 'XXXXXXXXXXXXX' (length=54) 'acl' => string 'private' (length=7) 'Policy' => string 'XXXXXXXXXXXXX' (length=564) 'Signature' => string 'XXXXXXXXXXXXX' (length=28) 'success_action_redirect' => string 'XXXXXXXXXXXXXXX' (length=112) 'content-type' => string 'text/plain' (length=10) 'file_param' => string 'file' (length=4)
... View more