I'm trying to use valence to get all students' grades for a given grade object. But, I'm only finding actions for getting the current user's grade values. Given an instructor, is there a way to get everyone's grade values for a grade object? Or, do I need to get the class list, and individually get each student's grade for a grade object?
You are correct. Currently, you must first retrieve a list of the users in the class and then iterate over them to retrieve grade values for a specific grade object (line item in the grade book). This is a gap in the Valence Learning Framework API that others have also identified, and has been called out for implementation in a future release; precise timing of when it will be released isn't yet available, though.
Related
I have started to work on a dimension model to know the count of new customers who visited a shop. I'm little bit confused in identifying the facts and dimensions for this purpose. Can someone help me in this regard?
As per my understanding, I have identified Customer, Product, Invoice, Time, Payment as dimensions (as per level 0). But, I'm not sure of how to identify fact in this regard. I know that facts are those data which are measurable. The measure or the result that I want to achieve post data model is how to get count of new customers that visited in current month.
Does each visit result in an invoice? How is "new customer" defined (i.e., their first invoice, some time period after their first invoice?)
If so, one option would be to create a "factless fact table" to capture each invoice event and create a dimension to indicate that the invoice is the first invoice for that customer (i.e., New Customer). You could then use a distinct count of patients where the New Customer dimension indicates that they are a new customer.
FactVisit(TimeKey,CustomerKey,InvoiceKey,ProductKey,PaymentKey,NewCustomerIndicatorKey)
DimNewCustomerIndicatorKey(NewCustomerIndicatorKey, ...) {"Y", "N")
Another possibility would be a separate fact table that captures a row the first time a customer is seen.
One additional option would be to include an attribute in the Customer dimension that holds the date that the customer was first seen.
A lot depends on what/if any OLAP front-end you're using and what tool you're using to report the results.
The Valence API documentation specifies that Grade Objects of type Category cannot be created through the API, yet later on in the documentation there is a reference to a POST action possible on Grade Categories.
What's the story here, is there something in the documentation that I'm missing?
http://docs.valence.desire2learn.com/res/grade.html
I believe this means that you shouldn't try to use the POST route to create a grade object to create a grade category; instead, you must use the POST route to create a grade category to create a grade category. Grade category objects may be characterized as a special kind of grade object, but you should use the grade category APIs to manipulate them.
We would like to read the calculated value of a specific Grade Category, as opposed to its configuration, through Valence.
According to the docs here, we can retrieve grade values through this endpoint:
GET /d2l/api/le/(version)/(orgUnitId)/grades/(gradeObjectId)/values/(userId)
Retrieve a specific grade value for a particular user assigned in an org unit.
Is it possible to use the above API on a Grade Category to get its value instead of a Grade Item?
Just to be clear, we would like to get the value for the category in one single shot without having to look into what grade items are inside the category.
The API doesn't currently expose the calculated value for a category in a single route. You'll have to get the category, and using the array of GradeObjects that comes back, grab the corresponding grade values, and then use the properties of the category to calculate the mark.
Below is an illustration of the kind of data I want to save in Core data. Every city has many schools , every school has many grades and every grade has many students and their details.
I have read a couple of things about Core data and have got it up and starting. But I'm not able to understand how to save an array in core data and is it a good way to do that in the similar case of the illustration?
If i want to save for a particular school an array of total students for that particular grade, would it be a good practice? If yes, is the method provided in this link good to follow?
EDIT : All cities, all schools and all students have same attributes. Whereas each grade has different attributes. So if there are data for 10 grades, there may be 10 types of array for grades.
Also, what if i have a one to many relation between school and students? IE depending on my login i decide whether i need to save school and grades or school and students. How would the relationship be now?
You should use core data with one to many relationship. This would be your entity structure.
UPDATE:
In case you have several grades with different attributes, you can define another entity "GradeType", which contains details of each grades
UPDATE 2:
Let me write down considerations in this scenario.
1. A city can have multiple schools in it, but a school can be only in one city (Branches will have different address ;) ).
2. A school may offer multiple subjects. same subject can be taught in multiple cities.
3. A school may contain multiple students while a student can be enrolled only in one school.
4. A student can register for multiple subjects, while same subject can be registered by multiple students.
5. There can be multiple grades possible for a subject.(lets say 4: A, B, C & D). Similarly, many subjects will follow the same grading system.(A in history, B in Geology etc).
6. A student can have multiple grades. However, the number of grades will be equal to number of subject he/she opted for.
Based on above consideration, this would be your dataModel.
Here Grades Entity will have entries like this:
grade A for physics is scored by these students.
grade A for biology is scored by these students.
…
…
grade B for physics is scored by these students.
grade B for biology is scored by these students.
…
… N So on
Let me know if more info needed.
Dont do it the way shown in that link. Create core data entities for each of them (city,school,grade,student). Add relationship between those entities (Eg: City ->> school which means one to many relationships). Check this link http://www.raywenderlich.com/14742/core-data-on-ios-5-tutorial-how-to-work-with-relations-and-predicates. Refer apple document https://developer.apple.com/library/mac/documentation/cocoa/conceptual/coredata/articles/cdRelationships.html as well. Take your time with core data modelling. Hope it helps
When accessing the D2L Valence API as a student, /d2l/api/le/1.1/(D2LID: orgUnitId)/grades/categories/ and related GET requests return a HTTP 404 error where the orgUnitId is a class.
The route GET /d2l/api/le/1.1/(D2LID: orgUnitId)/grades/values/myGradeValues/ works however the categories and grades are displayed at the same level in the JSON hierarchy and there's nothing to associate between grade categories and grades.
On the first part of your question: the user making the call to fetch grade category information must be enrolled in the course offering with a role having permissions to see grade category data. The role permissions needed to see grade category data may not be the same as the permissions needed fetch one's own grade values. However, the '404' returned is odd, and would suggest that the orgUnitId you passed in was not found: if the user didn't have permission to retrieve the categories, then you'd expect to get a '403' error returned, not a '404'.
On the second part of your question, the call to get my grade values returns a flat array of GradeObject structures. You can distinguish between the grade object types by examining the GradeObjectTypeName property: for grade categories, it should say Category; for other grade object types, it will have the type name for that grade object (i.e. Numeric, PassFail, and so forth).