MultipartRequest req = new MultipartRequest(request.raw(), workingDir.getAbsolutePath(), Integer.MAX_VALUE);
String configString = makeConfigFileForJavaGrader(req, workingDir);
SimpleFileIO.writeStringToTextFile(configString, workingDir.getAbsolutePath() + File.separator + "config.txt");
//run automark
JavaGraderDriver agm = new JavaGraderDriver();
//javaGraderDriverMap.put(id.toString(), agm);
String CSVString = agm.run(new File(workingDir.getAbsolutePath() + File.separator + "config.txt"));
//writing output
//csv
SimpleFileIO.writeStringToTextFile(CSVString, workingDir.getAbsolutePath() + File.separator + "result.csv");
//zip feedback
File feedbackDir = new File(workingDir.getAbsolutePath() + File.separator + "FeedBack");
File feedbackZIP = new File(workingDir.getAbsolutePath() + File.separator + "FeedBack.zip");
SimpleFileIO.zipDirectory(feedbackDir, feedbackZIP);
// make html output
String CSVHTMLString = createLinkToSubmissionFiles(agm.listOfAssignment(),
HTMLUtils.HTMLFromCSVString(CSVString),
id.toString());
//String HTMLOutputString = SimpleFileIO.readTextFromFile("/Users/psksvp/MyCode/junitGrading/Automark/src/Resources/WebUIHTML/result.html");
String HTMLOutputString = SimpleFileIO.readTextFromSelfJarBundleFile(this, GlobalSetting.programResourcePath() + "/WebUIHTML/result.html");
String[] keyList = {"/**JOBID**/", "/**BODY**/", "/**CSVURL**/", "/**FEEDBACKZIPURL**/"};