How to Use Google Docs for Performance Review

Google forms for staff self-assessment: Creating customization


Like many institutions, Academy of Minnesota recently adopted the Google Apps for Pedagogy suite of tools for all students, staff, and faculty. Since the Academy Libraries moved to Google Apps, we've been discovering new ways to use the tools for productivity and collaboration. One of the most intriguing tools in the suite is Google forms. In essence, Google forms provide a user interface for entering information into a Google spreadsheet: They're an ideal tool for applications such as surveys and evaluations. Recently, nosotros discovered a way to extend Google forms by e-mailing customized data to each survey-taker based on how they answered questions on a course.

Our demand seemed straightforward: Nosotros were creating a self-assessment tool for library staff to allow them to approximate their level of expertise with various technologies. If the staff fellow member indicated that they needed to know more than about a topic, we wanted the tool to tell them how to gain more expertise. We mapped Aye/No statements ("I am aware of, and can explain the key differences between citation managers.") to content (the Moodle site for an Introduction to Citation Managers workshop); at present nosotros needed a way to requite the correct content to each person.

Our ideal solution would:

  • Provide a way to analyze results in the aggregate.
  • Appear simple and bonny.
  • Have a "not-for-grade" experience.
  • Allow multiple assessments in unlike areas.
  • Work with existing authentication methods, rather than requiring a separate user name or password.
  • Provide context (a paragraph of text) rather than merely links.
  • Requite each staff member a way to return to their custom content without retaking the assessment.

We explored several solutions, merely only Google forms supported almost all of the requirements natively.

Scripts, which are supported by Google Docs spreadsheets and forms, are the key to fulfilling our requirement for customized feedback the user tin encounter (almost) immediately, or relieve for later. Scripts are written in JavaScript and allow the designer to change the way a form or spreadsheet works. We wrote a script that would build an HTML fragment based on the user's responses, and sent that fragment as the body of an east-mail when the user submitted the course.

Working with scripts

In this department, we'll teach you how to create a solution similar ours by building an example step by pace. We assume that yous know how to create a Google class and add questions to it. After setting up a sample class, we'll show you how to:

  1. Open the script editor for a Google form with Aye/No questions.
  2. Write a procedure that runs when the user submits the class.
  3. Add together code to send the user an e-mail when they submit the form.
  4. Add together a second sheet with responses for each No answer.
  5. Add lawmaking to generate the trunk of the eastward-mail based on the user'southward responses.

Open up the script editor

Yous tin can add scripts to whatever Google spreadsheet. To see for yourself, follow these steps:

  1. Create a new grade in Google Docs.
  2. Requite the grade a title, cheque the box adjacent to Automatically collect respondent'south username and change the sample questions to multiple selection questions with Yes and No answers, as shown in Figure 1.If you lot are working with the public version of Google Docs, you won't run across the pick to collect the respondent'due south username. Instead, add a question with a text box for the respondent to enter an eastward-mail address.
  3. Click the Save button to save the form.
  4. Go to the spreadsheet for this class by clicking the See Responses button and choosing Spreadsheet.
  5. From the Spreadsheet menu, choose Tools | Scripts | Script Editor. The script editor opens, as shown in Figure two.


Figure one. To follow the instance, add Yes/No questions to the form.


Effigy 2. Apply the script editor to add JavaScript lawmaking.

Sending an e-mail from code

Once in the editor, you tin add lawmaking to the default myFunction procedure, or write procedures of your own. You can run the procedures you write from the spreadsheet'south Tools menu, but more likely you'll want your procedures to run when something happens in the spreadsheet itself. In our solution, the code runs when the user submits an instance of the form.

