Reporting Scores Using PHP / JavaScript - google-classroom

I have created activities like these:
https://www.ereadingworksheets.com/text-structure-worksheets/text-structure-practice-01/
https://www.ereadingworksheets.com/reading-comprehension-worksheets/google/
They use the Google Classroom button.
When students are done with the quiz, they can currently print, save, or email PDFs of their scores. They can also share their scores to Facebook.
I want them to be able to submit their scores and essay responses to Google Classroom.
I've looked at the documentation here: https://developers.google.com/classroom/guides/manage-coursework
But the examples are only in Python.
Everything I've built for this project is based in PHP.
Can I get some examples using PHP that achieve the following goals?
Pass graded scores to your API.
Pass ungraded essay responses to your API.
Thank you in advance for your consideration.

There is a PHP Quickstart for Classroom API which you can use as a reference to start from. Also, there's a bunch of PHP scripts from Google in their google-api-php-client-services for Classroom API.

Related

How can I implement Google's "Indexing API for job posting URLs" if my job board only has a dashboard and no place to put the key?

We have a job board for the German market. The template/software we use is from a company called JBoard, whos programming language is PHP and Laravel. We are having difficulties being listed in Google for Jobs, so now we want to use one of Google's features (=instant indexing: https://developers.google.com/search/blog/2018/06/introducing-indexing-api-for-job?hl=en) for the jobs on our website. We have already generated a key but cannot connect it to the website. According to JBoard, they do not have any place in the backend where you can store the key. However, JBoard says that they have clients who have successfully implemented Google’s API outside of their platform. Apparently it is done with google sheets, google search console and an API token (which I am able to generate via our dashboard). We did find a developer, but he couldn't finish the implementation due to personal reasons. Does anyone know how to implement the instant indexing for jobs when your website is not based on wordpress, Squarespace etc., and with no access to the backend code? Thanks in advance.

Is there an API for extracting rubric grading data in Google Classroom?

I have read a helpful post for grades...
Is there an API for extracting grades in Google Classroom
and the API for grading...
https://developers.google.com/classroom/guides/manage-coursework#grade_student_responses
but haven't been able to see anything for rubric grading data yet. Or am I missing it?
Answer:
Unfortunately, at this time, there isn't a way of getting Rubrics from the Classroom API.
Feature Request:
There is already a report on Google's Issue Tracker which request this feature to be added to the API:
Add Rubrics to Classroom API
It appears that Google does seem to know about this and has responded on the above feature request. What you can do it hit the ☆ next to the issue number in the top left on the aforementioned page - this lets Google know more people are wanting this feature to be implemented and so it is more likely to be seen to faster.

Need help - embed Google My Business Posts into website

I'm looking for an api or another way to grab posts (not reviews) from google my business and embed them to a website. We don't want to have to place the updates/posts at two different places...google my business and the actual website.
I'm already grabbing reviews using the google places API but didn't find any solutions for actual posts
appreciate any directions to the end result...thank you
You can do this through the Google My Business API
The method to fetch Google My Business posts is accounts.locations.localPosts.list

How can we access the Ads Action Stats list in the Facebook Marketing API, using the Python SDK?

I have been trying to access the list on the Facebook Ads API for a few days now but haven't been able to make any headway.
I need to pull the purchase_roas field which is part of the Ads Action Stats List. However, I'm not able to do so.
I'm using the Python SDK and have been looking all over the place for some examples but haven't been able to find any!
Any directions or sample code would really help here. Thanks so much in advance.
This is an example code of fetching the ROAS on an ad account:
insights = FBAdAccount(fbid=adaccount_fb_id).get_insights(
params={'date_preset':AdsInsights.DatePreset.lifetime},
fields=[AdsInsights.Field.actions,
AdsInsights.Field.website_purchase_roas,
AdsInsights.Field.mobile_app_purchase_roas,
])
Note that the website_purchase_roas returns a list rather than a number. In addition - if your ad account has no ROAS no list would be returned.

How to get place description using Google API or any other API?

I am using Google API to get the place information and store it into database. Using Google API I am able to get address, opening hours, rating and reviews as shown in below image.
But, I am not able to get place description which is highlighted in below image in red circle. ("Quaint Italian mainstay for deep-dish, Chicago-style pizza, calzones, pastas & hot dogs.")
I want that information in my application. I think google is taking those information from
Freebase https://developers.google.com/freebase/guide/basic_concepts
Wikipedia https://www.mediawiki.org/wiki/How_to_contribute
But I am not sure.
Can any one help me suggest me that how I can get that information or any other API that I can use to get that information based on google place_id.
Any help would be highly appreciated.
Thank you
Accordingly to the documentation and #xomena, currently you cannot obtain this data via Places API. There is a feature request in Google issue tracker to make the detailed business type available in Places API, however Google doesn't expose any ETA (estimation time of arrival:
https://issuetracker.google.com/issues/35822953
Feel free to star this feature request to express your interest and subscribe to notification from Google.
To my knowledge it is not possible to get this information from the Google Places API. The API documentation does not display the venue description. Try to have a look here: https://developers.google.com/places/web-service/details (it might be that Google does not share all information from their platform with other developers..).
I would suggest you to do one of the following (or perhaps both):
Scrape Google the old school way; i.e. by getting the information from the HTML. There is a quite decent guide for doing that here (you would of course have to adjust the example to scraping Google instead): https://medium.freecodecamp.org/how-to-scrape-websites-with-python-and-beautifulsoup-5946935d93fe.
What I would recommend and which probably is the fastest: enrich your current data with other data. You could e.g. use Foursquare and search for the places you get from Google. It should be possible to get the description for each place on Foursquare. See here: https://developer.foursquare.com/docs/api/venues/details. If you have problems with matching the places after your query has returned, because the venue names are not exactly the same - but close, then you could use an algorithm to match strings that are close; perhaps using the levenstein distance (https://en.wikipedia.org/wiki/Levenshtein_distance).

Resources