Grade multiple forms on one spreadsheet - google-apps-script

I need to grade some google forms. Due to the way I needed it to work, I used one form for every question on the'quiz'. Not every person will have taken the same question. The responses are recorded into spreadsheets, but google makes each form have it's on sheet on the same document. So, because of the random questions, it make's it harder to grade. Some users may have all taken question 1, while only a couple have taken question 2. The names won't be in order, either, if they took the quiz at different times. So how can I grade this? There's about 40 questions total. I'm thinking I'll need to use google app script, but I'm not sure how.
Spreadsheet

This shouldn't be to hard to do but might be a bit complicated to explain here...
What I would do :
get all data from each page into an array
add the question and the right answer in front of every user answer for each array row (page)
concatenate all the arrays into one global array
sort it on user Name and get a new array for each and every user
sort all these arrays on question (it would probably be nice to add numbers to these question if you want to control the order of the questions)
evaluate the user answers (easy since you have both the right answer and the user's answer in each row)
write back to a spreadsheet, eventually one sheet / user
Nothing really hard to do but a lot of work though ;-)
Good luck

Related

Is there a way to add backend to LimeSurvey?

So I am making a survey and I want users to give me a certain temperature. There is a subsequent question about whether the temperature is within an acceptable range or not, and I would like that to be determined immediately after the user gives the temperature. I do not want the user to also go and answer the range question, I want it automatically answered, but I do not know how I am going to do this using LimeSurvey. Does anyone have any ideas?

Scan COLUMN for key set of initials, get value of that ROW, then get CONTENTS of different CELLS

I have access to a review sheet, regarding the review of web content articles for blogs. I'm one of the reviewers.
Here's an image of the review sheet (I'm sorry, I haven't been granted access to embed images):
EXAMPLE REVIEW SHEET
I want to produce in invoice based on that review sheet. Here's the invoice:
EXAMPLE INVOICE
I understand how to create the link between the two separate spreadsheets, but what I need is this:
In the EXAMPLE REVIEW SHEET I need to look down COLUMN B (INITIALS) for the last instance only of initials 'MF' and make a note of the ROW
Then, I need to scan back up COLUMN B, for 3 more instances of MF, and make a note of the ROWS for all 3 instances.
I now have the last four instances of MF, and the ROWS they appear.
Now in my EXAMPLE INVOICE, I want to populate cells B19-22 with the contents of cells Aw Ax Ay and Az from the EXAMPLE REVIEW SHEET, where w, x, y and z are the 4 ROW NUMBERS that we got from the original LOOKUP.
Here's the link to the actual sheets (all on one spreadsheet for the examples)
ACTUAL SHEETS
For some other invoicing requirements, I found this line of code:
=index(B:B,max(row(B:B)*(B:B<>"")))
Which I know returns the lowest-positioned non-empty cell in a column. But I don't really understand WHY it returns it, I just know that it does. I'm sure some part of the INDEX function can help to return the values I need, but I don't know how.
I'm guessing that what I'm looking for is beyond the fx input on the spreadsheet, and requires a script to be run. Whereas I can sometimes make sense of some basic programming - and by that I mean ANSI 74 BASIC, which is where my knowledge stops - I can't really program using the script editor.
What I'd LOVE is if someone could help me, and also explain the logic behind the solution. I'll probably need it in layman's terms, but I'd really like to start understanding how to manipulate spreadsheets - so I'm really keen to find out HOW something like the INDEX code works, and what the variables mean.
I've tried to fathom the explanations given by Google but, TBH, their way of explaining seems to require that you understand their solution before they explain it to you. The examples are very hard to relate to the formulae, because the description of the variables is not 'human' enough.
If anyone fancies a stab at my problem, and could take the time to explain the logic behind the solution, please know that I'll be forever thankful!
Regards,
Miles
I think this formula will work for you, but unfortunately it's a bit more sophisticated than would make it easy to understand. I placed it in P19 on the Invoice tab.
There are a few different ways to solve your problem, but i wouldn't use INDEX() for any of them.
=ARRAYFORMULA(QUERY({'EXAMPLE REVIEW SHEET'!A2:B,ROW('EXAMPLE REVIEW SHEET'!A2:B)},"select Col1 where Col2='MF' order by Col3 limit 4"))
If you were willing to have a numbering column to the left of the table in the "Review Sheet" it would make all of this much simpler and I could show you how to do it in a way that might make a bit more sense.
Thanks for answering so quickly!
The REVIEW SHEET is maintained by somebody else, but I have editing rights as I need to fill in my review comments. I was planning to keep a linked copy of REVIEW SHEET as a tab in my Work Spreadsheet. If I do this, then there's no problem with adding a numbering column, or any extra columns that you think will help.
Thanks again
Miles

