KevinKelly25 / LearnSQL

LearnSQL, a website for learning SQL
1 stars 2 forks source link

Updated middleware for create/drop class functions from DB #94

Closed michaeltorres1 closed 5 years ago

michaeltorres1 commented 5 years ago

In this PR I have updated the middleware in order for the createClass and dropClass functions in order for the user to be able to create a class and drop a class through using the interface in teacherClasses.html. I also have updated some comments and added comments as well. In the function createClass in teacherControlPanel.js I have added parameters to reflect what is needed from the createClass function from classMgmt.sql. I have tested this PR and works on my end.

Please be sure that your user created has the attribute isTeacher to true in order to access the classes tab.

michaeltorres1 commented 5 years ago

After noticing some issues with my PR I have made a couple of updates...

Please make sure to check that the date is displayed correctly. Also by running --fix to automatically fix most of the issues that were found by linting, please make sure that this process did not make any unwanted changes.

KevinKelly25 commented 5 years ago

Thank you for the update. I am seeing a few things that need to get fixed:

The | date for the dates is a pretty cool feature I did not know about. Good find 👍

michaeltorres1 commented 5 years ago

Thank you for the review @KevinKelly25. I have fixed all the issues besides for bullet point 7 which does not fall into the scope of this PR. I agree we need to fix this soon however in the mean time I will go ahead and make an issue for this.

michaeltorres1 commented 5 years ago

I went ahead and fix merge conflicts so that there isn't any problems for approving the PR.

cinnaco commented 5 years ago

Thanks @michaeltorres1. This PR functions well after the issues noted by @KevinKelly25 were corrected. After reviewing the code, I have only one suggestion: when a teacher creates a class through the Add Class modal, the Join Password textbox should obfuscate the password. The teacher can always check the password before submitting using the browser supplied "peek" functionality.

michaeltorres1 commented 5 years ago

Thank you @cinnaco for your observation. I agree that the password should be obfuscated. I went ahead and masked the password so now all you should see is asterisks instead of the actual password.