I am an instructor. I share a template_spreadsheet with students. I want a function that will copy the template_spreadsheet to the student's local drive as student_spreadsheet and then have the function edit the student_spreadsheet. I don't know how I would do that.
I have looked at this code: How to copy google drive folder into another google drive account by using App Script? and it is similar to my problem, but that code still doesn't show how to do that without knowing the target folder (I need to figure out how to get access to the student's drive).
function createCopy(){
var template_spreadsheet = SpreadsheetApp.openById(template_spreadsheet_id);
var student_spreadsheet = template_spreadsheet_id.copy(template_spreadsheet.getName());
return student_spreadsheet;
}
This obviously just copies the template to my own Google Drive. I want it to copy to the students' Google Drive that I have shared it with.