$assId = "-1"; $assCourse = "-1"; if (isset($_COOKIE["assIdUpdate"])) { $assId = $_COOKIE["assIdUpdate"]; } if (isset($_COOKIE["email"])) { $email = $_COOKIE["email"]; } if (isset($_COOKIE["id"])) { $id = $_COOKIE["id"]; } $assCourse = GetMenteeCourse($email); if ($assId == "-1" || $assCourse == "-1" || $email == "-1" || $id == "-1") { die("Oops! We encountered an error while submitting your solution. Please go back and try again."); } else { if (move_uploaded_file($_FILES['fileUpdateSolution']['tmp_name'], $UploadDirectory . $NewFileName)) { // save the link to the database. $mentorId = GetMentorIDOfMentee($email, $id); $resp = updateSubmission($id, $mentorId, $assId, $assCourse, $UploadDirectory . $NewFileName); if ($resp == "1") { echo "Submission Updated Successfully."; } else { echo "Oops! We encountered an error in updating your submission. Please try again."; } } else { die('error uploading File!'); } } } else { die('Something wrong with upload! Is "upload_max_filesize" set correctly?'); }
$hasChangedMarking = true; if (!saveMarking($points, $tutorComment, $status, $submissionID, $markingID, $leaderID, $uid, $exerciseId)) { $RequestErrorMarking = true; //echo "FAIL"; } } // check for changed submission attributes $changed = false; $accepted = isset($foundValues['accepted']) ? $foundValues['accepted'] : 0; if (!isset($exercise['oldAccepted']) && isset($foundValues['accepted']) || isset($exercise['oldAccepted']) && $accepted != $exercise['oldAccepted']) { $changed = true; ///echo "D"; } if ($changed) { $hasChangedSubmission = true; if (!updateSubmission($submissionID, $accepted)) { $RequestErrorSubmission = true; //echo "FAIL"; } } } else { //$GroupNotificationElements[$key] = $notifications + $f->notifications; //$RequestErrorMarking = true;echo "OK"; } } if ($hasChangedMarking) { if ($RequestErrorMarking) { //$msg = "Beim Speichern für ".$userName." ist ein Fehler aufgetreten."; $msg = Language::Get('main', 'errorSaveMarking', $langTemplate); if (!isset($GroupNotificationElements[$key])) { $GroupNotificationElements[$key] = array();