mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
Merge branch 'ci' of https://github.com/FH-Complete/FHC-Core into ci
This commit is contained in:
@@ -55,36 +55,35 @@ class Prestudentstatus extends APIv1_Controller
|
||||
*/
|
||||
public function postPrestudentstatus()
|
||||
{
|
||||
$prestudentstatus = $this->_parseData($this->post());
|
||||
|
||||
if ($this->_validate($prestudentstatus))
|
||||
{
|
||||
if (isset($prestudentstatus['ausbildungssemester']) && isset($prestudentstatus['studiensemester_kurzbz']) &&
|
||||
isset($prestudentstatus['status_kurzbz']) && isset($prestudentstatus['prestudent_id']))
|
||||
{
|
||||
$pksArray = array($prestudentstatus['ausbildungssemester'],
|
||||
$prestudentstatus['studiensemester_kurzbz'],
|
||||
$prestudentstatus['status_kurzbz'],
|
||||
$prestudentstatus['prestudent_id']
|
||||
);
|
||||
$prestudentstatus = $this->_parseData($this->post());
|
||||
|
||||
if ($this->_validate($prestudentstatus))
|
||||
{
|
||||
if(isset($prestudentstatus['new']) && $prestudentstatus['new'] == true)
|
||||
{
|
||||
$result = $this->PrestudentstatusModel->insert($prestudentstatus);
|
||||
}
|
||||
else
|
||||
{
|
||||
$pksArray = array($prestudentstatus['ausbildungssemester'],
|
||||
$prestudentstatus['studiensemester_kurzbz'],
|
||||
$prestudentstatus['status_kurzbz'],
|
||||
$prestudentstatus['prestudent_id']
|
||||
);
|
||||
|
||||
$result = $this->PrestudentstatusModel->update($pksArray, $prestudentstatus);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->PrestudentstatusModel->insert($prestudentstatus);
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
$result = $this->PrestudentstatusModel->update($pksArray, $prestudentstatus);
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
private function _validate($prestudentstatus = NULL)
|
||||
private function _validate($prestudentstatus = null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,22 @@ class Studienplan extends APIv1_Controller
|
||||
$this->StudienplanModel->setUID($this->_getUID());
|
||||
}
|
||||
|
||||
public function getStudienplan()
|
||||
{
|
||||
$studienplan_id = $this->get('studienplan_id');
|
||||
|
||||
if (isset($studienplan_id))
|
||||
{
|
||||
$result = $this->StudienplanModel->load($studienplan_id);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
public function getStudienplaene()
|
||||
{
|
||||
$studiengang_kz = $this->get('studiengang_kz');
|
||||
|
||||
+17
-2
@@ -54,7 +54,8 @@
|
||||
"zetacomponents/workflow": "1.*",
|
||||
"zetacomponents/document": "1.*",
|
||||
"zetacomponents/workflow-database-tiein": "1.*",
|
||||
"zetacomponents/workflow-event-log-tiein": "1.*"
|
||||
"zetacomponents/workflow-event-log-tiein": "1.*",
|
||||
"wikimedia/composer-merge-plugin": "^1.3"
|
||||
},
|
||||
"require-dev":
|
||||
{
|
||||
@@ -63,5 +64,19 @@
|
||||
"config":
|
||||
{
|
||||
"bin-dir": "bin"
|
||||
}
|
||||
},
|
||||
|
||||
"extra": {
|
||||
"merge-plugin": {
|
||||
"include": [
|
||||
"composer.json",
|
||||
"addons/*/composer.json"
|
||||
],
|
||||
"recurse": true,
|
||||
"replace": false,
|
||||
"merge-dev": false,
|
||||
"merge-extra": false
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
-- UPDATE tbl_studiengang
|
||||
UPDATE public.tbl_studiengang SET onlinebewerbung = TRUE;
|
||||
|
||||
-- EMPTY lehre.tbl_studienplan
|
||||
DELETE FROM lehre.tbl_studienplan_semester;
|
||||
-- EMPTY lehre.tbl_studienplan
|
||||
DELETE FROM lehre.tbl_studienplan;
|
||||
-- EMPTY lehre.tbl_studienordnung_semester
|
||||
@@ -177,6 +179,10 @@ INSERT INTO lehre.tbl_studienplan VALUES (2, 1, 'VZ', 'A', '01234', 6, 'English'
|
||||
INSERT INTO lehre.tbl_studienplan VALUES (3, 1, 'VZ', 'A', '01234', 6, 'English', 't', 15, 't', NOW(), 'codeception', NOW(), NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO lehre.tbl_studienplan VALUES (4, 1, 'VZ', 'A', '01234', 6, 'English', 't', 15, 't', NOW(), 'codeception', NOW(), NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
-- INSERT INTO lehre.tbl_studienplan_semester (studienplan_semester_id, studienplan_id, studiensemester_kurzbz, semester)
|
||||
INSERT INTO lehre.tbl_studienplan_semester VALUES (1, 1, 'WS2016', 1);
|
||||
|
||||
-- DELETE FROM system.tbl_rolleberechtigung
|
||||
DELETE FROM system.tbl_rolleberechtigung WHERE berechtigung_kurzbz IN (
|
||||
'basis/archiv',
|
||||
'basis/ausbildung',
|
||||
@@ -395,6 +401,7 @@ DELETE FROM system.tbl_rolleberechtigung WHERE berechtigung_kurzbz IN (
|
||||
'basis/dms_version'
|
||||
);
|
||||
|
||||
-- DELETE FROM system.tbl_berechtigung
|
||||
DELETE FROM system.tbl_berechtigung WHERE berechtigung_kurzbz IN (
|
||||
'basis/archiv',
|
||||
'basis/ausbildung',
|
||||
@@ -613,7 +620,7 @@ DELETE FROM system.tbl_berechtigung WHERE berechtigung_kurzbz IN (
|
||||
'basis/dms_version'
|
||||
);
|
||||
|
||||
-- Permissions
|
||||
-- INSERT Permissions
|
||||
INSERT INTO system.tbl_berechtigung (berechtigung_kurzbz, beschreibung) VALUES('basis/archiv', 'Tbl_archiv');
|
||||
INSERT INTO system.tbl_berechtigung (berechtigung_kurzbz, beschreibung) VALUES('basis/ausbildung', 'Tbl_ausbildung');
|
||||
INSERT INTO system.tbl_berechtigung (berechtigung_kurzbz, beschreibung) VALUES('basis/berufstaetigkeit', 'Tbl_berufstaetigkeit');
|
||||
@@ -830,6 +837,7 @@ INSERT INTO system.tbl_berechtigung (berechtigung_kurzbz, beschreibung) VALUES('
|
||||
INSERT INTO system.tbl_berechtigung (berechtigung_kurzbz, beschreibung) VALUES('basis/studienplan_semester', 'Tbl_studienplan_semester');
|
||||
INSERT INTO system.tbl_berechtigung (berechtigung_kurzbz, beschreibung) VALUES('basis/dms_version', 'Tbl_dms_version');
|
||||
|
||||
-- INSERT link between user admin and permissions
|
||||
INSERT INTO system.tbl_rolleberechtigung (berechtigung_kurzbz, rolle_kurzbz, art) VALUES('basis/archiv', 'admin', 'suid');
|
||||
INSERT INTO system.tbl_rolleberechtigung (berechtigung_kurzbz, rolle_kurzbz, art) VALUES('basis/ausbildung', 'admin', 'suid');
|
||||
INSERT INTO system.tbl_rolleberechtigung (berechtigung_kurzbz, rolle_kurzbz, art) VALUES('basis/berufstaetigkeit', 'admin', 'suid');
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('Test API call v1/codex/nation All and FederalState');
|
||||
$I->wantTo('Test API call v1/codex/nation/All');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
|
||||
$I->sendGET('v1/codex/nation/All');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('test the Person id');
|
||||
$I->wantTo('Test API call v1/person/person/person');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
|
||||
$I->sendGET('v1/person/person/Person', array('person_id' => 3));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
@@ -12,7 +13,6 @@ $I->seeResponseContainsJson([
|
||||
'nachname' => 'McKenzie']);
|
||||
|
||||
$I->sendGET('v1/person/person/Person', array('code' => '01234567B'));
|
||||
$I->wantTo('test the Person code');
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
@@ -20,7 +20,6 @@ $I->seeResponseContainsJson([
|
||||
'person_id' => '4',
|
||||
'nachname' => 'Wilderman']);
|
||||
|
||||
$I->wantTo('test the Person not found');
|
||||
$I->sendGET('v1/person/person/Person', array('code' => '12345'));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
<?php
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('Test API call v1/organisation/studiengang/AllForBewerbung');
|
||||
$I->wantTo('Test API call v1/organisation/studiengang Studiengang and AllForBewerbung');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
|
||||
$I->sendGET('v1/organisation/studiengang/Studiengang');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/studiengang/AllForBewerbung');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
|
||||
@@ -1,10 +1,43 @@
|
||||
<?php
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('Test API call v1/organisation/studienplan/Studienplaene');
|
||||
$I->wantTo('Test API call v1/organisation/studienplan studienplaene and studienplaeneFromSem');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
|
||||
$I->sendGET('v1/organisation/studienplan/Studienplaene', array('studiengang_kz' => 1));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/studienplan/StudienplaeneFromSem', array('studiengang_kz' => 1,
|
||||
'studiensemester_kurzbz' => 'WS2016'
|
||||
));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/studienplan/StudienplaeneFromSem', array('studiengang_kz' => 1,
|
||||
'studiensemester_kurzbz' => 'WS2016',
|
||||
'ausbildungssemester' => 1
|
||||
));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/studienplan/StudienplaeneFromSem', array('studiengang_kz' => 1,
|
||||
'studiensemester_kurzbz' => 'WS2016',
|
||||
'orgform_kurzbz' => 'VZ'
|
||||
));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/studienplan/StudienplaeneFromSem', array('studiengang_kz' => 1,
|
||||
'studiensemester_kurzbz' => 'WS2016',
|
||||
'ausbildungssemester' => 1,
|
||||
'orgform_kurzbz' => 'VZ'
|
||||
));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
Reference in New Issue
Block a user