.getParameter(STUDENT_NUMBEROFSUBMISSIONS));
String fromStudent = "";
String toStudent = "";
int points = 0;
Text justification = new Text("");
Text commentsToStudent = new Text("");
String courseID = req.getParameter(COURSE_ID);
String evaluationName = req.getParameter(EVALUATION_NAME);
String teamName = req.getParameter(STUDENT_TEAMNAME);
// Make sure the deadline is not up yet, including grace period
Evaluations evaluations = Evaluations.inst();
Calendar now = Calendar.getInstance();
Calendar deadline = Calendar.getInstance();
Evaluation evaluation = evaluations.getEvaluation(courseID,
evaluationName);
deadline.setTime(evaluation.getDeadline());
deadline.set(Calendar.MINUTE, deadline.get(Calendar.MINUTE)
+ evaluation.getGracePeriod());
now.add(Calendar.MILLISECOND,
(int) (60 * 60 * 1000 * evaluation.getTimeZone()));
if (now.after(deadline)) {
resp.getWriter().write(
MSG_STATUS_OPENING + MSG_EVALUATION_DEADLINEPASSED
+ MSG_STATUS_CLOSING);
}
else {
for (int x = 0; x < numberOfSubmissions; x++) {
fromStudent = req.getParameter(STUDENT_FROMSTUDENT + x);
toStudent = req.getParameter(STUDENT_TOSTUDENT + x);
points = Integer.parseInt(req.getParameter(STUDENT_POINTS + x));
justification = new Text(req.getParameter(STUDENT_JUSTIFICATION
+ x));
commentsToStudent = new Text(
req.getParameter(STUDENT_COMMENTSTOSTUDENT + x));
submissionList.add(new Submission(fromStudent, toStudent,
courseID, evaluationName, teamName, points,
justification, commentsToStudent));