Google Apps Scripts - Accessing Cell Notes and Comments - google-apps-script

Hello everybody and thank you for taking the time to check out my question. I am a 9th grade teacher making a customized grade sheet and just finished a GUI that lets parents see their kid's grades. However, on the actual gradesheet I use cell notes (previously, comments) to store information specific to a grade (i.e. Jimmy was missing part b of the assignment). I would like to be able to access the data within those notes.
I would like to consider myself a good researcher but have not been able to find a single reference to apps scripts interacting with cell comments or notes. Any help on this would be greatly appreciated.
Also, should there be no infrastructure to support this, I am very open to other ideas on how to store related information while still keeping my interface more more or less constant.
my interface: https://docs.google.com/spreadsheet/ccc?key=0AuptsBCDJBomdGtjc0xBcDctZ3FENmlsdlpRQmdkNkE
parent interface is a simple form that takes a student id number and returns a flex table with grade headers and only that students information.

You can use the Range.getComments() method to gain access to the comments on cells.
https://developers.google.com/apps-script/class_range#getComment
Update (original author: Simon):
Google Docs Comments were relaunched on Sept 5th 2012 as discussion-style comments. All the old Comments were renamed to be Notes. See this notice. The curious thing is that Google has kept the old simple Notes, but not provided any documentation for it.

Related

Google Classroom API - studentSubmission - comment, grade, respond

Big picture - I want to build a bot to respond to my students on SHORT_ANSWER_QUESTION assignments -- I'm running into a couple of hurtles, but the biggest at this time is that there doesn't seem to be a way to give a comment along with a grade.
Does anyone know how to patch a comment or response of some sort to a student's submission?
Relevant documentation: https://developers.google.com/classroom/reference/rest/v1/courses.courseWork.studentSubmissions
currently there is no way to directly do this in the studentSubmisson context. There's the option to Grade student responses, but this only allows for numeric values.
There already is a Feature Request filed on Issue Tracker related to this issue. You can find it here. I suggest upvoting it to give it more visibility.

How to generate sequential numbers on a web page?

Most of our staff work remotely in different countries of the world.
Often several staff work (on different aspects) of the same case.
At the moment the person who initiates the cases has to email the office manager who has to inssue a case number which then has to be shared with different staff members to make sure they use the same Case number in their forms and correspondence.
I was wondering whether it would be possible to:
Have a page on our website (accesible to our staff only)
Where the person initating a case goes to
The staff member is asked to enter his initials (eg DH or RD)
Then automatically a code is generated (RD001, DH001, etc.), it will be helpful for other purposes if the number is always 5 characters long (e.g. RD001, RD025, RD234, etc...).
These numbers need to be sequential (so if RD got the number RD001 1 hr ago, or 1 day ago, he needs to get RD002 the next time he requests a number), so the page needs to remember the last number that was issued for that staff member (they need to be sequential per staff member).
That number is then emailed to the relevant staff members who need to be aware that this number has been issued
Is that possible?
Sure it's possible, but what you are asking is actually a complete solution development. You've to hire a developer, who will create a system with authentication AND authorization, cases management (new case, details of the case, etc...) and so on.
But overall, it's a trivial job : )
EDIT: If your question is exclusively considering only HTML, then I really don't think this is possible, since your "number" should be generated and accessed from anywhere. Then, you have to make it globally accessible.
Also, it's really important that only your staff, and only the ones with rights to do that, could access and/or generate new numbers, hence the authorization/authentication need.
EDIT 2: Another possibility is search for a already made solution. I believe that should exist even online services with your requirements, like some online CRM or something like that.

Instagram API Follower List Export

