Setting "Max Score" in Desire2Learn - desire2learn

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.

Related

Predicting next 4 quater customer count based on last 3 years quarterly customer count

I am currently working on a project where i need to predict next 4 quarters customer count for a retail client based on previous customer count of last three years i.e. quarterly data means total 12 data points. please suggest a beat approach to predict customer count for next 4 quarters.
Note:-I can't share the data but Customer count has a declining trend YOY.
Please let me know if more information is required or question is not clear.
With only 12 data points you would be hard-pushed to justify anything more than a simple regression analysis.
If the declining trend was so strong that you were at risk of passing below 0 sales you could look at taking a log to linearise the data.
If there is a strong seasonal cycle you will need to factor that in, but doing so also reduces the effective sample size from 12 to 9 quarters of data (three degrees of freedom being used up by the seasonalisation).
Thats about it really.
You dont specify explicitly how far in the future you want to make your predictions, but rather you do that implicitly when you make sure your model is robust and does not over-fit.
What does that mean?
Make sure that distribution of labels with your available independent varaibles has similiar distributions of that what you expect in future. You cant expect your model to learn patterns that were not there in the first place. So variables that show same information for distinct customer count values 4 quarters in the future are what you want to include.

mql4: how to disable expert trading if it first run

I made an ExpertAdvisor, which opens an order if a price is getting higher or lower over a value of the past day.
Backtesting was fine, but problem is when I put this Expert on an MT4.Graph ( a live currency pair ), it opens an order immediately, because the current value of price, when I started the Expert, had greater or lower value than a max of past day.
I need a condition:
do not start trade if a price is greater or lower than any of extremums of the past day and it is the first Expert running on current currency pair.
You can just use a boolean variable that is initialized to FALSE. Then, before opening the order in the code, check for the value of that variable. The first time it will be FALSE, so your condition is not met and you don't open the order. Immediately set it to TRUE and adjust previous day min/max values accordingly.
On the next iteration it should then open your trade according to new scenario of previous date low/high.
Also, please do have a look to the IsExpertEnabled function here: http://docs.mql4.com/check/isexpertenabled
For further support on Server or Client side MT4 you can contact me via www.mt4software.com or Skype ID: mt4software

Where to put score functionality?

I am implementing a score system to rank trending in a rails application. To score the items I'm using a basic number of likes x age.
#post.score = #post.likers(User).length * age
I have a field in the posts database called score. My question is where do I call the above code so that the score is constantly getting updated as it gets older or when someone new likes the post.
Thanks for any help.
As it's an ever changing value, and not really a static field, I'd suggest consider putting this in a method, not in the database. Unless for performance reasons that is needed. So, in your Post model just have:
def score
#score algorithm here
end
This way, whenever you call post.score, it will be calculated at that time and shown.
Alternatively if age is a daily value, you could use some kind of scheduled task (cron/whenever) to update this on a daily basis.
The code you posted should work. Just make sure you call #post.save on the next line. Can we see your codebase?

Desire2Learn Grades API, Max Score of 0

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.

Quickbooks: Adding a negative value to an invoice using the QBDSK

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.

Resources