desire2learn

How to Assign Dynamic Values to Custom Parameters in D2L Basic LTI

牧云@^-^@ 提交于 2019-12-13 01:49:32
问题 Within "Manage External Learning Tools" D2L provides the ability to define custom LTI parameters. I created such a parameter, and I now want to assign a dynamic value to the customer parameter via JavaScript prior to posting the request to the 3rd party provider. For example, the user_id LTI parameter is assigned the D2L-only user ID value which does not align with the campus-wide authentication. However, it is possible to get the campus-wide user ID via JavaScript, and I would like to assign

desire2learn api adding content

谁都会走 提交于 2019-12-12 22:55:00
问题 Whenever I make a GET call to "/d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/content/modules/(D2LID: moduleId)/structure/" I get a list of content in the provided moduleId structure. However, when I make a POST call I get a Page Not Found error. I've replaced the orgUnitId with the id of the course I want to add content to and replaced the moduleId with the id of the module I want to insert the content into. Here is the JSON block I'm sending: {"StartDate":null, "Title":"My Test File",

Error 302 when trying to post D2L topic using multipart

橙三吉。 提交于 2019-12-12 03:52:57
问题 This issue is related to one I posted yesterday but I have uncovered a bit more and am now getting a different error. I removed the code from Android to try straight from Java. I also tried 2 different ways for the multipost information. The userContext has write permission as I can easily create modules. One way I tried: String json = "{\"IsHidden\": false, \"IsLocked\": false, \"ShortTitle\": "Test\", \"Type\": 1, \r\n" + "\"DueDate\": null, \"Url\": \"file.txt\", \r\n" + "\"StartDate\":

How do I export grades from Desire2Learn?

≯℡__Kan透↙ 提交于 2019-12-12 02:54:31
问题 How would an app developer at a school (using Java) export grades from the D2L Instance? If I am building a D2L Valence App that needs to use a utility account (like the approach described: https://stackoverflow.com/a/9950523/680651) to export a bunch of grades: How do I do the one time config of appid and app key? How do I do the one time config of the user id and user key? What REST calls do I need to actually get class lists and export the grades? 回答1: Regarding Utility account: I would

What are the permissions required in desire2learn (D2L) Valence PUT call for …/courses?

霸气de小男生 提交于 2019-12-11 19:43:14
问题 I continue to get a "HTTP/1.1 403 Forbidden" response from a PUT request to /d2l/api/lp/1.2/courses/7917 . This may be a permission problem with the user/role that I'm using, but I can't figure out what specific permissions may be required. Can anyone point me to a list or matrix of valence routes and required permissions? Or, answer for this specific one? The same appid/userid/username works for the GETs associated with the same path. confused... cwt 回答1: The permissions associated with API

Desire 2 Learn Org Unit ID

穿精又带淫゛_ 提交于 2019-12-11 18:43:20
问题 What is the API call for finding a particular orgUnit ID for a particular course? I am trying to pull grades and a class list from API but I can not do it without the orgUnitID 回答1: There's potentially a few ways to go about this, depending on the kind of use-case you're in. Firstly, you can traverse the organizational structure to find the details of the course offering you're looking for. Start from the organization's node (the root org) and use the route to retrieve an org's descendants to

Consuming the Valence API as an application

纵然是瞬间 提交于 2019-12-02 13:19:50
问题 According to the Valence Docs, Valence Learning Framework API calls are all made in isolation, by a known application, and by a known LMS user . If I want to build an application that has admin access, I'm guessing that I would have to make a "service account" that has admin access, and have my application use the API as that user. How would I go about obtaining a userId and userKey for users that aren't real people, and only exist for the application to connect to the valence API? 回答1: Once

404 Posting Content to Desire2Learn

喜欢而已 提交于 2019-12-02 10:48:26
I have a basic Valence App build for Desire2Learn and now I'm trying to POST data and I either get a 400 or 404 error. If I make a GET request to /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/content/root/, with the correct orgUnitId, I can see all of the content for a course. However, when I POST a ContentObjectData of type Module, it returns a 400. The docs have nothing listed for a 400 error for that particular request, but I'm assuming that I messed up the ContentObjectData. I've tried multiple times, but it always results in a 400. The JSON block looks like this: { "Title": "API

Consuming the Valence API as an application

最后都变了- 提交于 2019-12-02 04:36:18
According to the Valence Docs, Valence Learning Framework API calls are all made in isolation, by a known application, and by a known LMS user . If I want to build an application that has admin access, I'm guessing that I would have to make a "service account" that has admin access, and have my application use the API as that user. How would I go about obtaining a userId and userKey for users that aren't real people, and only exist for the application to connect to the valence API? Sarah-Beth Bianchi Once you create a Service Account, you need to manually harvest the user tokens using a

desire2learn Valence: Course Getting orgUnitID from Offering Code

血红的双手。 提交于 2019-11-28 10:09:01
问题 I'm doing some work with grades and the desire2learn Valence API. In the context I'm operating in, there is no way for us to get the orgUnitID directly. We are currently getting the Offering Code for each course but not the orgUnitID. Since the API requires the orgUnitID for any interactions with a course, is there any way to look up the orgUnitID using the offering Code for the course? Thanks, George 回答1: There is no call to search for a course by offering code, but, the offering code is set