# Student Feedback Form

## Source Code

```javascript
function myFunction() {
  // What period is it?
  var period = 1;
  // How many groups are there?
  var groups = 5;
  
  var sheet = SpreadsheetApp.create('Student Feedback Forms - Period ' + period);
  sheet.getRange('A1').setValue('Group #');    
  sheet.getRange('B1').setValue('Published URL');
  sheet.getRange('C1').setValue('Edit URL');
  var spreadSheetRowNumber = 2;
  
  // use a loop to create each Google Form  
  for (x = 1; x <= groups; x++) {
    var form = FormApp.create('Period ' + period + ' - Group ' + x);
    var item = form.addMultipleChoiceItem();
      item.setTitle('Did the App behave per the specifications they listed in their CSP 3.4 Worksheet?');
      item.setChoiceValues(['Yes','No']);
    form.addMultipleChoiceItem()
      .setTitle('Did you find any bugs? Was there anything confusing or broken?')
      .setChoiceValues(['Yes','No']);
    form.addParagraphTextItem()
      .setTitle('If yes, what were they?');
    form.addParagraphTextItem()
      .setTitle('What did you like about their App?');
    form.addParagraphTextItem()
      .setTitle('What are your recommendations on improving their App?');
    
    // Push these values to a Google Sheet for easy reference
    // cast the spreadSheetRowNumber to a string
    n = spreadSheetRowNumber.toString();
    sheet.getRange('A' + n).setValue(x);    
    sheet.getRange('B' + n).setValue(form.getPublishedUrl());
    sheet.getRange('C' + n).setValue(form.getEditUrl());
    // increment the spreadSheetRowNumber
    spreadSheetRowNumber += 1;
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.appsscript.org/student-feedback-form.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
