I want to check the students attendance for all google classroom courses. As the meeting_code will be the same for each course (recurring), how can I figure out the attendance for each meeting? Which parameter can help me to solve that? Any ideas?
Thanks
Yes, you can if you are an admin
From the user interface, go to the Admin console and go to Reports -> Audit log -> Google Meet. You can filter the results by start time, user name etc.
In Apps Script you need to enable and use the Advanced Service Admin Reports API.
More specific, you need to use the method Activities:list, specifying the student of itnerest as userKey and meet as applicationName
You can filter by different parameters as specified for the Google Meet Audit Activity Events, like startTime of the meeting, or e.g.
duration_seconds whihc not only allows you to estimate either a student participated, but also for how long he did.
I recommend you to test the request with the Try this API feature before implementing it into Apps Script
Related
I am writing a tool in Google Sheets to analyze my work calendar and I just noticed that if I invite a "Group" (of 23 people) it only shows up as a single guest in the calendar data. Is there a way to get access to the e-mails of the people in the group?
From my research I know there is a Groups service but I'm not sure how to even recognize that it's a group. It looks like a normal e-mail address in the calendar: "management_team#gmail.com". (I could search for that specific group name, but I'm looking for a universal solution, so I can share this tool with others.)
Any suggestions will be appreciated. Thank you.
To verify either an email is a group and to retrieve its members you need to use the Admin SDK method Groups:get
But in order to use the Admin SDK you need to be a domain admin.
Each person who uses my tool will need their own copy and they will have to enter their calendar e-mail address. (The first time they run the tool there's a rather scary permissions message, but I will only be sharing this with some office mates so that should be okay.)
When my program runs I'll use this command:
var groups = GroupsApp.getGroups();
... to get a list of all the groups to which that person belongs. (I'll also have arrays for the members of each group.) Then I'll just compare the group names against the meeting guest names. If there's a match I can pretty easily retrieve the whole list.
Is it possible to export a member's join date to a google group? When you manually export a .csv from a group it gives information on the join date. However, in google app script, I don't see the option for this in the Groups Service. This is the information that is in the .csv:
Any help or resources would be appreciated!
Short answer:
No, you cannot do that programmatically.
Long answer:
Google Groups functionality is mainly handled by Directory API, in its Groups and Members resources. That's what the Apps Script Groups Service is using behind the scenes, and you could use its methods directly by enabling the Admin SDK Directory Service in your script (the APIs —and, as a result, the advanced services— usually have greater functionalities than the Apps Script built-in classes).
If you look at the properties of any of these resources (Groups and Members), you won't find anything close to a join date property, so it doesn't seem to be part of the open API, and can only be accessed through the UI.
The same can be said of Groups Settings API, which can be used to manage group settings: no join date can be found in its resources.
Because of this, you have no way to programmatically store and retrieve the group member's join dates.
Workaround (of a sort):
If you are adding members to a group programmatically, with the API method Members: insert, you could make your application store the date in which each member was added, and retrieve it later. This is not possible, though, if members are added through the UI.
Filing a Feature Request:
Since this resource does seem to exist already (it can be accessed through the UI), I'd suggest you to file a feature request in this Issue Tracker component to make this available to the API. If you do that, please make sure that you explain the usefulness of this functionality (explain how this could help you and, potentially, other users).
Reference:
Directory API: Groups
Directory API: Members
Directory API: Manage Groups
On a user's page on the G Suite admin console, an admin can see the last login of a user. For example, one user I can see has a "last login" date of two years ago.
I'm trying to pull this date programatically. However, the Reports API that provides information on login events only goes back 180 days. How is Google getting this login date, and can it be fetched via API?
Google has this information because they are logging the event when it happens and storing that to present in the admin console. If you start to build an application now and start storing those events as time passes you too will have a date that goes back years. G Suite Enterprise customers can seamlessly do this if they Set up BigQuery logs in the Admin console.
You should be able to get this information now though. Look at the following APIs used in GAMADV-XTD you can get this info with this command for example.
gam report users parameters accounts:last_login_time filters "accounts:last_login_time<#filtertime#" filtertime -5y
https://developers.google.com/admin-sdk/reports/v1/reference/activities
https://developers.google.com/admin-sdk/reports/v1/reference/customerUsageReports
https://developers.google.com/admin-sdk/reports/v1/reference/userUsageReport
I somehow missed this before, but you can get the last login date/time with the User Usage Report (rather than the Login Activity report).
API docs are here and the App Script example I'm using is here. I realized that if GAM was pulling the information there had to be an API for it.
In google classroom, you can schedule assignments by date. Is it possible to use the API to automatically assign the next scheduled assignment once a student has marked the current assignment as complete?
The API doesn't seem to provide an easy way to do that.
If you look at the documentation for the Classroom API there is no out-of-box mechanism to track when a student assignment is "turned in". You'd likely have to code something yourself to poll the state of a submitted assignment for a given student and if the submission is flagged as "turned in" use the API to trigger the next assignment in the sequence. A viable approach but not exactly trivial to implement.
Ironically the API supports push notifications for roster changes. Maybe google will expand this someday to include tracking submission state. You should consider posting a feature request using Google's issue tracker - this will at least put this need on google's radar.
Consider requirements for a guest list app (for a club):
Guest list as a Google spreadsheet with two columns:
name: name of guest
entered: yes, iff guest has entered
Web app for people at the door allows searching for a guest by name, and marking her or him as entered.
People at the door are not allowed to change the guest list, other than marking guests as entered or not (obviously). They should have a password that gives them access only to the app (point 2), but not to the spreadsheet (point 1).
I wonder: Is it possible to write the user interface in Google Docs Script? If so, how do I do authentication with regards to point 3?
Otherwise, of course, I could just write the UI, say in PHP, and have it authenticate against the Google account using OAuth.
After a good night's sleep, I just had a look at the deployment options. What I want should be possible by setting permissions as follows:
Execute as: admin#example.com
Allow access to: any member of example.com