Much of the code you write will require yous to collaborate with some object: the spreadsheet, the browser, or an electronic mail bulletin. The Google Apps Script documentation (http://code.google.com/googleapps/appsscript) describes all of the supported objects.

You can write scripts that read or edit Google Apps objects such as calendar events or contacts, or sends e-mail messages. For our solution, nosotros desire to send an electronic mail to the person submitting the course.

In a general Google Apps course, you could collect the submitter'due south electronic mail address as part of the form. Because nosotros work in a Google Apps for Instruction environs, we set the form to automatically collect the submitter'south user name. In either case, the code will need to determine the e-mail address based on the electric current example of the grade. The information is part of the result, which tin exist passed to the event handler every bit an statement.

For a Form Submit effect, the event argument contains an array of the values entered in the form'south spreadsheet. The array elements are numbered starting at 0 for the submission'due south time stamp. In our instance, the assortment chemical element numbered 1 contains the user name.

To make certain the event is passed to the result handler, and change the code to transport an eastward-mail service, follow these steps:

  1. In the script editor, add a variable, eastward, to the myFunction declaration:role myFunction(eastward) {
  2. Add a line of code to call the MailApp object's sendEmail method:function myFunction(e) {  MailApp.sendEmail(e.values[1], "Suggested resources for you lot","Message body");}Note that in this and subsequent code snippets, the lawmaking you need to add together is in assuming. Surrounding lines of code are included for context.
  3. Salvage the script.
  4. To re-save the trigger cull Triggers |Electric current Script'south Triggers and then click Save.
  5. Click Authorize on the popup window that appears to allow your script to send email.
  6. Move to the spreadsheet window.
  7. Cull Form | Go to live form to open up a new instance of the course.
  8. Choose responses for the questions and uncheck the Send me a re-create box.
  9. Click Submit.
  10. Shut the acknowledgement window and check your email. Soon, you should receive the Suggested Resources message.

Adding responses to the spreadsheet

As the solution stands now, the submitter receives the same message every time. To customize the bulletin, we demand to build the trunk of the bulletin based on the submitter's responses. To make our solution easy to maintain, we chose to put the responses into the spreadsheet itself. The lawmaking looks for No answers in the gear up of answers (indicating the submitter wants more information) and adds text from the corresponding spreadsheet cell to the body of the message. By using this method, the code is written one time and never touched again. Everything bailiwick to modify—the number and text of questions, the responses for each—can be changed from the spreadsheet or course itself rather than in the code.

To make the required changes to the spreadsheet, follow these steps:

  1. Add a second canvas to the spreadsheet and name information technology Response.
  2. Select the beginning column (A) and choose Edit | Named Ranges | Define new range from the menu.
  3. Name the range Resources, as shown in Figure 3.
  4. Click Salvage, then click Done to close the Range Names dialog box.The Resource cavalcade will concord the response text. Note that the example merely includes text, only y'all tin can include HTML if you like. Yous can use column B to help y'all keep track of which response matches to which question or column on Sheet1.
  5. Add text to the Response sail, every bit shown in Figure 4.


Figure iii. Naming cells or ranges of cells makes information technology easier to refer to them in the script.


Figure four. The user receives the text in column A if they reply "No" to the respective question.

Generating the trunk of the email

Now that the responses are in place, you lot can write the code to transport appropriate resources. This requires looping through the items in the e.values assortment, starting with detail 2. (Remember that items 0 and 1 comprise the time stamp and the user name.) If looping in JavaScript is new to you, see the resource list at the cease of the article for some suggested resources.

To get to spreadsheet content non entered in the form, you need to utilize the Google Spreadsheet object model. The object at the height of this hierarchical model is SpreadsheetApp. You can utilise the SpreadsheetApp object to detect the active spreadsheet, and and then refer to sheets, cells, or ranges inside that spreadsheet as needed.

To add code for the custom response, follow these steps:

  1. Apply the SpreadsheetApp object to become the Resources range with the active spreadsheet. Now that the process contains more than code, the code snippets include simply enough for context rather than the entire procedure. In the script editor, add the following lawmaking:function myFunction(east) {var resourceRange = SpreadsheetApp.getActiveSpreadsheet().getRangeByName ("Resources");
  2. Add together a variable for the body of the bulletin:var range = SpreadsheetApp.getActive.Spreadsheet( ).getRangeByName("Resources");var resourceLines = "";
  3. Figure out how many questions there were on the form:  var resourceLines = "";var len=e.values.length;
  4. Loop through the responses, looking for No answers:Var len=e.values.length;for(var i=2; i<len; i++) {var response = e.values[i];if (response == "No") { } }
  5. For No responses, utilise the Range object's getCell method to get the response using row,column coordinates, and append its value (as well every bit an HTML line intermission) to the resourceLines string:if (response == "No") {var newLine = resourceRange. getCell(i-1,ane).getValue();resourceLines += newLine;resourceLines += "<br/><br/>";}
  6. Change the sendMail arguments to send the resourceLines value as the body of the eastward-postal service. Note that if the output includes HTML tags, the method call must exist adjusted to transport HTML:    resourceLines += "<br/><br/>";  }}MailApp.sendEmail(e.values[one], "Suggested resources for you", resourceLines, {"htmlBody" : resourceLines}); }
  7. Salve the script.
  8. At this point, your script should await like Effigy 5.
  9. Render to the spreadsheet and cull Form | Go to alive form.
  10. Choose No for the question responses, and uncheck the Transport me a copy box.
  11. Click Submit.
  12. Close the acknowledgement window, and check your e-postal service. The response should be similar to Figure 6.


