Retrieve current grade level of a student via Google Classroom API - google-classroom

Is there a method to retrieve the current grade level of a student via the Google Classroom API? (e.g student is in grade 5)

Not possible. If you will check the Classroom API REST Resources.
courses.students.get method will return an instance of Student which contains the following fields:
Wherein, UserProfile object only contains the following information: id, name, emailAddress, photoUrl, permissions and verifiedTeacher

Related

Fetching the employee tasks list from SAP ByD via OData API

In SAP Business ByDesign (SAP ByD), a project can have multiple tasks and each task can have assigned multiple employees. So a single user has a list of tasks to book time on.
In the SAP ByD UI, you can select an employee and see all the assigned tasks. I would like to fetch that via the OData API. I started to click together some OData Services.
I have an Endpoint that allows me to filter for an employee:
https://my1234567.sapbydesign.com/sap/byd/odata/cust/v1/employees/EmployeeCollection?$format=json&$filter=EmployeeID eq '1234567'
With that, I can fetch information about an employee.
And I have an Endpoint to fetch ProjectTasks:
https://my1234567.sapbydesign.com/sap/byd/odata/cust/v1/project/ProjectTaskCollection?$format=json
That collection contains always a reference to the project.
And I have a ProjectParticipant collection that tells me which user is a member of which project:
https://my1234567.sapbydesign.com/sap/byd/odata/cust/v1/project/ProjectParticipantCollection?$format=json
And I can filter that ProjectParticipant collection by employee ID. With that I know which projects a user has assigned. But that does not tell me which exact tasks the user has assigned in the project. This last piece of the puzzle is missing.
I'm very new to SAP. If somebody can give me a hint for the right data model or API, I would be very thankful.

Method: people.get() does not return names

I have a question regarding API:
GET https://people.googleapis.com/v1/{resourceName=people/*}
When the resourceName = people/account_id and the personFields is 'names' the API returns names only when the account_id has a Google+ account associated with it. For the account_id without associate Google+ account, no names are returned.
My application scopes are:
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/contacts
https://www.googleapis.com/auth/plus.login
Is this expected behaviour? Is it possible to get account name by account_id without Google+ account?
Thank you in advance.
This is expected behavior. In general when getting data on other users, you only get their public data. Non G+ users don't have a public profile and so their name is not public unless they have explicitly set their name to be public.
See https://developers.google.com/people/#a_merged_view_of_people_information for more details on what data you should get.

Find instances of model A connected to an instance of B with specific ID when A relates to C through B

In LoopBack, I have a model Provider, which has a 'hasMany' relations with a model Customer through model Appointment. Model Customer itself has a 'hasMany' relation back to model Provider through the same model Appointment.
How can I find instances of Customer related to a given Provider whose ID is aderwaze234?
You could do something like new Provider({ id: 'aderwaze234', }).customers() given you have set up relations properly or from the api endpoint /Provider/aderwaze234/customers. Have a look at the docs.

How can I distinguish between students and teachers?

Using the Google Classroom API method userProfile, I can get various information about a user, including their name and email address, but not whether they are a student or teacher. How can I determine whether a user is a student or teacher?
Classroom does have the concept of teachers and students, however the distinction between teachers and students is only meaningful relative to a particular course (it’s possible for a user to be a “teacher” of one course and a “student” of another) and so you might not be able to use these categories to apply access controls in the way you were expecting.
For example, if alice#school.edu is a member of a particular course’s courses.teachers collection, and bob#school.edu is a member of courses.students, then you can use this information to decide that bob#school.edu should not see certain content created by alice#school.edu. (For example, you might not want to show Bob the answers to a quiz that Alice has created on your website, just the questions.)
However, because by default all users can create courses, you probably do not want to show alice#school.edu sensitive information created by teachers of other courses, information intended for teachers that you provide (for example, if you are a textbook publisher), or giving her domain-wide admin features.
If you need to distinguish between “real-world” teachers and students, we recommend that you do this via a mechanism entirely separate from Classroom, such as checking that the user’s email address appears in:
a separately-maintained list of teachers (e.g. CSV uploaded by admin)
the classroom_teachers group – domain administrators can choose to verify teachers to allow them to create new classes (use the Directory API to list a user’s groups)
Classroom api dosent provide global role for a teacher or a student its vary from course to course so you can just call student/teacher api
after that you will get json output and you find a special permission for teacher "Create Course" it will help you to recognized that the person is teacher.
"permissions": [
{
"permission": "CREATE_COURSE"
}
]
in case of student this array will be null.

parse.com - Possible to 'and' multiple ACLs?

Using parse.com.
I have the following format set up:
City roles
Department roles
Users that belong to a specific Department and City combination (i.e. user has relation to Department and City role)
I have a Register class. I want to restrict access to an object in that class to a user that belongs to BOTH Department AND City. Is that possible?
I know I could have a new role for each City+Department combination but I could end up with hundreds of roles. That seems incorrect/inefficient.
Is there a good way to do this?

Resources