Add postgreduate program title

parent c9e72803
......@@ -216,7 +216,7 @@ $get = array_walk($csv_data, function (&$v, $k) use ($app, $amka_column, $settin
$min_years = 4;
try {
$response = $app->getStudentInformation($academic_id, $settings['auth_header_query']);
// gets entryYear,studentshipType,departmentName
// gets entryYear,studentshipType,departmentName,postGraduateProgram
if (mb_substr($response, 0, 5) === 'ERROR') {
$entry_year = -1;
$studentship_type = '-';
......@@ -233,6 +233,9 @@ $get = array_walk($csv_data, function (&$v, $k) use ($app, $amka_column, $settin
$studentship_type = $parts[1];
$first = mb_substr($studentship_type, 0, 1);
$department_name = $parts[2];
if (mb_substr($department_name, -1, 1, 'utf8') == ',') {
$department_name = mb_substr($department_name, 0, mb_strlen($department_name, 'utf8') - 1);
}
if ($first === 'Δ') { // Διδακτορικό
$min_years = 5;
} elseif ($first === 'Μ') { // Μεταπτυχιακό
......
......@@ -67,7 +67,7 @@ class Extract
'id' => $academic_id,
'username' => $this->settings['username'],
'password' => $this->settings['password'],
'fields' => 'entryYear,studentshipType,departmentName'
'fields' => 'entryYear,studentshipType,departmentName,postGraduateProgram'
];
$headers = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment