Is there a web service that allows a user to upload a session with a Max Score value of 0? Does a service handle that? If so, what is needed for a Max Score of 0 to appear in the grade item list?
It appears that, both in the web user interface, and through the APIs, you cannot create a grade object with an explicit MaxPoints property of 0: it seems that the minimum value is 0.01.
Related
We have a User Picker for multiple users to indicate how is reviewing an issue. We always want at least 2 people reviewing issues and would like a quick filter to show all issues with 0 or 1 reviewer.
I don't know how to access the length or size property of the field.
You can use size to access size property of a field.
size([User Picker Field]) <= 1
This returns all issues where length of User Picker Field is <= 1, thus complying with your 0 or 1 reviewer requirement.
Edit: This was for JQL I didnt notice.
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.
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.
Do the web services allow a user to update the Max Score value from an assignment? So for example, I upload a session where my Max Score is 15 and I want to upload the same assignment for the same class with a different score of 12. If so which call needs to be made to update the score?
Yes, you can update grade object and set the max score value inside the GradeObject Resource.
Is there any way to add a line item containing a negative amount to an existing invoice?
I'm using QBSDK7 and QB Enterprise. (and if it matters .Net 3.5)
What we're attempting to do is automate the way we're creating invoices. We're already pulling in employee's time and applying it to the correct invoices, but when we go to add credits (just a negative amount on a line item on the invoice) using
InvoiceLineMod.Amount.SetValue(-1234)
it fails with the error "Transaction must be positive"
I've also tried adding a Service Item with a negative amount and giving it a positive quantity and I get the same result.
This seems like such a no-brainer as we have been doing this manually for the last 10 years. I'm guessing there is artificial restriction on this.
Some things to consider:
Credit Memos are no good as we need to display exact details of the reduction on the same page.
We don't have payments to apply yet in most cases.
This need to be done before any retainers are applied.
Any help would be greatly appreciated.
Can you show the complete code you're using to modify the invoice? Can you also show the exact error message you're getting?
It is possible, though to do you need to make sure that you're using a Discount Item as your ItemRef type (a Service Item will not work), and you need to make sure that the transaction as a whole is for a positive amount.
Sometimes our app has to adjust an invoice down with a negative number. I have been able to add negative line items using the following code. I have to set a quantity and a rate, instead of setting the amount.
IInvoiceLineAdd ila = ia.ORInvoiceLineAddList.Append().InvoiceLineAdd;
ila.ItemRef.ListID.SetValue(GetQBID(JobKey));
ila.Desc.SetValue("Adjustment");
ila.Quantity.SetValue(1);
ila.ORRatePriceLevel.Rate.SetValue(-1.00);
Quickbooks doesn't allow you to post an invoice with a negative balance. If you try to do it through the UI, it prompts you to create a credit memo instead. (And vice-versa if you try it with a credit memo.)
You can enter negative quantities and/or prices into the line items, but the total of the invoice has to be >= 0 or it won't post (i.e., add other line items that offset the negative amounts).
The solution is to use credit memos. Your client-side processing will be more complicated, but it's the only choice with Quickbooks.