/** * Send the grading of a project to its project manager if the submission is complete * * @param string $submissionFormIdentifier * @param boolean $testMode */ public function sendGradingToProjectManagerAction($submissionFormIdentifier, $testMode = TRUE) { $this->checkAdministratorAndDenyIfNeeded(); $projects = $this->projectRepository->findBySubmissionFormIdentifier($submissionFormIdentifier); foreach ($projects as $project) { /** @var \GIB\GradingTool\Domain\Model\Project $project */ if (!is_null($project->getSubmissionLastUpdated()) && !empty($project->getSubmissionContent())) { $message = 'Send Grading for Project ' . $project->getProjectTitle() . ' to ' . $project->getProjectManager()->getPrimaryElectronicAddress()->getIdentifier() . '.'; if (!$testMode) { $this->submissionService->sendGradingToProjectManager($project); print '[!!!] ' . $message . PHP_EOL; } else { print '[TEST] ' . $message . PHP_EOL; } } } die; }