The late-day system has helped me provide accommodation over many past semesters. However, I am now experimenting with allowing redoes instead giving late days. As a result, this repository is archived.
Management of late day requests using Google Forms and Google Sheets
-
Create the configuration file
config/config.ts
from the sampleconfig/sample.ts
. -
Run the following commands:
# install dependencies npm ci # build the JavaScript code npm run build # log into your Google account (if not globally logged in yet) npm run clasp login # create a new Google Apps Script project npm run clasp create -- --type standalone --title "Late Days Script" # deploy the code to the newly created Google Apps Script project npm run deploy
-
Run
npm run clasp open
to open the on-line script editor in the browser, and then execute the top-level functioninit
within the opened script editor to genetare a new form and a new spreadsheet. The URLs of the form and the spreadsheet will be printed in the execution log. (It is safe to run this function multiple times as it would not perform any action if the form and the spreadsheet have already been generated.)
-
Run the following commands after updating the code:
npm run build npm run deploy
If the configuration is changed, you should also regenerate the form after updating the code:
- Run
npm run clasp open
to open the on-line script editor in the browser, and then execute the top-level functionregenerateForm
within the opened script editor to regenerate the form.
It is possible to execute top-level functions directly from the command line (instead of using npm run clasp open
and your browser), but a much more advanced setup is needed. Carefully follow clasp’ documentation on clasp run
to enable this feature. (Caveat: it seems executionApi.access
in application.json
can remain to be MYSELF
unless you want others to run the script; in other words, you do not have to modify application.json
at all.)
Copyright 2020--2022 Kerno Development Team