How to get grade calculation option values using Valence APIs? - desire2learn

Is there some way to get the grade calculation option values for course sections using the Valence APIs? I looked through the Grades documentation, but couldn't find anything. What I'm trying to get are the following.
Grading System: Weighted, Points, or Formula
Final Grade Released: Calculated Final Grade or Adjusted Final Grade
Ungraded Items: Drop ungraded items or Treat ungraded items as 0
Auto Update: Automatically keep final grades updated
I've also tried looking at Configuration Variables, but that doesn't seem relevant.

Perhaps you can meet some of these goals with GradeCategories via the API, but I believe that some of them are not currently accessible through the API.

It does look like you can determine the grading system from the Grade Categories section. I see attributes for weight, which would likely be null if the item is not weighted.
Regarding ungraded items, there's this note in the GradeValue section:
Nullable grade values in the computable grade value structures indicate (when null) a default grade value state before a grade value has actually been assessed.
So your code could get computable GradeValues and ignore any with null or assign 0 to them.
I only see an option to PUT a final adjusted grade value.

Related

Total Value based on Group cross reference? (Google Sheets)

I'd like to query a couple of tables to come up with a total sum of the value of a set of items, but with the price being dependent on data in another cell range, then grouping it based on category.
For example, say I have a data table containing name, category, and price of some grocery items. Another table I store my current inventory of groceries. I would like to calculate the value of, say, all my fruit.
Here is an editable example:
https://docs.google.com/spreadsheets/d/1y2fLgwrsMr-dWojy3uYZ1Qs2U01AP3RlT_PI2txwZRE/edit?usp=sharing
Not sure the best way to approach this?
Thanks for any guidance!
Solution
Use VLOOKUP for searching the right item of your inventory and then multiply it with the value of the product you made the search with. For more info about VLOOKUP check this documentation.
=VLOOKUP(E3,$A$3:$C$11,3,FALSE)*F3
With these values, create a column next to Quantity indicating the total price for each product (as show in the picture below). Then, create another column with the Type of each item performing a similar VLOOKUP formula:
=VLOOKUP(E3,$A$3:$C$11,2,FALSE)
Finally, use these two columns as input ranges to apply a SUMIF formula for adding up the items of each group:
=SUMIF(H3:H6,"Fruit",G3:G6)
For more info about SUMIF check this documentation.
I hope this has helped you. Let me know if you need anything else or if you did not understood something. :)

Add a query result (on any computed value) to a new WIT

I am creating new WorkItemType and would like to populate parts of the WIT card in the board with computed values, examples include:
Given a start date calculate the duration in weeks since then
Count the number of fields that contain a valid value
I am interested in either a way to include query results in the WIT card, or how to fill a defined field with computed values.
EDIT: Running an on-prem installation of azure-dev ops and using the new process template with an inherited process
You may check Query based boards extension which allows you to visualize the result of work item queries on a board:
https://marketplace.visualstudio.com/items?itemName=realdolmen.querybasedboards

In Google Sheets, how to list and sum values in some rows but not others depending on string?

I am trying to join gained level for names in a list.
Some names are the same person who has changed handle and the scores should be summed.
I have created a sheet to track levels for players in rankings over time.
My implementation is not as clever as I would like it to be.
Also, there is a problem with some players changing names.
Example Sheet
Currently, I have
=SORT(UNIQUE({}))
In order to produce just one of each name in a list
In the cell next to that I'm using
=IFERROR(INDEX(MATCH())) + IFERROR(INDEX(MATCH())) + IFERROR(INDEX(MATCH()))
to the sum of levels for each name across several ranges /sessions.
In the example sheet, N7 and N10 is the same person but my SORT, INDEX, as well as QUERY cannot handle this. I would like to (manually type in the names as strings that belong to the same person) and that the latest handle is the one used in query output together with the sum of all gains.
Any direction pointers or suggestions as to how I could improve my current implementation or even solve the problem I'm having would be appreciated.
=ARRAYFORMULA(QUERY({Ranking!CF4:CF200\ SUBSTITUTE(Ranking!CG4:CG200; "N7"; "N10")};
"select Col2,sum(Col1)
where Col2 is not null
group by Col2
label sum(Col1)'',Col2'Total levels gained since 15 April 2018'"; 0))
Might not suit you (could mean an extra column per month) but one way would be to to use a lookup table. That is enter whatever name suits you, lookup the 'standard' for that name and drive further analysis off that.

Filter Data Based on Column Selection

Working in Google Sheets I'm making a gradebook. In the gradebook there are different assignment types that have different weights which can be chosen from the drop down. I would like to...
Average like assignment (there will be 3 values)
Weigh them appropriately (0.1 for baseline, 0.7 for Critical, 0.2 for accelerated.)
Add all the values together into 1 grade percentage.
Display them on grade report sheet for appropriate student.
I would like for this to be dynamic, so that if I change the assignment type (or any other values) the grade will change appropriately.
my MWE can be found here.
The AverageIf function will do what you need. So code like:
=averageif(B$3:G$3,"Baseline",B4:G4)
sitting next to your student in the 4th row (this is draggable, so row will update) that checks against values of assignment type in your 3rd row (3 is fixed by the dollar sign, so draggable) will accomplish your goal 1.
Once you do that for each of the averages, you can define one more column as =0.1*baseline avg+0.7*critical+0.2*accelerated
[not exactly that, I am pseudocoding] to achieve your other 3 objectives, I think.

Possible to "clear" a grade value using Desire2Learn Valence API?

Is there any possible way to completely clear a previously set grade value using the D2L Valence API? I can successfully set or update grade values, but it seems that there is no obvious way to totally delete the grade value like you can from the D2L user interface.
I've tried a few ways of doing this:
Setting the incoming grade value to null using the grade value update route:
PUT /d2l/api/le/(version)/(orgUnitId)/grades/(gradeObjectId)/values/(userId)
(Note that I am correctly substituting valid values for all of the IDs, versions, etc.) This returns a "400 Bad Request" status code.
Calling the same route with a DELETE verb. This returns a 404 Not Found error code (unsurprisingly, since it's not a documented route: I just tried it as a stab in the dark).
Calling the PUT route but omitting the incoming grade value body. This also returns a 404.
I can always just set the grade value to 0, but that is less than satisfactory because it's not the same thing. I don't actually want to assign a grade of zero; I want to assign no grade so that it is obvious that the grade needs to be assigned manually, etc. Is there some other sort of magic number/sentinel I could use, besides null, to achieve this, or is this just a gap in the Valence API?
I believe this is a gap in the Valence Learning Framework APIs. You can use the APIs to explicitly set a grade value, 0 or otherwise, but you can't currently use the APIs to unset the value for a grade object.

Resources