CS520 Grading HomeworkThe main part of grading is to deploy and run the webapp. Since you are going to grade 20~30 students per class, you'd want to do it as efficiently as possible. This guide will describe what I usually do, and if you find a more efficient way, please let me know. The instructions are for Windows with Cygwin command line console. Using regular Windows command line should be quite similar, but in either case you need to make sure the commands you want to run are included in the PATH environment variable. Preparation1. Download the latest Tomcat 7 zip package and unzip it to a local folder $TOMCAT. Edit $TOMCAT/conf/tomcat-users.xml to add a user with the manager-gui role. For example: <user username="cysun" password="abcd" roles="manager-gui" /> Double click $TOMCAT/bin/startup.bat. This will start a Tomcat server on the localhost at port 8080. You can edit $TOMCAT/conf/server.xml to change the port number if necessary. Open a browser and go to http://localhost:8080. Click on Manager App, enter the username and password of the manager-gui user to access the Tomcat Webapp Manager interface. 2. Create an empty PostgreSQL database (and a MySQL database if the students are allowed to use MySQL). For this quarter it should be ttt with username ttt and password abcd. 3. Download all the submissions from CSNS as a zip file and unzip it to a local folder $HW. GradingOpen a command line console and change directory to $HW. The following steps are all performed on command line: > cd <student>
> unzip ttt-src.zip
> cd ttt
> psql ttt < src/main/scripts/ttt-create.sql
> mvn package
Deploy the webapp by uploading $HW/<student>/ttt/target/ttt.war in the War file to deploy section of Tomcat Manager. If the deployment is successful, the webapp will appear in the Applications section with its Running status being true. You can then click on its path to go to the webapp. After you are done grading the webapp, undeploy it by clicking on Undeploy in Tomcat Manager, then clear the content of the database and change the directory back to $HW: > psql ttt < src/main/scripts/ttt-drop.sql
> cd ../..
To grade another submission, simply repeat the step above.
|