Google Data Studio visualize data by frequency of the value

I have a very simple quiz like app which is basically a question and answer. I want to common mistakes of the user i.e. on which question user is making mistake most of the time. For that I have custom event which logs an event every-time a user answers a question wrong. So if there are 5 questions and user usually answers question 3 wrong than the common mistake for that user is question 3.
But in data studio I am not able to find any formula which gets the number of frequency of event value from the big query data-sets. I am looking for a way to implement this any help would be appreciated.
I am using firebase custom events which is linked to bigquery.
Do you want the output of the table to show the Questions on the left, Frequency on the right?
Or you want the output of the table to show the Users on the left, Questions (common mistakes) on the right?
For the first type, create a table, set Question as dimension, Record Counts as a metric.
For the second type, you can create a pivot table. set User as row, Questions as column, Record Counts as the metric

Google Forms question based on previous choice

I am collecting data from my students. I have their names, classrooms and attendee's numbers in a Google Spreadsheet.
I want to have a Google Forms where first they put their classroom (drop-down list). Then, they have to put their number (drop-down list). However, the number of options in this second question is not all the same. Each classroom has different number of students. So, the number of options for the second question is based on the first choice.
For the third question, I want them to put their name. To avoid them putting different name from what I have, I decided to put a drop-down list where the only available choice is their name (based on the answer of questions 1 and 2).
Is there a way to access the choices of previous questions before submitting them in order to determine the options for next questions?
For example, when the answer for first question is "A", there will be only four option for second question i.e. numbers 1-4. And, when the answer for this question is 4, then the only option for third question is "Doug".
I have tried using sections. But it will require so much works because there are more than 200 students in 16 classrooms. I tried using pre-filled forms (generating url for each students). This will require so much works too. Is there a way to access current response (not the last one) and use it to determine the next question's options? Thanks for the help.

Google Form Event / Spreadsheet Cell Move Query

I'm no programmer or anything of the sort. I have a Google form whose output I need to manipulate in a particular way.
The obvious stuff: When a response comes in I provide my folks at work a cell on the sheet that contains a copy of the form's output, outside of the form data area, to indicate that a particular individual has taken ownership of the response and indicate next steps--call this "spreadsheet only data". No problem adding a cell or two of course. However, as responses come in, the list will get long. So I'd like to sort based off of the response timestamp to bring current responses to the top. Again, no problem...for the form data. However if I sort all new responses to the top my spreadsheet, the "spreadsheet only data" will of course not move with the associated form data. Google forms are easy until you need to track additional data after form submission.
I have tried to abandon sorting and use a script I found to send users to the last edited field, thus providing the ease of sort without the sort problems, but that is just confusing for multiple users. Google does not provide a way to insert cells per se, but it does seem to let me get ranges and move them...as best as I can tell from pawing at the intricacies of scripting found in these forums and the older. This is beyond me if possible, but would it be possible to write a script that on form submit triggers to select a range of columns and move all of those selected cells down 1 row? I don't want to specify selected rows to be moved, just columns, given it is indeterminate how many may be present at any time.
To be clearer, I hope, the issue is that, when sorted, the "spreadsheet only" data will not move down with each new form submission, I hope to find a way to rectify that so that my folks aren't scrolling forever to get to their new response, as they would if I just kept the form data unsorted, and since multiple users make the any "go to last edited cell" solution problematic (the only other solution I can think of to make the unsorted list user friendly enough to where folks wont hate the process).
Thanks for anything anyone can do.
You can set up a filter by selecting just the header rows from the form submission table (gray box) and selecting "Filter" from the "Data" menu. This filter is also added to the "Spreadsheet Only" column as well.