Exemplo n.º 1
0
 /** Finishes the invitation */
 public function invite($testsurvey_id, $participant_id, $concept)
 {
     $testinvite = $this->testInviteModel->create_testinvite($testsurvey_id, $participant_id);
     $testsurvey = $this->testSurveyModel->get_testsurvey_by_id($testsurvey_id);
     $participant = $this->participantModel->get_participant_by_id($participant_id);
     // Create the token in LimeSurvey (if we're on production)
     if (!SURVEY_DEV_MODE) {
         $this->load->model('surveyModel');
         $this->surveyModel->create_token($participant, $testsurvey->limesurvey_id, $testinvite->token);
     }
     // Email to participant and return to overview
     $flashdata = email_testinvite($participant, $testinvite, FALSE, $concept);
     flashdata($flashdata);
     redirect('/testinvite/', 'refresh');
 }
Exemplo n.º 2
0
 /**
  * Send the invitation to the participant
  */
 private function send_testinvite($testsurvey, $participant)
 {
     // Create the testinvite
     $testinvite = $this->testInviteModel->create_testinvite($testsurvey->id, $participant->id);
     // Create the token in LimeSurvey (if we're on production)
     if (!SURVEY_DEV_MODE) {
         $this->load->model('surveyModel');
         $this->surveyModel->create_token($participant, $testsurvey->limesurvey_id, $testinvite->token);
     }
     // Email to participant
     email_testinvite($participant, $testinvite, TRUE);
 }