Skip to content
This repository was archived by the owner on Jul 21, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,28 @@
"dependencies": {
"@auth0/cosmos": "^0.7.2",
"@reach/router": "^1.0.5",
"@types/google-apps-script": "0.0.33",
"@types/react-dom": "^16.0.10",
"@wojtekmaj/react-timerange-picker": "^2.0.0",
"draft-js": "^0.10.5",
"draftjs-to-html": "^0.8.4",
"firebase": "^5.5.9",
"lodash": "^4.17.11",
"moment": "^2.22.2",
"react": "^16.6.3",
"react-datetime": "^2.16.2",
"react-dom": "^16.6.3",
"react-draft-wysiwyg": "^1.12.13",
"react-kronos": "^1.7.1",
<<<<<<< HEAD
"react-scripts": "^2.1.1"
=======
"@types/react-dom": "^16.0.10",
"firebase": "^5.5.9",
"react": "^16.6.3",
"react-dom": "^16.6.3",
"react-scripts": "^2.1.3"
>>>>>>> 2f8153a43664a408c9a3ce83a5131d875f56b509
},
"scripts": {
"auth0workaround": "del-cli node_modules/@auth0/cosmos/meta/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions scripts/GoogleForm/.clasp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"scriptId":"1F2HHl_86czevLioec7kWnkmluWGR2WkYj2vBAsYZ1SXQ1q_Czc48pRk2"}
45 changes: 45 additions & 0 deletions scripts/GoogleForm/GoogleForm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
var descripitonStandard : string = 'Thank you for participation. We hope you had as much fun attending as we did organizing it. We want to hear your feedback so we can keep improving our talks, events and workshop. Please fill this quick survey and let us know your thoughts.'
function doGet() {
return ContentService
.createTextOutput('ERROR - Please use the post request.')
}

function doPost(e) {
var data = JSON.parse(e.postData.contents)
var form = FormApp.create(data.title + ' - Feedback');
form.setDescription(data.description || descripitonStandard)
data.talks.forEach(talk => {
form.addScaleItem()
.setBounds(1, 5)
.setTitle('How helpful was ' + talk.title + ' By ' + talk.speaker)
.setLabels('Not very', 'Very much' )
});
form.addScaleItem()
.setRequired(true)
.setBounds(1, 5)
.setTitle('How satisfied are you with the event?')
.setLabels('Not very', 'Very much')
form.addTextItem()
.setTitle('What would you like to discuss in next roundtable discussion?')
form.addTextItem()
.setTitle('Tell us why (Additional feedback)')
form.addTextItem()
.setTitle('Stay connected with us?')
.setHelpText('Enter your email to get updates on upcoming events like our monthly meetups, as well as to receive photographs from today')
form.addMultipleChoiceItem()
.setTitle('What best describes your role?')
.setRequired(true)
.setChoiceValues(['Software Engineer - Android', 'Software Engineer - Other', 'Data Scientist', 'Designer', 'Product Manager'])
.showOtherOption(true);

var result = {
status: 'The Form Has Been Successfully Published',
url: form.getPublishedUrl(),
edit_url: form.getEditUrl()
}

Logger.log('Result : ' + result);
return ContentService
.createTextOutput(JSON.stringify(result))
.setMimeType(ContentService.MimeType.JSON);
}
44 changes: 44 additions & 0 deletions scripts/GoogleForm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Google Form Creation by using Google App Script and POST request.

# Deploy

clasp deploy

# Required Parameters

***Json Object to be passed in the body of the post request***

{
"title": "GDG MAD Feb",
"description": "A description",
"talks": [
{
"title": "RxJava - Intro and Beyond",
"speaker": "Jitesh"
},
{
"title": "DApps - Intro and Beyond",
"speaker": "Preet"
},
{
"title": "Flutter - ...",
"speaker": "XYZ!"
}
]
}

If the description is null a default description will be used :


Thank you for participation. We hope you had as much fun attending as we did organizing it. We want to hear your feedback so we can keep improving our talks, events and workshop. Please fill this quick survey and let us know your thoughts.



***Response Sample***

{
"status": "The Form Has Been Successfully Published",
"url": "https://docs.google.com/forms/d/e/1FAIpQLSfMb5uqzxOjrzacVlVJAUDX2I6HEZ-pE7BA6nKFc1viUd08OQ/viewform",
"edit_url": "https://docs.google.com/forms/d/1B3zOLeQ2dRBJsNCtFYMy0YjriOR-lWJ1dJOOeVpqdSc/edit"
}

9 changes: 9 additions & 0 deletions scripts/GoogleForm/appsscript.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"timeZone": "Asia/Kolkata",
"dependencies": {},
"webapp": {
"access": "ANYONE_ANONYMOUS",
"executeAs": "USER_DEPLOYING"
},
"exceptionLogging": "STACKDRIVER"
}