This commit is contained in:
Stefan Puraner
2016-08-08 08:31:35 +02:00
244 changed files with 1809 additions and 459 deletions
+1 -3
View File
@@ -11,15 +11,13 @@ documents/
.buildpath
application/config/development/
tests/codeception/_output/*
tests/codeception/tests/_output/*
!/tests/codeception/_output/.placeholder
tests/codeception/codeception.yml
tests/codeception/tests/api.suite.yml
tests/codeception/tests/functional.suite.yml
tests/codeception/tests/acceptance.suite.yml
!/tests/codeception/_output/.placeholder
/submodules/d3
composer.lock
bin
/tests/codeception/api.suite.yml
/application/logs/
/sparks/*
@@ -0,0 +1,77 @@
<?php
/**
* FH-Complete
*
* @package FHC-API
* @author FHC-Team
* @copyright Copyright (c) 2016, fhcomplete.org
* @license GPLv3
* @link http://fhcomplete.org
* @since Version 1.0
* @filesource
*/
// ------------------------------------------------------------------------
if (!defined("BASEPATH")) exit("No direct script access allowed");
class PCRM extends APIv1_Controller
{
/**
* API constructor
*/
public function __construct()
{
parent::__construct();
// Loads the PCRMLib
$this->load->library("PCRMLib");
}
/**
* Manages a HTTP get call
*/
public function getCall()
{
// Start me up!
$result = $this->pcrmlib->start($this->get(), PermissionLib::SELECT_RIGHT);
// Print the result
$this->response($result, REST_Controller::HTTP_OK);
}
/**
* @return void
*/
public function postCall()
{
// Start me up!
$result = $this->pcrmlib->start($this->post(), PermissionLib::UPDATE_RIGHT);
// Print the result
$this->response($result, REST_Controller::HTTP_OK);
}
/**
* @return void
*/
public function putCall()
{
// Start me up!
$result = $this->pcrmlib->start($this->put(), PermissionLib::INSERT_RIGHT);
// Print the result
$this->response($result, REST_Controller::HTTP_OK);
}
/**
* @return void
*/
public function deleteCall()
{
// Start me up!
$result = $this->pcrmlib->start($this->delete(), PermissionLib::DELETE_RIGHT);
// Print the result
$this->response($result, REST_Controller::HTTP_OK);
}
}
@@ -54,10 +54,11 @@ class Phrase extends APIv1_Controller
$phrase = $this->get('phrase');
$orgeinheit_kurzbz = $this->get('orgeinheit_kurzbz');
$orgform_kurzbz = $this->get('orgform_kurzbz');
$blockTags = $this->get('blockTags');
if (isset($app) && isset($sprache))
{
$result = $this->phraseslib->getPhrases($app, $sprache, $phrase, $orgeinheit_kurzbz, $orgform_kurzbz);
$result = $this->phraseslib->getPhrases($app, $sprache, $phrase, $orgeinheit_kurzbz, $orgform_kurzbz, $blockTags);
$this->response($result, REST_Controller::HTTP_OK);
}
+8
View File
@@ -36,6 +36,14 @@ class basis_db
public function __construct($ci)
{
$this->ci=$ci;
if (!defined('FHC_INTEGER'))
{
define('FHC_INTEGER',1);
define('FHC_STRING',2);
define('FHC_BOOLEAN',3);
define('FHC_LANG_ARRAY',4);
}
}
public function db_connect()
+396
View File
@@ -0,0 +1,396 @@
<?php
if (! defined("BASEPATH")) exit("No direct script access allowed");
/**
*
*/
class PCRMLib
{
const RESOURCE_PARAMETER = "resource";
const FUNCTION_PARAMETER = "function";
const REG_SPLIT_EXPR = "/\//";
const LIB_PREFIX = "Lib";
const LIB_FILE_EXTENSION = ".php";
const LIBS_PATH = "libraries";
const MODEL_PREFIX = "_model";
// Black list of resources that are no allowed to be used
private static $RESOURCES_BLACK_LIST = array(
"PCRMLib", // disabled self loading
"LogLib", // hardly usefull and virtually dangerous
"MigrationLib", // virtually dangerous, DB manipulation
"FilesystemLib" // virtually dangerous, direct access to file system
);
/**
* Object initialization
*/
public function __construct()
{
// Gets CI instance
$this->ci =& get_instance();
// Loads helper message to manage returning messages
$this->ci->load->helper("message");
$this->ci->load->library("PermissionLib");
}
/**
* Everything starts here...
*/
public function start($callParameters, $permissionType)
{
$result = null;
$parameters = $this->_getParameters($callParameters);
$validation = $this->_validateCall($parameters);
// If the validation was passed
if ($validation->error == EXIT_SUCCESS)
{
$loaded = null;
// If the given resource is a model
if (strpos($parameters->resourceName, PCRMLib::MODEL_PREFIX) !== false)
{
// Try to load the model
$result = $this->_loadModel($parameters->resourcePath, $parameters->resourceName);
if ($result->error == EXIT_SUCCESS)
{
$loaded = $result->retval;
}
}
// If the given resource is a library
else if (strpos($parameters->resourceName, PCRMLib::LIB_PREFIX) !== false)
{
// Check if the resource is already loaded, it works only with libraries and drivers
$isLoaded = $this->ci->load->is_loaded($parameters->resourceName);
// If not loaded then load it
if ($isLoaded === false)
{
// Checks if the operation is permitted by the API caller
// Only for libraries, permissions are automatically handled by models
$result = $this->checkLibraryPermission(
$parameters->resourcePath,
$parameters->resourceName,
$parameters->function,
$permissionType
);
if ($result->error == EXIT_ERROR)
{
$loaded = null;
}
else
{
// Try to load the library
$result = $this->_loadLibrary($parameters->resourcePath, $parameters->resourceName);
if ($result->error == EXIT_SUCCESS)
{
$loaded = $result->retval;
}
}
}
// If it is already loaded $isLoaded contains the instance of the library
else
{
$loaded = $isLoaded;
}
}
// Wrong selection!
else
{
$result = $this->_error("Neither a lib nor model: " . $parameters->resourcePath . $parameters->resourceName);
}
// If the resource was found and loaded
if (!is_null($loaded))
{
$result = $this->_callThis($parameters->resourceName, $parameters->function, $parameters->parameters);
}
else
{
// Resource not loaded
}
}
else
{
$result = $validation;
}
return $result;
}
/**
* Gets the parameters from the call
*/
private function _getParameters($parametersArray)
{
$parameters = new stdClass();
$parameters->parameters = array();
$count = 0;
foreach ($parametersArray as $parameterName => $parameterValue)
{
// The name of the resource, path included
if ($parameterName == PCRMLib::RESOURCE_PARAMETER)
{
// Separates the resource path from the resource name
$splittedResource = preg_split(PCRMLib::REG_SPLIT_EXPR, $parameterValue);
$parameters->resourceName = $splittedResource[count($splittedResource) - 1];
$parameters->resourcePath = str_replace($parameters->resourceName, "", $parameterValue);
}
// The name of the function
else if ($parameterName == PCRMLib::FUNCTION_PARAMETER)
{
$parameters->function = $parameterValue;
}
// It is assumed that all other parameters are the parameters to be passed to the function
// They will be passed to the function in the same order in which they are passed to
// this controller
else
{
$parameters->parameters[$count++] = $parameterValue;
}
}
return $parameters;
}
/**
* Validate the given parameters
*/
private function _validateCall($parameters)
{
if (!is_object($parameters))
{
return $this->_error("Parameter is not an object");
}
if (!isset($parameters->resourcePath))
{
return $this->_error("Resource path is not specified");
}
if (!isset($parameters->resourceName))
{
return $this->_error("Resource name is not specified");
}
if (!isset($parameters->function))
{
return $this->_error("Function is not specified");
}
if (!is_array($parameters->parameters))
{
return $this->_error("Parameters are not specified");
}
if (in_array($parameters->resourceName, PCRMLib::$RESOURCES_BLACK_LIST))
{
return $this->_error("You are trying to access to unauthorized resources");
}
return $this->_success("Input data are valid");
}
/**
* Loads a model using the given path and name
*
* NOTE: the models automatically handle the permissions
*/
private function _loadModel($resourcePath, $resourceName)
{
$loaded = null;
$result = null;
try
{
$loaded = $this->ci->load->model($resourcePath . $resourceName);
}
catch (Exception $e)
{
// Errors while loading the model
$result = $this->_error("Errors while loading the model: " . $e->getMessage());
}
if (!is_null($loaded))
{
$result = $this->_success($loaded);
}
return $result;
}
private function checkLibraryPermission($resourcePath, $resourceName, $function, $permissionType)
{
$result = null;
$permissionPath = "";
if ($resourcePath != "")
{
$permissionPath = $resourcePath;
}
$permissionPath .= $resourceName . "." . $function;
if ($this->ci->permissionlib->hasPermission($permissionPath, $permissionType) === false)
{
$result = $this->_error(lang("fhc_".FHC_NORIGHT)." -> ".$permissionPath, FHC_NORIGHT);
}
else
{
$result = $this->_success("Has permission");
}
return $result;
}
/**
* Loads a library using the given path and name
*
* The method "library" of the class CI_Loader provided by CI has some limitations,
* so to be able to check errors was used a workaround.
* It consists in:
* - Checking if the file (identified by parameters $resourcePath and $resourceName) exists
* - If exists it will be loaded using the method "file" from CI_Loader
* - Checks if the loaded file contains a class identified by parameter $resourceName
*
* If one of the previous tests fails, it will be returned a null value
*/
private function _loadLibrary($resourcePath, $resourceName)
{
$loaded = null;
try
{
// Gets all the configured resources paths
$packagePaths = $this->ci->load->get_package_paths();
// Looking for a file in every paths with the same name of the resource
$found = null;
for ($i = 0; $i < count($packagePaths) && is_null($found); $i++)
{
$file = $packagePaths[$i] . PCRMLib::LIBS_PATH . DIRECTORY_SEPARATOR .
$resourcePath . $resourceName . PCRMLib::LIB_FILE_EXTENSION;
if (file_exists($file))
{
$found = $file;
}
}
// If the file was found
if (!is_null($found))
{
// Load the file
$loaded = $this->ci->load->file($found);
// If the resource is not present inside the file
if (!class_exists($resourceName))
{
$loaded = null;
// Same phrase error as load->model() provided by CI
$result = $this->_error($found . " exists, but doesn't declare class " . $resourceName);
}
}
else
{
$loaded = null;
// Same phrase error as load->model() provided by CI
$result = $this->_error("Unable to load the requested class: " . $resourceName);
}
}
catch (Exception $e)
{
// Errors while loading the library
$result = $this->_error("Errors while loading the library: " . $e->getMessage());
}
if (!is_null($loaded))
{
$result = $this->_success($loaded);
}
return $result;
}
/**
* Calls a method of a class with the given parameters and returns its result
*
* @param string $resourceName identifies the class name
* @param string $function identifies the method name
* @param array $parameters contains the parameters to be passed to the method
*/
private function _callThis($resourceName, $function, $parameters)
{
$result = null;
try
{
// Get informations about the function
$reflectionMethod = new ReflectionMethod($resourceName, $function);
// If the number of given parameters is greater or equal to the number of
// parameters required by the function
if (count($parameters) >= $reflectionMethod->getNumberOfRequiredParameters())
{
// If the function is static
if ($reflectionMethod->isStatic() === true)
{
$classMethod = $resourceName . "::" . $function;
}
// If the function is not static
else
{
$classMethod = array(new $resourceName(), $function);
}
// If the resource's function is callable
if (is_callable($classMethod))
{
// Call resource->function()
// @ was applied to prevent really ugly and unmanageable errors
$resultCall = @call_user_func_array($classMethod, $parameters);
// If errors occurred while running it
// NOTE: if the called function via call_user_func_array returns a boolean set as false,
// it will be recognized like a running error. A little bit tricky ;)
if ($resultCall === false)
{
$result = $this->_error("Error running " . $resourceName . "->" . $function . "()");
}
// Returns the result of resource->function()
else
{
$result = $this->_success($resultCall);
}
}
else
{
$result = $this->_error($resourceName . "->" . $function . "() is not callable!");
}
}
else
{
$result = $this->_error(
"Number of required parameters: " . $reflectionMethod->getNumberOfRequiredParameters() .
". Given: " . count($parameters)
);
}
}
catch (Exception $e)
{
$result = $this->_error($e->getMessage());
}
return $result;
}
/*
*
*/
private function _error($retval = '', $message = EXIT_ERROR)
{
return error($retval, $message);
}
/*
*
*/
private function _success($retval, $message = EXIT_SUCCESS)
{
return success($retval, $message);
}
}
+36 -14
View File
@@ -34,32 +34,54 @@ require_once(FCPATH.'include/benutzerberechtigung.class.php');
class PermissionLib
{
const SELECT_RIGHT = "s";
const UPDATE_RIGHT = "u";
const INSERT_RIGHT = "i";
const DELETE_RIGHT = "d";
public $bb;
/**
* Auth Username, Password over FH-Complete
*
* @param string $username
* @param string $password
* @return bool
*
*/
function __construct()
{
$this->CI =& get_instance();
$this->CI->load->helper('fhcauth');
// Loads CI instance
$this->ci =& get_instance();
// Loads the library to manage the rights system
$this->ci->load->library("FHC_DB_ACL");
// Loads the array of resources
$this->ci->fhc_db_acl->acl = $this->ci->config->item('fhc_acl');
}
/**
* @return bool <b>true</b> if a user has the right to access to the specified
* resource with a specified permission type, <b>false</b> otherwise
*/
public function hasPermission($sourceName, $permissionType)
{
// If the resource exists
if (isset($this->ci->fhc_db_acl->acl[$sourceName]))
{
// Checks permission
return $this->ci->fhc_db_acl->isBerechtigt($this->ci->fhc_db_acl->acl[$sourceName], $permissionType);
}
// if the resource does not exist, do not lose useful clock cycles
else
{
return false;
}
}
function isBerechtigt($berechtigung_kurzbz, $art = null, $oe_kurzbz = null, $kostenstelle_id = null)
{
$this->bb->getBerechtigungen(getAuthUID());
return $this->bb->isBerechtigt($berechtigung_kurzbz, $oe_kurzbz, $art, $kostenstelle_id);
}
function getPermissions($uid)
{
}
function isEntitled($berechtigung_kurzbz, $oe_kurzbz=null, $art=null, $kostenstelle_id=null)
{
}
function getPermissions($uid) {}
function isEntitled($berechtigung_kurzbz, $oe_kurzbz=null, $art=null, $kostenstelle_id=null) {}
}
+14 -2
View File
@@ -111,7 +111,7 @@ class PhrasesLib
*
* @return struct
*/
function getPhrases($app, $sprache, $phrase = null, $orgeinheit_kurzbz = null, $orgform_kurzbz = null)
function getPhrases($app, $sprache, $phrase = null, $orgeinheit_kurzbz = null, $orgform_kurzbz = null, $blockTags = null)
{
if (isset($app) && isset($sprache))
{
@@ -123,7 +123,19 @@ class PhrasesLib
for ($i = 0; $i < count($result->retval); $i++)
{
$result->retval[$i]->text = $parser->textileThis($result->retval[$i]->text);
// If no <p> tags required
if ($blockTags == "no")
{
// Removes tags <p> and </p> from the beginning and from the end of the string
$tmpText = $parser->textileThis($result->retval[$i]->text);
$tmpText = substr($tmpText, 3, strlen($tmpText));
$tmpText = substr($tmpText, 0, strlen($tmpText) - 4);
$result->retval[$i]->text = $tmpText;
}
else
{
$result->retval[$i]->text = $parser->textileThis($result->retval[$i]->text);
}
}
}
}
+1 -2
View File
@@ -967,8 +967,7 @@ abstract class REST_Controller extends CI_Controller {
$this->rest->level = NULL;
$this->rest->user_id = NULL;
$this->rest->ignore_limits = FALSE;
//var_dump($this->_args);
//var_dump($this->input->server($key_name));
// Find the key from server or arguments
if (($key = isset($this->_args[$api_key_variable]) ? $this->_args[$api_key_variable] : $this->input->server($key_name)))
{
+1 -1
View File
@@ -86,7 +86,7 @@
"json-forms": "1.4.0",
"wikimedia/composer-merge-plugin": "^1.3",
"fzaninotto/faker": "1.*",
"netcarver/textile": "3.5.*"
"netcarver/textile": "^3.5"
},
"require-dev":
{
+206 -102
View File
@@ -31,6 +31,8 @@ $p=new phrasen($sprache);
$db = new basis_db();
$errors = array();
$user = get_uid();
if(!isset($_GET["prestudent_ids"]) || !isset($_GET["vorlage_kurzbz"]))
@@ -38,10 +40,10 @@ if(!isset($_GET["prestudent_ids"]) || !isset($_GET["vorlage_kurzbz"]))
$prestudent_ids = explode(";", $_GET["prestudent_ids"]);
if(count($prestudent_ids) < 1)
if(empty($prestudent_ids))
die($p->t('anwesenheitsliste/fehlerhafteParameteruebergabe'));
( isset($_GET["force"]) ? $force = true : $force = false);
/*
* Temporaeren Ordner fuer die erstellung der Dokumente generieren
@@ -64,121 +66,224 @@ $docExp = new dokument_export();
$allDocs = array();
foreach($prestudent_ids as $pid)
{
$preErrors = array();
$prestudent = new prestudent();
$dokumente = array();
if(!$prestudent->load($pid))
cleanUpAndDie($p->t('tools/studentWurdeNichtGefunden')."(".$pid.")", $tmpDir);
/*
* Get all Documents
*/
$query= '
SELECT
titel, dms_id, inhalt
FROM
public.tbl_dokumentstudiengang
JOIN public.tbl_prestudent USING(studiengang_kz)
JOIN public.tbl_akte USING(person_id,dokument_kurzbz)
WHERE
onlinebewerbung
AND prestudent_id='.$db->db_add_param($pid, FHC_INTEGER).';
';
$preDocs = array();
$result = $db->db_query($query);
while($row = $db->db_fetch_object($result))
{
$filename = "";
if($row->inhalt != null)
{
$filename = $tmpDir . "/".uniqid();
$fileData = base64_decode($row->inhalt);
file_put_contents($filename, $fileData);
}
else if($row->dms_id != null)
{
$dms = new dms();
$dms->load($row->dms_id);
$filename = DMS_PATH . $dms->filename;
}
if($filename == "")
continue;
/*
* Determine the filetype
* and convert, if nessecary
*/
$explodedTitle = explode(".", $row->titel);
$type = $explodedTitle[count($explodedTitle)-1];
if($type == "jpg" || $type = "jpeg")
{
$fullFilename = $tmpDir . "/".uniqid() . ".pdf";
if(!$pdf->jpegToPdf($filename, $fullFilename))
cleanUpAndDie($pdf->errormsg, $tmpDir);
}
else if($type == "odt" || $type == "doc" || $type == "docx")
{
$fullFilename = $tmpDir . "/".uniqid() . ".pdf";
$docExp->convert($filename, $fullFilename, "pdf");
}
else if($type == "pdf")
{
$fullFilename = $row->titel;
}
// only filled, if the file is supported
if($fullFilename != "")
{
$preDocs[] = $fullFilename;
}
$preErrors[] = $p->t('tools/studentWurdeNichtGefunden')."(".$pid.")";
}
/*
* Deckblatt
*/
$filename = $tmpDir . "/".uniqid();
$doc = new dokument_export($_GET["vorlage_kurzbz"]);
$doc->addDataArray(array('vorname' => $prestudent->vorname, 'nachname' => $prestudent->nachname),"bewerberakt");
if(empty($preErrors))
{
/*
* Get all Documents
*/
$query= '
SELECT
titel, dms_id, inhalt, mimetype, dokument_kurzbz, tbl_dokument.bezeichnung, sort
FROM
public.tbl_vorlagedokument
JOIN public.tbl_vorlagestudiengang USING(vorlagestudiengang_id)
JOIN public.tbl_dokument USING(dokument_kurzbz)
JOIN public.tbl_prestudent USING(studiengang_kz)
JOIN public.tbl_akte USING(person_id,dokument_kurzbz)
WHERE
prestudent_id='.$db->db_add_param($pid, FHC_INTEGER).'
ORDER BY sort asc;
';
if(!$doc->create('pdf'))
die($doc->errormsg);
$preDocs = array();
$result = $db->db_query($query);
while($row = $db->db_fetch_object($result))
{
$convertSuccess = true;
$filename = "";
if($row->inhalt != null)
{
$filename = $tmpDir . "/".uniqid();
$fileData = base64_decode($row->inhalt);
file_put_contents($filename, $fileData);
}
else if($row->dms_id != null)
{
$dms = new dms();
$dms->load($row->dms_id);
$document = $doc->output(false);
$filename = $tmpDir.'/'.uniqid();
file_put_contents($filename, $document);
$doc->close();
$allDocs[] = $filename;
$allDocs = array_merge($allDocs, $preDocs);
$filename = DMS_PATH . $dms->filename;
if(!file_exists($filename))
{
$preErrors[] = "'" . $filename . "': Datei nicht gefunden";
}
}
// this should never happen
if($filename == "")
$preErrors[] = "'" . $row->titel . "': Diese Datei hat keinen Inhalt und keine dms_id";
if(empty($preErrors))
{
/*
* Determine the filetype
* and convert if nessecary
*/
$fullFilename = "";
$explodedTitle = explode(".", $row->titel);
$type = $explodedTitle[count($explodedTitle)-1];
if(
$type == "jpg"
|| $type == "jpeg"
|| $row->mimetype == "image/jpeg"
|| $row->mimetype == "image/jpg"
|| $row->mimetype == "image/pjpeg"
)
{
$fullFilename = $tmpDir . "/".uniqid() . ".pdf";
if(!$pdf->jpegToPdf($filename, $fullFilename))
cleanUpAndDie($pdf->errormsg, $tmpDir);
}
else if
(
$type == "odt"
|| $type == "doc"
|| $type == "docx"
|| $row->mimetype == "application/vnd.oasis.opendocument.spreadsheet"
|| $row->mimetype == "application/msword"
|| $row->mimetype == "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|| $row->mimetype == "application/haansoftdocx"
|| $row->mimetype == "application/vnd.ms-word"
|| $row->mimetype == "application/vnd.oasis.opendocument.text"
)
{
$fullFilename = $tmpDir . "/".uniqid() . ".pdf";
if(!$docExp->convert($filename, $fullFilename, "pdf"))
{
$convertSuccess = false;
$preErrors[] ="'$row->titel': Konvertierung fehlgeschlagen(".$row->mimetype.")";
}
}
else if(
$type == "pdf"
|| $row->mimetype == "application/pdf"
)
{
$fullFilename = $filename;
}
// only filled, if the file is supported
if($fullFilename != "")
{
if(file_exists($fullFilename))
{
$preDocs[] = $fullFilename;
if(isset($row->bezeichnung) && $row->bezeichnung && $row->bezeichnung != "")
$dokumente[] = array("name" => $row->bezeichnung);
else
$dokumente[] = array("name" => $row->dokument_kurzbz);
}
else
{
$addString = "";
if($row->dms_id)
$addString = "(DMS)";
else
$addString = "(DB)";
if($convertSuccess)
$preErrors[] = '"' . $row->titel . '":' . $addString . ' Dokument nicht gefunden';
}
}
else
$preErrors[] ="'$row->titel' hat einen nicht unterstützten mimetype: $row->mimetype";
}
}
/*
* Deckblatt
*/
$filename = $tmpDir . "/".uniqid();
$doc = new dokument_export($_GET["vorlage_kurzbz"]);
$doc->addDataArray(array('vorname' => $prestudent->vorname, 'nachname' => $prestudent->nachname, array('dokumente'=> $dokumente)),"dokumentenakt");
if(!$doc->create('pdf'))
die($doc->errormsg);
$filename = $tmpDir.'/'.uniqid();
file_put_contents($filename, $doc->output(false));
$doc->close();
$allDocs[] = $filename;
$allDocs = array_merge($allDocs, $preDocs);
unset($doc);
}
if(!empty($preErrors))
{
$errors[$pid] = $preErrors;
}
}
/*
* generate the merged PDF
*/
$finishedPdf = $tmpDir . "/Dokumentenakt.pdf";
if(!$pdf->merge($allDocs, $finishedPdf))
cleanUpAndDie($pdf->errormsg, $tmpDir);
$fsize = filesize($finishedPdf);
if(!$handle = fopen($finishedPdf,'r'))
die('load failed');
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="'.$finishedPdf);
header('Content-Length: '.$fsize);
while (!feof($handle))
if(count($errors) == 0 || $force)
{
echo fread($handle, 8192);
$finishedPdf = $tmpDir . "/Dokumentenakt.pdf";
if(!$pdf->merge($allDocs, $finishedPdf))
cleanUpAndDie($pdf->errormsg, $tmpDir);
$fsize = filesize($finishedPdf);
if(!$handle = fopen($finishedPdf,'r'))
die('load failed');
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="'.$finishedPdf);
header('Content-Length: '.$fsize);
while (!feof($handle))
{
echo fread($handle, 8192);
}
fclose($handle);
}
fclose($handle);
else
{
?>
<html>
<head>
<link rel="stylesheet" href="../skin/vilesci.css" type="text/css">
</head>
<body>
<?php
echo "<h1>Es sind folgende Fehler aufgetreten:</h1>";
foreach($errors as $pid => $pre)
{
$ps = new prestudent();
if(!$ps->load($pid))
echo "<h2>$pid</h2>";
else
echo "<h2>$ps->vorname $ps->nachname</h2>";
echo "<ul>";
foreach($pre as $pe)
{
echo "<li>$pe</li>";
}
echo "</ul>";
}
echo "<p>Fehlerhafte Dokumente können übersprungen werden:</p>";
echo "<form action='dokumentenakt.pdf.php' method='GET'>";
echo '<input type="hidden" name="prestudent_ids" value="'.$_GET["prestudent_ids"].'"/>';
echo '<input type="hidden" name="vorlage_kurzbz" value="'.$_GET["vorlage_kurzbz"].'"/>';
echo '<input type="submit" name="force" value="Fortfahren" title="Fehlerhafte Dokumente auslassen"/>';
echo "</form>";
?>
</body>
</html>
<?php
}
/*
@@ -201,7 +306,6 @@ function cleanUpAndDie($msg, $tmpDir)
function removeFolder($dir)
{
if($dir == "/")
return false;
if (is_dir($dir) === true)
+5 -4
View File
@@ -34,6 +34,7 @@ class dokument_export
private $temp_filename;
private $temp_folder;
private $images=array();
public $errormsg;
/**
* Konstruktor
@@ -168,7 +169,7 @@ class dokument_export
$contentbuffer = $proc->transformToXml($this->xml_data);
$this->temp_folder = '/tmp/fhcunoconv-'.uniqid();
$this->temp_folder = sys_get_temp_dir().'/fhcunoconv-'.uniqid();
mkdir($this->temp_folder);
chdir($this->temp_folder);
file_put_contents('content.xml', $contentbuffer);
@@ -201,7 +202,8 @@ class dokument_export
if(!$vorlage_found)
$zipfile = DOC_ROOT.'system/vorlage_zip/'.$this->vorlage_file;
$tempname_zip = 'out.zip';
$tempname_zip = $this->temp_folder . '/out.zip';
if(!copy($zipfile, $tempname_zip))
die('copy failed');
@@ -254,7 +256,7 @@ class dokument_export
switch($this->outputformat)
{
case 'pdf':
$this->temp_filename='out.pdf';
$this->temp_filename = $this->temp_folder . '/out.pdf';
exec("unoconv -e IsSkipEmptyPages=false --stdout -f pdf $tempname_zip > ".$this->temp_filename, $out, $ret);
if($ret!=0)
@@ -408,7 +410,6 @@ class dokument_export
$command = 'unoconv --format %s --output %s %s';
$command = sprintf($command, $format, $outFile, $inFile);
exec($command, $out, $ret);
if($ret!=0)
{
+14 -3
View File
@@ -40,6 +40,7 @@ class studiensemester extends Studiensemester_model
public $bezeichnung; // varchar(32)
public $studienjahr_kurzbz; // varchar(16)
public $beschreibung; // varchar(16)
public $onlinebewerbung; // boolean
/**
* Konstruktor - Laedt optional ein StSem
@@ -81,6 +82,7 @@ class studiensemester extends Studiensemester_model
$this->bezeichnung = $row->bezeichnung;
$this->studienjahr_kurzbz = $row->studienjahr_kurzbz;
$this->beschreibung = $row->beschreibung;
$this->onlinebewerbung = $row->onlinebewerbung;
return true;
}
@@ -138,16 +140,24 @@ class studiensemester extends Studiensemester_model
if($this->new)
{
$qry = "INSERT INTO public.tbl_studiensemester (studiensemester_kurzbz, start, ende)
$qry = "INSERT INTO public.tbl_studiensemester (studiensemester_kurzbz, start, ende, bezeichnung, studienjahr_kurzbz, beschreibung, onlinebewerbung)
VALUES(".$this->db_add_param($this->studiensemester_kurzbz).",".
$this->db_add_param($this->start).','.
$this->db_add_param($this->ende).');';
$this->db_add_param($this->ende).','.
$this->db_add_param($this->bezeichnung).','.
$this->db_add_param($this->studienjahr_kurzbz).','.
$this->db_add_param($this->beschreibung).','.
$this->db_add_param($this->onlinebewerbung, FHC_BOOLEAN).');';
}
else
{
$qry = 'UPDATE public.tbl_studiensemester SET'.
' start='.$this->db_add_param($this->start).','.
' ende='.$this->db_add_param($this->ende).
' ende='.$this->db_add_param($this->ende).','.
' bezeichnung='.$this->db_add_param($this->bezeichnung).','.
' studienjahr_kurzbz='.$this->db_add_param($this->studienjahr_kurzbz).','.
' beschreibung='.$this->db_add_param($this->beschreibung).','.
' onlinebewerbung='.$this->db_add_param($this->onlinebewerbung, FHC_BOOLEAN).
" WHERE studiensemester_kurzbz=".$this->db_add_param($this->studiensemester_kurzbz);
}
@@ -340,6 +350,7 @@ class studiensemester extends Studiensemester_model
$stsem_obj->bezeichnung = $row->bezeichnung;
$stsem_obj->studienjahr_kurzbz = $row->studienjahr_kurzbz;
$stsem_obj->beschreibung = $row->beschreibung;
$stsem_obj->onlinebewerbung = $row->onlinebewerbung;
$this->studiensemester[] = $stsem_obj;
}
+14 -14
View File
@@ -8,10 +8,11 @@ build_settings:
host: 'localhost;dbname=template1'
user: 'fhcomplete'
pass: 'fhcomplete'
setup:
composer:
# directory: ""
# action: "install"
action: "install"
prefer_dist: true
no_dev: true
pgsql:
@@ -31,7 +32,10 @@ test:
directories:
- "application/"
recursive: true
php_loc:
codeception:
config: "tests/codeception/"
path: "tests/codeception/_output/"
# php_loc:
# php_docblock_checker:
# path: "application/controllers/"
# allowed_warnings: 100
@@ -41,13 +45,17 @@ test:
# standard: "tests/codesniffer/FHComplete"
# allowed_errors: 200
# allowed_warnings: 200
codeception:
config: "tests/codeception/"
path: "tests/codeception/_output/"
# php_unit:
# directory: "tests/phpunit/"
complete:
clean_build:
remove:
- index.php
- config/global.config.inc.php
- config/cis.config.inc.php
- config/vilesci.config.inc.php
- config/system.config.inc.php
# xmpp:
# username: "fhcomplete"
# password: "fhcomplete1q2w3blah.im"
@@ -60,17 +68,9 @@ complete:
# tls: 1
# alias: "jabber.blah.im"
# date_format: "%d.%m.%Y"
clean_build:
remove:
- index.php
- config/global.config.inc.php
- config/cis.config.inc.php
- config/vilesci.config.inc.php
- config/system.config.inc.php
success:
# shell:
# - "cd %BUILD_PATH% && chmod u+x copyBuild.sh && ./copyBuild.sh" # Copy Build
# - "curl 'http://localhost/backend/Migrate/'" # DB-Installation
# - "cd /var/www/html/ && sudo -u wsp doxygen Doxyfile" # Doxygen
# - "cd /var/www/html/ && sudo -u wsp doxygen Doxyfile" # Doxygen
+54 -2
View File
@@ -30,7 +30,7 @@ ALTER TABLE lehre.tbl_studienplan ALTER COLUMN aktiv SET DEFAULT true;";
if(!$db->db_query($qry))
echo '<strong>public.tbl_studiengang: '.$db->db_last_error().'</strong><br>';
else
echo 'Defaultwerte für tbl_studiengang und tbl_studienplan gesetzt.';
echo 'Defaultwerte für tbl_studiengang und tbl_studienplan gesetzt.<br>';
//Spalte studiensemester_kurzbz für Reihungstest
@@ -1310,7 +1310,10 @@ if($result = $db->db_query("SELECT * FROM public.tbl_vorlage WHERE vorlage_kurzb
$qry = "INSERT INTO public.tbl_vorlage(vorlage_kurzbz, bezeichnung, anmerkung,mimetype)
VALUES('Bewerberakt','Bewerberakt Deckblatt', 'wird als Deckblatt fuer den Bewerberakt verwendet', 'application/vnd.oasis.opendocument.text');";
$text = file_get_contents('xsl/Bewerberakt.xsl');
$testQuery = "SELECT setval('seq_vorlagestudiengang_vorlagestudiengang_id', max(vorlagestudiengang_id)) FROM tbl_vorlagestudiengang;";
$testResult = $db->db_query($testQuery);
$text = file_get_contents('./system/xsl/Bewerberakt.xsl');
while($row = $db->db_fetch_object($result))
{
@@ -1330,6 +1333,55 @@ if($result = $db->db_query("SELECT * FROM public.tbl_vorlage WHERE vorlage_kurzb
// public.tbl_vorlagedokument hinzufuegen
if($result = @$db->db_query("SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='public' AND TABLE_NAME='tbl_vorlagedokument';"))
{
if($db->db_num_rows($result)==0)
{
$qry = "
CREATE TABLE public.tbl_vorlagedokument
(
vorlagedokument_id integer NOT NULL,
sort integer NOT NULL,
vorlagestudiengang_id bigint NOT NULL,
dokument_kurzbz varchar(8) NOT NULL
);
CREATE SEQUENCE public.tbl_vorlagedokument_vorlagedokument_id_seq
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
COMMENT ON TABLE public.tbl_vorlagedokument IS 'Verknuepft mehrere tbl_dokument mit einer tbl_vorlagestudiengang';
ALTER TABLE public.tbl_vorlagedokument ADD CONSTRAINT pr_vorlagedokument_id PRIMARY KEY (vorlagedokument_id);
ALTER TABLE public.tbl_vorlagedokument ALTER COLUMN vorlagedokument_id SET DEFAULT nextval('public.tbl_vorlagedokument_vorlagedokument_id_seq');
ALTER TABLE public.tbl_vorlagedokument ADD CONSTRAINT fk_tbl_vorlagedokument_tbl_dokument FOREIGN KEY (dokument_kurzbz) REFERENCES public.tbl_dokument (dokument_kurzbz) ON DELETE RESTRICT ON UPDATE CASCADE;
ALTER TABLE public.tbl_vorlagedokument ADD CONSTRAINT fk_tbl_vorlagedokument_tbl_vorlagestudiengang FOREIGN KEY (vorlagestudiengang_id) REFERENCES public.tbl_vorlagestudiengang (vorlagestudiengang_id) ON DELETE RESTRICT ON UPDATE CASCADE;
GRANT SELECT, UPDATE, INSERT, DELETE ON public.tbl_vorlagedokument TO vilesci;
GRANT SELECT ON public.tbl_vorlagedokument TO web;
GRANT SELECT, UPDATE ON public.tbl_vorlagedokument_vorlagedokument_id_seq TO vilesci;
";
if(!$db->db_query($qry))
echo '<strong>public.tbl_vorlagedokument: '.$db->db_last_error().'</strong><br>';
else
echo ' Tabelle public.tbl_vorlagedokument hinzugefuegt!<br>';
}
}
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
+2 -2
View File
@@ -419,10 +419,10 @@ $error_msg='';
tbl_studiengang.studiengang_kz=tbl_lehrveranstaltung.studiengang_kz AND
(studiensemester_kurzbz='$studiensemester' OR
studiensemester_kurzbz='$stsem2') AND
mitarbeiter_uid NOT LIKE '\\_%' AND tbl_studiengang.studiengang_kz!=0 AND
mitarbeiter_uid NOT LIKE '\\\\_%' AND tbl_studiengang.studiengang_kz!=0 AND
(mitarbeiter_uid,UPPER(typ::varchar(1) || tbl_studiengang.kurzbz || '_lkt')) NOT IN
(SELECT uid, UPPER(gruppe_kurzbz) FROM public.tbl_benutzergruppe
WHERE gruppe_kurzbz LIKE '%\\_LKT' AND UPPER(gruppe_kurzbz)!=UPPER('tw_lkt') AND UPPER(gruppe_kurzbz)!=UPPER('tw_fix_lkt') AND UPPER(gruppe_kurzbz)!=UPPER('tw_ext_lkt') AND UPPER(gruppe_kurzbz)!=UPPER('moodle_lkt'))";
WHERE gruppe_kurzbz LIKE '%\\\\_LKT' AND UPPER(gruppe_kurzbz)!=UPPER('tw_lkt') AND UPPER(gruppe_kurzbz)!=UPPER('tw_fix_lkt') AND UPPER(gruppe_kurzbz)!=UPPER('tw_ext_lkt') AND UPPER(gruppe_kurzbz)!=UPPER('moodle_lkt'))";
//echo $sql_query;
if(!($result=$db->db_query($sql_query)))
$error_msg.=$db->db_last_error().$sql_query;
+57 -9
View File
@@ -1,14 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" version="1.0">
<xsl:output method="xml" version="1.0" indent="yes"/>
<xsl:template match="dokumentenakt">
<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2">
<office:scripts/>
<office:font-face-decls>
<style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
<style:font-face style:name="Liberation Sans" svg:font-family="'Liberation Sans'" style:font-family-generic="swiss" style:font-pitch="variable"/>
<style:font-face style:name="DejaVu Sans" svg:font-family="'DejaVu Sans'" style:font-family-generic="system" style:font-pitch="variable"/>
</office:font-face-decls>
<office:automatic-styles>
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Heading_20_1">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
</style:style>
<style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
<style:text-properties officeooo:rsid="0003bc74" officeooo:paragraph-rsid="0003bc74"/>
</style:style>
</office:automatic-styles>
<office:body>
<office:text>
<text:sequence-decls>
<text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
<text:sequence-decl text:display-outline-level="0" text:name="Table"/>
<text:sequence-decl text:display-outline-level="0" text:name="Text"/>
<text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
</text:sequence-decls>
<text:p text:style-name="Title">Bewerberakt</text:p>
<text:p text:style-name="P2"/>
<text:p text:style-name="P2"/>
<text:p text:style-name="P2"/>
<text:p text:style-name="P2"/>
<text:p text:style-name="P2"/>
<text:p text:style-name="P2"/>
<text:p text:style-name="P2"/>
<text:p text:style-name="P2"/>
<text:p text:style-name="P2"/>
<text:p text:style-name="P2"/>
<text:p text:style-name="P2"/>
<text:p text:style-name="P2"/>
<text:h text:style-name="P1" text:outline-level="1">
<xsl:value-of select="vorname"/>
<xsl:text> </xsl:text>
<xsl:value-of select="nachname"/>
</text:h>
<xsl:apply-templates select="dokumente" />
</office:text>
</office:body>
</office:document-content>
</xsl:template>
<xsl:stylesheet xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
>
<xsl:template match="dokumente">
<xsl:apply-templates select="name" />
</xsl:template>
<xsl:output method="xml" version="1.0" indent="yes"/>
<xsl:template match="bewerberakt">
<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2"><office:scripts/><office:font-face-decls><style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/><style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/><style:font-face style:name="DejaVu Sans" svg:font-family="&apos;DejaVu Sans&apos;" style:font-family-generic="system" style:font-pitch="variable"/></office:font-face-decls><office:automatic-styles><style:style style:name="P1" style:family="paragraph" style:parent-style-name="Heading_20_1"><style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/></style:style><style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard"><style:text-properties officeooo:rsid="0003bc74" officeooo:paragraph-rsid="0003bc74"/></style:style></office:automatic-styles><office:body><office:text><text:sequence-decls><text:sequence-decl text:display-outline-level="0" text:name="Illustration"/><text:sequence-decl text:display-outline-level="0" text:name="Table"/><text:sequence-decl text:display-outline-level="0" text:name="Text"/><text:sequence-decl text:display-outline-level="0" text:name="Drawing"/></text:sequence-decls><text:p text:style-name="Title">Bewerberakt</text:p><text:p text:style-name="P2"/><text:p text:style-name="P2"/><text:p text:style-name="P2"/><text:p text:style-name="P2"/><text:p text:style-name="P2"/><text:p text:style-name="P2"/><text:p text:style-name="P2"/><text:p text:style-name="P2"/><text:p text:style-name="P2"/><text:p text:style-name="P2"/><text:p text:style-name="P2"/><text:p text:style-name="P2"/><text:h text:style-name="P1" text:outline-level="1"><xsl:value-of select="vorname" /> <xsl:value-of select="nachname" /></text:h></office:text></office:body></office:document-content>
</xsl:template>
<xsl:template match="name">
<text:h text:style-name="P2" text:outline-level="1">
<xsl:value-of select="." />
</text:h>
</xsl:template>
</xsl:stylesheet>
+15 -2
View File
@@ -1,6 +1,5 @@
<?php
/**
* Inherited Methods
* @method void wantToTest($text)
@@ -18,9 +17,23 @@
*/
class ApiTester extends \Codeception\Actor
{
const WAIT = 70000; // 0.07 seconds
use _generated\ApiTesterActions;
/**
* Define custom actions here
*/
}
public function wait($micro_seconds = null)
{
if (!is_null($micro_seconds))
{
usleep($micro_seconds);
}
else
{
usleep(ApiTester::WAIT);
}
}
}
@@ -1,4 +1,4 @@
<?php //[STAMP] d9d924fcf3f995db40f23d78cc0fc9fc
<?php //[STAMP] e53c152fab9a8533149de0a16cc227c5
namespace _generated;
// This class was automatically generated by build task
+1
View File
@@ -24,3 +24,4 @@ coverage:
- application/*
exclude:
- application/cache/*
- application/logs/*
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/education/abgabe/Abgabe", array("abgabe_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/testtool/Ablauf/Ablauf", array("ablauf_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/education/abschlussbeurteilung/Abschlussbeurteilung", array("abschlussbeurteilung_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/education/abschlusspruefung/Abschlusspruefung", array("abschlusspruefung_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/person/adresse/Adresse", array("person_id" => 0));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/codex/Akadgrad/Akadgrad", array("akadgrad_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
+2 -1
View File
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/crm/Akte/Akte", array("akte_id" => "0", "person_id" => "0", "dokument_kurzbz" => "0", "stg_kz" => "0", "prestudent_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/project/Aktivitaet/Aktivitaet", array("aktivitaet_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
+2 -1
View File
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/content/Ampel/Ampel", array("ampel_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/education/anrechnung/Anrechnung", array("anrechnung_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/testtool/Antwort/Antwort", array("antwort_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/education/anwesenheit/Anwesenheit", array("anwesenheit_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/system/appdaten/Appdaten", array("appdaten_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/codex/Archiv/Archiv", array("archiv_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/codex/Aufmerksamdurch/Aufmerksamdurch", array("aufmerksamdurch_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/crm/Aufnahmeschluessel/Aufnahmeschluessel", array("aufnahmeschluessel" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/crm/Aufnahmetermin/Aufnahmetermin", array("aufnahmetermin_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/crm/Aufnahmetermintyp/Aufnahmetermintyp", array("aufnahmetermintyp_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/accounting/Aufteilung/Aufteilung", array("aufteilung_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/project/Aufwandstyp/Aufwandstyp", array("aufwandstyp_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/codex/Ausbildung/Ausbildung", array("ausbildungcode" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/person/Bankverbindung/Bankverbindung", array("bankverbindung_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/education/beispiel/Beispiel", array("beispiel_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/person/Benutzer/Benutzer", array("uid" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/person/Benutzerfunktion/Benutzerfunktion", array("benutzerfunktion_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/person/Benutzergruppe/Benutzergruppe", array("gruppe_kurzbz" => "0", "uid" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/system/Benutzerrolle/Benutzerrolle", array("benutzerrolle_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/system/Berechtigung/Berechtigung", array("berechtigung_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/codex/Berufstaetigkeit/Berufstaetigkeit", array("berufstaetigkeit_code" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/codex/Beschaeftigungsausmass/Beschaeftigungsausmass", array("beschausmasscode" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/codex/Besqual/Besqual", array("besqualcode" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/accounting/Bestelldetail/Bestelldetail", array("bestelldetail_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/accounting/Bestelldetailtag/Bestelldetailtag", array("bestelldetail_id" => "0", "tag" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/accounting/Bestellstatus/Bestellstatus", array("bestellstatus_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/accounting/Bestellung/Bestellung", array("bestellung_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/accounting/Bestellungtag/Bestellungtag", array("bestellung_id" => "0", "tag" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/education/betreuerart/Betreuerart", array("betreuerart_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/ressource/Betriebsmittel/Betriebsmittel", array("betriebsmittel_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/ressource/betriebsmittelperson/Betriebsmittelperson", array("betriebsmittelperson_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/ressource/Betriebsmittelstatus/Betriebsmittelstatus", array("betriebsmittelstatus_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/ressource/Betriebsmitteltyp/Betriebsmitteltyp", array("betriebsmitteltyp" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/crm/Bewerbungstermine/Bewerbungstermine", array("bewerbungstermine_id" => "0", "studiengang_kz" => "0", "studiensemester_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/codex/Bisfunktion/Bisfunktion", array("studiengang_kz" => "0", "bisverwendung_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
+2 -1
View File
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/codex/Bisio/Bisio", array("bisio_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/codex/Bisorgform/Bisorgform", array("bisorgform_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/codex/Bisverwendung/Bisverwendung", array("bisverwendung_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/accounting/Buchung/Buchung", array("buchung_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/accounting/Buchungstyp/Buchungstyp", array("buchungstyp_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/crm/Buchungstyp/Buchungstyp", array("buchungstyp_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/accounting/Budget/Budget", array("kostenstelle_id" => "0", "geschaeftsjahr_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -1,11 +1,12 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo('Test API call v1/codex/bundesland/All');
$I->wantTo("Test API call v1/codex/bundesland/All");
$I->amHttpAuthenticated("admin", "1q2w3");
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET('v1/codex/bundesland/All');
$I->sendGET("v1/codex/bundesland/All");
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(['error' => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("TO_BE_REPLACED_NAME", array(TO_BE_REPLACED_PARAMETERS));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/content/Content/Content", array("content_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/content/Contentchild/Contentchild", array("contentchild_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/content/Contentgruppe/Contentgruppe", array("gruppe_kurzbz" => "0", "content_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/content/Contentlog/Contentlog", array("contentlog_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/content/Contentsprache/Contentsprache", array("contentsprache_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/ressource/Coodle/Coodle", array("coodle_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/system/Cronjob/Cronjob", array("cronjob_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
+5 -4
View File
@@ -1,11 +1,12 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo('Test API call v1/content/dms/dms');
$I->wantTo("Test API call v1/content/dms/dms");
$I->amHttpAuthenticated("admin", "1q2w3");
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET('v1/content/dms/Dms', array('dms_id' => 1));
$I->sendGET("v1/content/dms/Dms", array("dms_id" => 1));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(['error' => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/crm/Dokument/Dokument", array("dokument_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/crm/Dokumentprestudent/Dokumentprestudent", array("prestudent_id" => "0", "dokument_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/crm/Dokumentstudiengang/Dokumentstudiengang", array("studiengang_kz" => "0", "dokument_kurzbz" => "0", "studiengang_kz" => "0", "onlinebewerbung" => "0", "pflicht" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/codex/Entwicklungsteam/Entwicklungsteam", array("studiengang_kz" => "0", "mitarbeiter_uid" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/organisation/Erhalter/Erhalter", array("erhalter_kz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/ressource/Erreichbarkeit/Erreichbarkeit", array("erreichbarkeit_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/organisation/fachbereich/Fachbereich", array("fachbereich_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/education/feedback/Feedback", array("feedback_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/organisation/Ferien/Ferien", array("studiengang_kz" => "0", "bezeichnung" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/system/Filter/Filter", array("filter_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
+2 -1
View File
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/ressource/Firma/Firma", array("firma_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/ressource/Firmatag/Firmatag", array("tag" => "0", "firma_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/ressource/Firmentyp/Firmentyp", array("firmentyp_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/person/Fotostatus/Fotostatus", array("fotostatus_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
+2 -1
View File
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/testtool/Frage/Frage", array("frage_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/person/Freebusy/Freebusy", array("freebusy_id" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/person/Freebusytyp/Freebusytyp", array("freebusytyp_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -8,4 +8,5 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET("v1/ressource/Funktion/Funktion", array("funktion_kurzbz" => "0"));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();

Some files were not shown because too many files have changed in this diff Show More