Пример #1
0
 public static function createOrUpdate(MongoId $jobId, array $questions)
 {
     $application = new ApplicationJob($jobId, ['questions' => $questions]);
     $setSuccess = ApplicationModel::setJobApplication($jobId, $application->getData());
     if (!$setSuccess) {
         return false;
     }
     // Update student applications saved for this job to be new list of
     // questions.
     self::updateSavedApplications($jobId, $application->getData());
     return true;
 }