#!/software/php/bin/php <?php if(isset($missingVar)) echo "[ERROR] " ?>Emailing handmarked submission Error! Required variable $missingVar not provided

"; else: initialize($assign); $tmpfile = tempnam("/tmp", ".do_mailing." . COURSE); $handle = fopen($tmpfile, "w"); fwrite($handle, "Mark earned: $mark\n\n"); fwrite($handle, $comments); fclose($handle); $handle = fopen(MARKS_DIR."/$userid", "w"); fwrite($handle, "$mark\n"); fclose($handle); # Log who marked what $infofile = CURRENTLY_MARKING_DIR."/$userid"; $submissionid = trim(shell_exec("tail -n 1 \"$infofile\"")); $logfile = fopen(MARKING_LOG_DIR."/".MARKER_ID."_" . $submissionid, "w"); fwrite($logfile, $comments); fclose($logfile); ?>

Results being mailed with the following command:

> \"".PROCESSED_DIR."/$userid\"");

unlink(CURRENTLY_MARKING_DIR."/$userid");
unlink($tmpfile);
?>

Return to the dequeue page