Package edu.pdx.cs.joy.grader


package edu.pdx.cs.joy.grader

This package contains classes that are used to keep track of students, grade projects, and submit assignments for The Joy of Coding.

When we test student code, we run a security manager to ensure that their code does not do anything malicious and to allow us to run multiple invocation of a main without the JVM exiting. We also employ a policy file that looks like this:

// Privileges for Dave's code and student's code

// Dave's code
grant
  codeBase "file:/u/whitlock/jars/joy.jar",
  codeBase "file:/u/whitlock/jars/grader.jar",
  codeBase "file:/u/whitlock/jars/xerces.jar",
  codeBase "file:/u/sjavata/classes-dave"
{
  // Let my code do anything
  permission java.security.AllPermission;

};

// Student's code
grant
  codeBase "file:/u/sjavata/classes"
{
  permission java.file.FilePermission
    "${user.home}/proj2/-", "read, write";
  permission java.net.SocketPermission
    "localhost:12345", "accept,connect,listen";
};

A command line would look like:

$ java -Djava.security.policy=/u/sjavata/grader.policy \
  -cp ~/classes-dave:/u/whitlock/jars/examples.jar \
  edu.pdx.cs.joy.grader.TestProject0b \
  -studentClasses ~/classes whitlock