Saturday 5 January 2019

Student Feedback system - HTML form - part 1

This section focuses on the main part of the student feedback system designed for the Law department - the HTML form used by tutors to provide student feedback, as such it has been broken down into 3 parts:
  1. getValues - the function designed to lookup the name of a student and gather their corresponding feedback (if any) to pass this through to the HTML form.
  2. htmlForm - the form which provides a user-friendly way to add/change student feedback data through dropdown and free-text boxes.
  3. writeBack - the function that takes the data from the submitted form and puts it back into the spreadsheet depending on which tutor has completed it.
1. getValues
Image of the Student Selection Screen
Student Selection Screen for picking a student to provide feedback for
On the Welcome sheet a tutor selects a name from the dropdown and clicks the submit button (which is assigned the function openHTML). The getValues function gathers data from the spreadsheet and runs the getActiveUser script to determine if tutor 1 or 2 is accessing the data. It then creates a loop to lookup the student from the dropdown on the Welcome sheet to the relevant row on the Group Feedback sheet - to find their data. We add 2 to this row value as the first two rows contain column headings.

By feeding in the row number of the student we can use 'getRange' to get an array of the data, leading on to the creation of key/value pairs. These pairs are then turned into a JSON string ('stringify') that can be used by the HTML form.

No comments:

Post a Comment