Does anybody know of a simple way to use the Instagram API to export a list of a user's followers? I'm looking to be able to take a list of people that follow me, and a list of people that follow another user, then find all of the common followers, and finally pick a certain number of random usernames from the common followers. I know it sounds a bit complex, but mostly I just need a way to get the list of followers, and I should be able to figure out the rest. A CSV File would probably do what I need if possible. So does anyone know how to do this, or have a tutorial you could direct me to? Thanks
Yes, there is a way to do this. But you can no longer do it using the Instagram API. The Instagram API is no longer accepting new applications and it is being shut down in stages starting on the 31st of July 2018:
https://developers.facebook.com/blog/post/2018/01/30/instagram-graph-api-updates/
However, there is another way to obtain the data. You can export the followers of any Instagram account into a CSV file using this website:
www.magimetrics.com
It is very easy to use Magi Metrics. Sign up for an account, search for the username of the Instagram account you want to export and choose the option 'Export followers'. Magi Metrics will do all the work and will email you the CSV file once it's done. It's free to use for exports less than 100 rows, and you can pay to upgrade to do more.
Using Magi Metrics you can export a list of all the people that follow you, and all the people who follow another user. You can then take these two CSV files and copy them into Microsoft Excel.
In the first column you will find the Instagram numerical ID, which is unique to each user. If you apply the COUNTIF formula to this column, you can identify the Instagram users who are in both lists:
http://spreadsheetpro.net/comparing-two-columns-unique-values/
Finally, to choose a random subset from the list of Instagram users, you can use this method:
https://www.extendoffice.com/documents/excel/4487-excel-generate-random-number-from-list.html
Using these steps you can achieve what you want: a random subset from the list of Instagram accounts who both follow your account and another user!
I appreciate this question dates from 2016, so your need has probably long gone. But if anyone else on the Internet faces the same problem, I've posted this answer to help them. Good luck!
You're luck.I found a tool easily no longer do it using the Instagram API.
you can have a try. InsExport
How does it work?
1 Enter an Instagram username
2 Select the export type(follwer or following)
3 Click the Export button
https://chrome.google.com/webstore/detail/insexport-get-instagram-f/okmokimdgjhndamggnkdojhbofdmepno?hl=zh-CN&authuser=0
There are multiple ways to do this. Programatically, you can easily request a list of up to 100 of your own followers. With one token, that's the max per request.
Here's the full documentation from Instagram: https://www.instagram.com/developer/endpoints/users/
Automated services will get a list of all your followers by requesting them 100 at a time using multiple tokens, getting around that 5,000 request limit (https://www.crowdbabble.com/download-all-instagram-followers/).

Workflows with google app script

Hello I'd like to know if google app script/google forms/google spreadsheet is a good way to achieve the following. (Similar to previous posts on google scripting, i am struggling a bit to understand the 'landscape' of coding problems that these google tools are good for):
A cohort of N players (could be hundreds) is asked to click a link to a web page where they enter a player id
Once the id is entered they see a message that asks them to wait until all the cohort has entered their id, and a scenario and a question (text).
Once everyone has entered their id players are paired at random and can answer the question by simply selecting a number from a drop down menu (e.g. 1-21)
The numbers given as answers are then scored according to a simple payoff matrix and each player is presented with an outcome based on the difference between the numbers they submitted as answers.
The game then repeats i.e. the players are asked the same question, and paired randomly again (they shouldn't need to re-enter their id)
What I want is a simple way to create this workflow/process/game, and a simple way to monitor the progress of the game. Something like a google form for the questions and answers and a google spreadsheet where the data is visible by the researchers.
What I don't know is whether app script and google forms/spreadsheets can be used to setup this process/workflow.
Forms + spreadsheets would also be neat because there are many versions of this basic game/process/workflow in economics i.e. different scoring matrices and questions.
I don't think you can do this in Forms, as it is not all too dynamic (not too sure), but you can easily achieve this with HtmlOutput.
You'll have to setup a linking sheet, it will store everybodys answers, and you'll constantly check this sheet for new values with setInterval to check periodically, and google.script.run to retrieve the info.
Also, this platform is not the fastest or most suitable (I don't know an alternative), but it's totally doable.

Looking to make spreadsheet into applet, widget, or API

I have two similar but different projects. Both I would like to take something I created as an excel spreadsheet and make into something I can embed in a website. I am mostly asking what language would be best, any resources for learning how that language, or any insights. I will post the exact nature of the projects below just in case there is any relevance.
Thanks!
For the first project, I have a spreadsheet where a I can insert values into A1 and A2 and get a result in A3. This is based on many formulas. I would like to make this into something I can put online so the user can only see three values and not the formulas.
For the second project I have a large spread sheet that is 1000x1000. Each row and column corresponds to a name. Right now once again I can put a name in A1 a name in A2 and get the value in A3. I would like to make this into something I can put online.
Option 1: Javascript (the calculations are done on the client)
Option 2: PHP (the calculations are done on a web server)
both are free and you can find plenty of resources you can start with http://www.w3schools.com/
Are you looking to have it actually be functional, or are you interested in posting just the results?
If you want functionality then for the first project a simple javascript will suffice (learn jquery - a wrapper that makes javascript easier)
For 1000x1000 you're gonna have to explain exactly what the functionality is that you're looking for.
Edit: Google Docs supports some sorts of widget/gadget deal. Learn that, and use Google spreadsheet to do your math for you.