Figure 5. The script editor uses colors to make the lawmaking easier to read.


Figure six. The e-post message contains basic text, but could include HTML formatting.

Determination

In this commodity nosotros've introduced you to Google'southward scripting platform past showing you how we put together a solution to our particular problem. You can use Google scripts for much more, both within spreadsheets and in a Google Site. Bank check out the references at the end of the commodity for tutorials and many more examples.two


Notes

ane. To see a working case of the solution presented here, go to http://z.umn.edu/googlescript. You can view the Google spreadsheet and make a copy of your own. To have a sample assessment and receive the response electronic mail yourself, go to http://z.umn.edu/umncapim and click the Library Staff Cess and Preparation link in the navigation menu on the left.
ii. There are all-encompassing resources available on the Web, which will requite yous samples of code that does something similar to what you need. Try searching for JavaScript and an appropriate keyword(s) to search for helpful examples. There are many JavaScript books available. One popular example is Flanagan, D. , JavaScript: The Definitive Guide: Activate Your Web Pages (Beijing; Farnham: O'Reilly, 2011 ).

Google offers extensive script documentation on its Spider web site. Start with these pages:

  • http://lawmaking.google.com/googleapps/appsscript/.
  • http://lawmaking.google.com/googleapps/appsscript/guide.html.
  • http://code.google.com/googleapps/appsscript/allservices.html.

Copyright © 2011 Janet Fransen, Megan Kocher, and Jody Kempf

Commodity Views (Final 12 Months)

Contact ACRL for article usage statistics from 2010-April 2017.

Commodity Views (By Year/Month)

2022
Jan: 266
Feb: 179
March: 207
April: 68
2021
January: 382
February: 504
March: 445
April: 383
May: 221
June: 226
July: 209
August: 262
September: 264
October: 298
November: 244
December: 204
2020
Jan: 80
February: 111
March: 138
April: 231
May: 286
June: 278
July: 246
August: 188
September: 261
October: 254
November: 279
December: 329
2019
January: 120
February: 75
March: 55
Apr: 49
May: 49
June: 57
July: 57
August: 71
September: 73
October: 61
November: 53
December: 61
2018
Jan: 28
February: 32
March: 60
Apr: 108
May: 158
June: 124
July: fourscore
August: 83
September: 72
October: 115
November: 115
December: 75
2017
April: 0
May: ix
June: xiii
July: 11
August: nineteen
September: 18
October: xx
November: 29
December: 27

beadleconed1959.blogspot.com

Source: https://crln.acrl.org/index.php/crlnews/article/view/8653/9094

Belum ada Komentar untuk "How to Use Google Docs for Performance Review"

Posting Komentar

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel