Closed liavt closed 8 years ago
Can we not build a customized spreadsheet? Create a new spreadsheet and update the remote URL. I would prefer to not mix the two grades together.
But then we need 2 different versions of the code, which is annoying
I have an idea. We add another user property that represents grade, and based on that, it chooses the control panel.
To figure out grade, we can do 3 things:
But before we can start on anything, we need to get the roster for the second years to test.
I think it would be easier to ask them only for their name, and then we can figure out what grade they're in. I agree that we should ask them before loading the spreadsheet though.
But we should also create a debug spreadsheet, program, and branch to test this.
I did create a test spreadsheet. See the link in Issue #11, or in "Shared with me" on Google Drive.
@liavt do you have a copy of the control panel?
Adding one now to the folder
Changes have been merged in. I think we are ready to go live with this.
@liavt I'm trying to figure out a way to present a menu, but the menu always gets overwritten by the next message. Any ideas?
Sorry I didn't respond. I was out of town. But about the overwriting, can you possibly show me where this is happening?
I already reverted that, since it was broken, but here's a summary of what happened.
I tried doing a while loop that blocked until the valid grade variable was set to true, but that just froze the entire script.
To test, try the code from here. grade.html already exists in the test script, so just paste in the code and go. You'll see what I mean.
Make another user variable called "init" which is set to true after their grade is set. If init is false or null, checkVersion() doesn't do anything
That causes the entire script to terminate, which means that you need to refresh in order for it to continue and ask you for your name.
I think this is ready to go. The menu is something we can work on later, but it's not very important. When deploying this, make sure to update the link to the 10th grade control panel in the getGradeSpreadsheet() function.
Mrs. Hirsh has asked to make this compatible with 10th graders. This means there are 2 separate control panel spreadsheets. We need to find a way to 1. figure out which grade the user is 2. get the correct schedule from the correct grade