Skip to content

Commit

Permalink
Change import script to reflect new data template
Browse files Browse the repository at this point in the history
  • Loading branch information
eberhardtm committed Apr 25, 2019
1 parent 610dfa3 commit 927c4c2
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions contrib/importInternships.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,18 @@
$values['last_name'] = $line[0];
$values['first_name'] = $line[1];
$values['banner'] = $bannerId;
<<<<<<< HEAD
$values['gpa'] = $line[3];
$values['start_date'] = strtotime($line[11]);
$values['end_date'] = strtotime($line[12]);
$email = explode('@',$line[4]);
$values['faculty_id'] = $line[10];
=======
$values['gpa'] = $line[4];
$email = explode('@',$line[5]);
>>>>>>> 610dfa3af90016126082fe3374d5fad7b513a9f5
$values['email'] = $email[0];
$agency = trim($line[6]);
$agency = trim($line[5]);
$agency_id = agencyExists($agency);
if(!$agency_id){
$agency_id = createInternAgency($agency);
Expand All @@ -69,10 +77,12 @@
continue;
}
$values['agency_id'] = $agency_id;
$values['loc_state'] = 'NC'; // Data sheet does not have a good location field. They need to fix this
$values['loc_city'] = $line[6];
$values['loc_state'] = $line[7];
$values['loc_zip'] = $line[8];
$values['clinical_practica'] = 1;
$values['course_no'] = $line[14];
$values['credits'] = $line[15];
$values['course_no'] = $line[13];
$values['credits'] = $line[14];

$intern_result = createInternship($db, $values);

Expand Down

0 comments on commit 927c4c2

Please sign in to comment.