Week7: 3/19 - 3/25

Goal for the week

  • Decide all the preferred amount of time and add data to the Spreadsheet accordingly
  • Implement functions to retrieve CS modules only when you click subject as CS.
  • Implement functions to retrieve modules except for icebreakers and introduction if you click 'none' for icebreakers and introduction.

Mar 19

When adding modules, I came to realize that some modules like mandatory readings are not bound to any subject, but is applied to all subjects. So I decided to add another tag "ALL" in order to indicate that some modules can be applied to every subject. Because otherwise, I will end up having to add four repetitive data.

  • I added all the modules from the MaGE website to the Spreadsheet up to Session 3.
  • Then I came to realize, if we just extract data from the Spreadsheet, what about the order of the whole curriculum? Which one would show up first and which one shows up last?
    • I will need to manually call functions. For example, first base off from the original curriculum, and follow the curriculum from the MaGE website.
  • Do I need to have different categories of activities? Because, how do you distinguish which one is code-review activity and just discussion-like activity?

Mar 21

  • I chose Spreadsheet over MongoDB for its simplicity

However, there are limitations about using Spreadsheet. Since it's not a tag-based database, it makes it harder to check when the data can fall into two categories. For example, it would be hard to figure out if the code-review activity is a spare-time activity or the code-related activity if we just have one activity column.

As a solution, I need to re-format the column label that I currently have it as a "Type". Instead of having a type, I'm going to make each type as each different column: "Activity", "Introduction", etc as Yes or No.

Another downside of Spreadsheet is that it is hard to make dependencies. But it's not impossible. I will do so by providing each different unique ids to each module, and have another column to state its dependencies.

Mar 24

  • Created a function, writeModules() in Main.html that adds modules for a specific amount of time. Because the number of returned modules are different based on the user inputs, I created a function to write modules in a more flexible way.
  • I did so by creating a div, which contains headers, icons, and paragraphs.

<-- Now, by specifying the number, I can add modules how many times I want. for example, this is the result I get when I call it to iterate for 4 times.


<-- still being able to extract the data from Spreadsheet

  • How to display the corresponding data to the result page?

<-- This is how you call the method that is in the server side. getModuleLen() gets the data from Spreadsheet, and pass the data to writeModules method.






<-- then include the "data"

  • But I should create methods for retrieving all of module name, type, length, and description. Since the way I just did it doesn't work since there's just one parameter allowed, I should take different approaches to create other methods.
  1. I tried making a global variable of moduleName that the set the value whenever the method is called. For example, I have setLen(data) function that sets moduleName = data, and createTextNode on (moduleName), but I get undefined value.
  2. I tried implementing a method getLen(data) which returns data, and call that function inside the argument of createTextNode. ex) createTextNode(google.script.getLen().getModuleLen(); but I also get undefined value.

Mar 25

  • Reformat the Spreadsheet database by adding id and each column for types
Curriculum Generator