mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 01:42:17 +00:00
Merge branch 'ci' of https://github.com/FH-Complete/FHC-Core into ci
This commit is contained in:
+1
-3
@@ -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/*
|
||||
@@ -190,6 +190,7 @@ $config['fhc_acl'] = array
|
||||
'public.tbl_tag' => 'basis/tag',
|
||||
'public.tbl_variable' => 'basis/variable',
|
||||
'public.tbl_vorlage' => 'system/vorlage',
|
||||
'public.tbl_vorlagedokument' => 'system/vorlagestudiengang',
|
||||
'public.tbl_vorlagestudiengang' => 'system/vorlagestudiengang',
|
||||
'public.tbl_rt_person' => 'basis/person',
|
||||
'public.vw_studiensemester' => 'basis/studiensemester',
|
||||
|
||||
@@ -42,7 +42,7 @@ class Templates extends FHC_Controller
|
||||
$vorlagentext = $this->vorlagelib->getVorlagetextByVorlage($vorlage_kurzbz);
|
||||
if ($vorlagentext->error)
|
||||
show_error($vorlagentext->retval);
|
||||
//var_dump($vorlage);
|
||||
//var_dump($vorlagentext);
|
||||
|
||||
$data = array
|
||||
(
|
||||
@@ -128,6 +128,43 @@ class Templates extends FHC_Controller
|
||||
$this->load->view('system/templatetextEdit', $data);
|
||||
}
|
||||
|
||||
public function linkDocuments($vorlagestudiengang_id)
|
||||
{
|
||||
$this->load->model('system/vorlagedokument_model');
|
||||
$return = $this->vorlagedokument_model->loadDokumenteFromVorlagestudiengang($vorlagestudiengang_id);
|
||||
$data['documents'] = $return->retval;
|
||||
|
||||
$this->load->model('system/dokument_model');
|
||||
$this->dokument_model->addOrder("bezeichnung");
|
||||
$return = $this->dokument_model->load();
|
||||
$data['allDocuments'] = $return->retval;
|
||||
|
||||
$data['vorlagestudiengang_id'] = $vorlagestudiengang_id;
|
||||
|
||||
$this->load->view('system/templateLinkDocuments', $data);
|
||||
}
|
||||
|
||||
public function saveDocuments($vorlagestudiengang_id, $dokument_kurzbz, $sort)
|
||||
{
|
||||
$this->load->model('system/vorlagedokument_model');
|
||||
$insert['vorlagestudiengang_id'] = $vorlagestudiengang_id;
|
||||
$insert['dokument_kurzbz'] = $dokument_kurzbz;
|
||||
$insert['sort'] = $sort;
|
||||
$this->vorlagedokument_model->insert($insert);
|
||||
}
|
||||
|
||||
public function deleteDocumentLink($vorlagestudiengang_id)
|
||||
{
|
||||
$this->load->model('system/vorlagedokument_model');
|
||||
$this->vorlagedokument_model->delete($vorlagestudiengang_id);
|
||||
}
|
||||
|
||||
public function changeSort($vorlagestudiengang_id, $sort)
|
||||
{
|
||||
$this->load->model('system/vorlagedokument_model');
|
||||
$this->vorlagedokument_model->update($vorlagestudiengang_id, array("sort"=>$sort));
|
||||
}
|
||||
|
||||
public function saveText()
|
||||
{
|
||||
$vorlagestudiengang_id = $this->input->post('vorlagestudiengang_id', TRUE);
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)))
|
||||
{
|
||||
|
||||
@@ -217,4 +217,4 @@ class VorlageLib
|
||||
$return->retval = $retval;
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ class Akte_model extends DB_Model
|
||||
dms_id,
|
||||
anmerkung,
|
||||
nachgereicht,
|
||||
nachgereicht_am,
|
||||
CASE WHEN inhalt is not null THEN true ELSE false END as inhalt_vorhanden
|
||||
FROM public.tbl_akte
|
||||
WHERE person_id = ?';
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
class Dokument_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'public.tbl_dokument';
|
||||
$this->pk = 'dokument_kurzbz';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
class Vorlagedokument_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'public.tbl_vorlagedokument';
|
||||
$this->pk = 'vorlagedokument_id';
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function loadDokumenteFromVorlagestudiengang($vorlagestudiengang_id)
|
||||
{
|
||||
// Checks if the operation is permitted by the API caller
|
||||
if (! $this->fhc_db_acl->isBerechtigt($this->getBerechtigungKurzbz('public.tbl_vorlagedokument'), 's'))
|
||||
return $this->_error(lang('fhc_'.FHC_NORIGHT).' -> '.$this->getBerechtigungKurzbz('public.tbl_vorlagedokument'), FHC_MODEL_ERROR);
|
||||
|
||||
$result = null;
|
||||
|
||||
$qry = "SELECT vorlagedokument_id, sort, vorlagestudiengang_id, dokument_kurzbz, bezeichnung
|
||||
FROM public.tbl_vorlagedokument
|
||||
JOIN public.tbl_dokument USING(dokument_kurzbz)
|
||||
WHERE vorlagestudiengang_id=?
|
||||
ORDER BY sort ASC
|
||||
";
|
||||
|
||||
$result = $this->db->query($qry, array($vorlagestudiengang_id));
|
||||
|
||||
|
||||
if (is_object($result))
|
||||
return $this->_success($result->result());
|
||||
else
|
||||
return $this->_error($this->db->error(), FHC_DB_ERROR);
|
||||
}
|
||||
}
|
||||
@@ -1,78 +1,78 @@
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'TemplateEdit', 'jquery' => true, 'textile' => true));
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Phrasentext: <?=$phrasentext_id?></h2>
|
||||
|
||||
<form method="post" action="../saveText/<?=$phrasentext_id?>">
|
||||
<input type="hidden" name="phrase_inhalt_id" value="<?php echo $phrasentext_id; ?>" />
|
||||
<table>
|
||||
<tr>
|
||||
<td>OE</td>
|
||||
<td><?php echo $this->templatelib->widget("organisationseinheit_widget", array('oe_kurzbz' => $orgeinheit_kurzbz)); ?></td>
|
||||
<td>Preview</td>
|
||||
</tr>
|
||||
<tr><td>Orgform</td><td><?php echo $this->templatelib->widget("orgform_widget", array('orgform_kurzbz' => $orgform_kurzbz)); ?></td><td></td></tr>
|
||||
<tr><td>Sprache</td><td><?php echo $this->templatelib->widget("sprache_widget", array('sprache' => $sprache)); ?></td><td></td></tr>
|
||||
<tr><td>Text</td><td><textarea name="text" style="width:500px; height:300px;" id="markitup"><?php echo $text ?></textarea></td>
|
||||
<td valign="top">
|
||||
<div id="textile-preview" style="width:500px; height:300px; border: 1px solid gray; overflow: auto;"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>Beschreibung</td><td><textarea name="description" style="width:500px; height:100px;"><?php echo $description ?></textarea></td>
|
||||
<td><h3>Formatierung (Textile) Hilfe:</h3><br/>
|
||||
<code>
|
||||
_emphasis_
|
||||
*strong*
|
||||
??citation??
|
||||
-deleted text-
|
||||
+inserted text+
|
||||
^superscript^
|
||||
</code><br/>
|
||||
<a href="https://warpedvisions.org/projects/textile-cheat-sheet/" target="_blank">Textile CheatSheet</a>
|
||||
</td></tr>
|
||||
<?php
|
||||
// This is an example to show that you can load stuff from inside the template file
|
||||
//echo $this->templatelib->widget("tinymce_widget", array('name' => 'text', 'text' => $text));
|
||||
?>
|
||||
<tr><td colspan="2" align="right"><button type="submit">Save</button></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
initTextile();
|
||||
});
|
||||
|
||||
function initTextile() {
|
||||
var $content = $('#markitup'); // my textarea
|
||||
var $preview = $('#textile-preview'); // the preview div
|
||||
|
||||
//$content.markItUp(); // init markitup
|
||||
|
||||
// use a simple timer to check if the textarea content has changed
|
||||
var value = $content.val();
|
||||
$preview.html(textile.convert(value));
|
||||
setInterval(function () {
|
||||
var newValue = $content.val();
|
||||
if (value != newValue) {
|
||||
value = newValue;
|
||||
$preview.html(textile.convert(newValue)); // convert the textile to html
|
||||
}
|
||||
}, 500);
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<!--
|
||||
<iframe name="TemplatePreview" width="100%" src=""/>
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'TemplateEdit', 'jquery' => true, 'textile' => true));
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Phrasentext: <?=$phrasentext_id?></h2>
|
||||
|
||||
<form method="post" action="../saveText/<?=$phrasentext_id?>">
|
||||
<input type="hidden" name="phrase_inhalt_id" value="<?php echo $phrasentext_id; ?>" />
|
||||
<table>
|
||||
<tr>
|
||||
<td>OE</td>
|
||||
<td><?php echo $this->templatelib->widget("organisationseinheit_widget", array('oe_kurzbz' => $orgeinheit_kurzbz)); ?></td>
|
||||
<td>Preview</td>
|
||||
</tr>
|
||||
<tr><td>Orgform</td><td><?php echo $this->templatelib->widget("orgform_widget", array('orgform_kurzbz' => $orgform_kurzbz)); ?></td><td></td></tr>
|
||||
<tr><td>Sprache</td><td><?php echo $this->templatelib->widget("sprache_widget", array('sprache' => $sprache)); ?></td><td></td></tr>
|
||||
<tr><td>Text</td><td><textarea name="text" style="width:500px; height:300px;" id="markitup"><?php echo $text ?></textarea></td>
|
||||
<td valign="top">
|
||||
<div id="textile-preview" style="width:500px; height:300px; border: 1px solid gray; overflow: auto;"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>Beschreibung</td><td><textarea name="description" style="width:500px; height:100px;"><?php echo $description ?></textarea></td>
|
||||
<td><h3>Formatierung (Textile) Hilfe:</h3><br/>
|
||||
<code>
|
||||
_emphasis_
|
||||
*strong*
|
||||
??citation??
|
||||
-deleted text-
|
||||
+inserted text+
|
||||
^superscript^
|
||||
</code><br/>
|
||||
<a href="https://warpedvisions.org/projects/textile-cheat-sheet/" target="_blank">Textile CheatSheet</a>
|
||||
</td></tr>
|
||||
<?php
|
||||
// This is an example to show that you can load stuff from inside the template file
|
||||
//echo $this->templatelib->widget("tinymce_widget", array('name' => 'text', 'text' => $text));
|
||||
?>
|
||||
<tr><td colspan="2" align="right"><button type="submit">Save</button></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
initTextile();
|
||||
});
|
||||
|
||||
function initTextile() {
|
||||
var $content = $('#markitup'); // my textarea
|
||||
var $preview = $('#textile-preview'); // the preview div
|
||||
|
||||
//$content.markItUp(); // init markitup
|
||||
|
||||
// use a simple timer to check if the textarea content has changed
|
||||
var value = $content.val();
|
||||
$preview.html(textile.convert(value));
|
||||
setInterval(function () {
|
||||
var newValue = $content.val();
|
||||
if (value != newValue) {
|
||||
value = newValue;
|
||||
$preview.html(textile.convert(newValue)); // convert the textile to html
|
||||
}
|
||||
}, 500);
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<!--
|
||||
<iframe name="TemplatePreview" width="100%" src=""/>
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'PhrasesList', 'tablesort' => true, 'tableid' => 't1', 'headers' => '3:{sorter:false}'));
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Phrasen</h2>
|
||||
<!--
|
||||
<form method="post" action="">
|
||||
App: aufnahme
|
||||
<?php
|
||||
// This is an example to show that you can load stuff from inside the template file
|
||||
//echo $this->templatelib->widget("mimetype_widget", array('mimetype' => $mimetype));
|
||||
?>
|
||||
<button type="submit">Filter</button>
|
||||
</form>
|
||||
-->
|
||||
<table id="t1" class="tablesorter">
|
||||
<thead>
|
||||
<tr><th class='table-sortable:default'>ID</th>
|
||||
<th>App</th>
|
||||
<th class='table-sortable:default'>Phrase</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($phrases as $p): ?>
|
||||
<tr><td><a href="edit/<?php echo $p->phrase_id; ?>" target="PhrasesBottom"><?php echo $p->phrase_id; ?></a></td>
|
||||
<td><?php echo $p->app; ?></td>
|
||||
<td><a href="edit/<?php echo $p->phrase_id; ?>" target="PhrasesBottom"><?php echo $p->phrase; ?></a></td>
|
||||
<td><a href="view/<?php echo $p->phrase_id; ?>" target="PhrasesTop">Phrasentexte bearbeiten</a></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'PhrasesList', 'tablesort' => true, 'tableid' => 't1', 'headers' => '3:{sorter:false}'));
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Phrasen</h2>
|
||||
<!--
|
||||
<form method="post" action="">
|
||||
App: aufnahme
|
||||
<?php
|
||||
// This is an example to show that you can load stuff from inside the template file
|
||||
//echo $this->templatelib->widget("mimetype_widget", array('mimetype' => $mimetype));
|
||||
?>
|
||||
<button type="submit">Filter</button>
|
||||
</form>
|
||||
-->
|
||||
<table id="t1" class="tablesorter">
|
||||
<thead>
|
||||
<tr><th class='table-sortable:default'>ID</th>
|
||||
<th>App</th>
|
||||
<th class='table-sortable:default'>Phrase</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($phrases as $p): ?>
|
||||
<tr><td><a href="edit/<?php echo $p->phrase_id; ?>" target="PhrasesBottom"><?php echo $p->phrase_id; ?></a></td>
|
||||
<td><?php echo $p->app; ?></td>
|
||||
<td><a href="edit/<?php echo $p->phrase_id; ?>" target="PhrasesBottom"><?php echo $p->phrase; ?></a></td>
|
||||
<td><a href="view/<?php echo $p->phrase_id; ?>" target="PhrasesTop">Phrasentexte bearbeiten</a></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'TemplateLinkDocuments', 'tablesort' => true, 'tableid' => 't1', 'sortList' => '2,1', 'headers' => '3:{sorter:false},4:{sorter:false}'));
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
function addDocument(dokument_kurzbz)
|
||||
{
|
||||
var addDocumentDefault = document.getElementById("addDocumentDefault");
|
||||
addDocumentDefault.selected = true;
|
||||
|
||||
|
||||
$.post("../saveDocuments/"+<?=$vorlagestudiengang_id?>+"/"+dokument_kurzbz+"/0", function(answer)
|
||||
{
|
||||
window.location.href=window.location.href;
|
||||
});
|
||||
}
|
||||
function delDocument(vorlagedokument_id)
|
||||
{
|
||||
$.post("../deleteDocumentLink/"+vorlagedokument_id, function(answer)
|
||||
{
|
||||
window.location.href=window.location.href;
|
||||
});
|
||||
}
|
||||
function changeSort(vorlagedokument_id, sortnum)
|
||||
{
|
||||
$.post("../changeSort/"+vorlagedokument_id+"/"+sortnum, function(answer)
|
||||
{
|
||||
window.location.href=window.location.href;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<h2><?=$vorlagestudiengang_id?></h2>
|
||||
<table id="t1" class="tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Bezeichnung</th>
|
||||
<th>Sortierung</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($documents as $d): ?>
|
||||
<tr>
|
||||
<td><?=$d->vorlagedokument_id?></td>
|
||||
<td><?=$d->bezeichnung?></td>
|
||||
<td> <?=$d->sort?></td>
|
||||
<td><a onclick="changeSort('<?=$d->vorlagedokument_id?>', <?=$d->sort?>+1)"><img src="<?php echo APP_ROOT?>/skin/images/up.png"/></a> <a onclick="changeSort('<?=$d->vorlagedokument_id?>', <?=$d->sort?>-1)"><img src="<?php echo APP_ROOT?>/skin/images/down.png"/></a></td>
|
||||
<td><a onclick="delDocument('<?=$d->vorlagedokument_id?>')">löschen</a></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<select>
|
||||
<option selected="true" id="addDocumentDefault" disabled>Dokument hinzufuegen</option>
|
||||
<?php foreach($allDocuments as $d): ?>
|
||||
<option onclick="addDocument('<?=$d->dokument_kurzbz?>');"><?=$d->bezeichnung?></option>
|
||||
<?php endforeach ;?>
|
||||
</select>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,32 +1,32 @@
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'TemplateEdit', 'jsoneditor' => true));
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Vorlage: <?php echo $vorlage->vorlage_kurzbz; ?></h2>
|
||||
<form method="post" action="../save">
|
||||
Bezeichnung: <input type="text" name="bezeichnung" value="<?php echo $vorlage->bezeichnung; ?>" />
|
||||
Anmerkung: <input type="text" name="anmerkung" value="<?php echo $vorlage->anmerkung; ?>" /><br/>
|
||||
|
||||
MimeType:<?php echo $this->templatelib->widget("mimetype_widget", array('mimetype' => $vorlage->mimetype)); ?>
|
||||
|
||||
Attribute: <?php echo $this->templatelib->widget("jsoneditor_widget", array('json' => $vorlage->attribute)); ?>
|
||||
|
||||
<input type="hidden" name="attribute" id="attribute" value="<?=$vorlage->attribute?>" />
|
||||
<input type="hidden" name="vorlage_kurzbz" value="<?php echo $vorlage->vorlage_kurzbz; ?>" />
|
||||
<button type="submit" onclick="getJSON(this.form);">Save</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" >
|
||||
// get json
|
||||
function getJSON(form)
|
||||
{
|
||||
form.elements["attribute"].value = JSON.stringify(jsoneditor.get(), null, 2);
|
||||
//alert(form.elements["attribute"].value);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'TemplateEdit', 'jsoneditor' => true));
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Vorlage: <?php echo $vorlage->vorlage_kurzbz; ?></h2>
|
||||
<form method="post" action="../save">
|
||||
Bezeichnung: <input type="text" name="bezeichnung" value="<?php echo $vorlage->bezeichnung; ?>" />
|
||||
Anmerkung: <input type="text" name="anmerkung" value="<?php echo $vorlage->anmerkung; ?>" /><br/>
|
||||
|
||||
MimeType:<?php echo $this->templatelib->widget("mimetype_widget", array('mimetype' => $vorlage->mimetype)); ?>
|
||||
|
||||
Attribute: <?php echo $this->templatelib->widget("jsoneditor_widget", array('json' => $vorlage->attribute)); ?>
|
||||
|
||||
<input type="hidden" name="attribute" id="attribute" value="<?=$vorlage->attribute?>" />
|
||||
<input type="hidden" name="vorlage_kurzbz" value="<?php echo $vorlage->vorlage_kurzbz; ?>" />
|
||||
<button type="submit" onclick="getJSON(this.form);">Save</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" >
|
||||
// get json
|
||||
function getJSON(form)
|
||||
{
|
||||
form.elements["attribute"].value = JSON.stringify(jsoneditor.get(), null, 2);
|
||||
//alert(form.elements["attribute"].value);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'TemplatesList', 'tablesort' => true, 'tableid' => 't1', 'headers' => '4:{sorter:false}'));
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Vorlagen</h2>
|
||||
<form method="post" action="">
|
||||
MimeType
|
||||
<?php
|
||||
// This is an example to show that you can load stuff from inside the template file
|
||||
echo $this->templatelib->widget("mimetype_widget", array('mimetype' => $mimetype));
|
||||
?>
|
||||
<button type="submit">Filter</button>
|
||||
</form>
|
||||
|
||||
<table id="t1" class="tablesorter">
|
||||
<thead>
|
||||
<tr><th class='table-sortable:default'>Vorlage</th>
|
||||
<th class='table-sortable:default'>Bezeichnung</th>
|
||||
<th>Anmerkung</th><th>MimeType</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($vorlage as $v): ?>
|
||||
<tr><td><a href="edit/<?php echo $v->vorlage_kurzbz; ?>" target="TemplatesBottom"><?php echo $v->vorlage_kurzbz; ?></a></td>
|
||||
<td><?php echo $v->bezeichnung; ?></td>
|
||||
<td><?php echo $v->anmerkung; ?></td>
|
||||
<td><?php echo $v->mimetype; ?></td>
|
||||
<td><a href="view/<?php echo $v->vorlage_kurzbz; ?>">Vorlagenexte bearbeiten</a></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'TemplatesList', 'tablesort' => true, 'tableid' => 't1', 'headers' => '4:{sorter:false}'));
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Vorlagen</h2>
|
||||
<form method="post" action="">
|
||||
MimeType
|
||||
<?php
|
||||
// This is an example to show that you can load stuff from inside the template file
|
||||
echo $this->templatelib->widget("mimetype_widget", array('mimetype' => $mimetype));
|
||||
?>
|
||||
<button type="submit">Filter</button>
|
||||
</form>
|
||||
|
||||
<table id="t1" class="tablesorter">
|
||||
<thead>
|
||||
<tr><th class='table-sortable:default'>Vorlage</th>
|
||||
<th class='table-sortable:default'>Bezeichnung</th>
|
||||
<th>Anmerkung</th><th>MimeType</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($vorlage as $v): ?>
|
||||
<tr><td><a href="edit/<?php echo $v->vorlage_kurzbz; ?>" target="TemplatesBottom"><?php echo $v->vorlage_kurzbz; ?></a></td>
|
||||
<td><?php echo $v->bezeichnung; ?></td>
|
||||
<td><?php echo $v->anmerkung; ?></td>
|
||||
<td><?php echo $v->mimetype; ?></td>
|
||||
<td><a href="view/<?php echo $v->vorlage_kurzbz; ?>">Vorlagenexte bearbeiten</a></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'TemplateEdit', 'tinymce' => true, 'jsonforms' => true));
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Vorlagetext: <?=$vorlagestudiengang_id?></h2>
|
||||
<!--StudiengangKZ: <?=$studiengang_kz?>-->
|
||||
<form method="post" action="../saveText/<?=$vorlagestudiengang_id?>">
|
||||
OE:<?php echo $this->templatelib->widget("organisationseinheit_widget", array('oe_kurzbz' => $oe_kurzbz, 'typ' => "'Erhalter','Studienzentrum','Studiengang','Lehrgang'")); ?>
|
||||
Sprache:<?php echo $this->templatelib->widget("sprache_widget", array('sprache' => $sprache)); ?>
|
||||
OrgForm:<?php echo $this->templatelib->widget("orgform_widget", array('orgform' => $orgform_kurzbz)); ?>
|
||||
Version: <input type="text" name="version" value="<?php echo $version; ?>" size="1" />
|
||||
Aktiv: <input type="text" name="aktiv" value="<?php echo $aktiv; ?>" size="1" />
|
||||
<input type="hidden" name="vorlagestudiengang_id" value="<?php echo $vorlagestudiengang_id; ?>" />
|
||||
<input type="hidden" name="studiengang_kz" value="<?php echo $studiengang_kz; ?>" />
|
||||
<?php
|
||||
// This is an example to show that you can load stuff from inside the template file
|
||||
echo $this->templatelib->widget("tinymce_widget", array('name' => 'text', 'text' => $text));
|
||||
?>
|
||||
<button type="submit">Save</button>
|
||||
</form>
|
||||
<hr/><h2>Preview-Data</h2>
|
||||
<form method="post" action="../preview/<?=$vorlagestudiengang_id?>" target="TemplatePreview">
|
||||
<?php echo $this->templatelib->widget("jsonforms_widget", array('id' => 'dataform', 'schema' => $schema)); ?>
|
||||
<input type="hidden" name="formdata" id="formdata" value="" />
|
||||
<button type="submit" onclick="getFormdata(this.form);">Preview</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" >
|
||||
// get json
|
||||
function getFormdata(form)
|
||||
{
|
||||
form.elements["formdata"].value = JSON.stringify(bf.getData(), null, 2);
|
||||
//alert(form.elements["formdata"].value);
|
||||
}
|
||||
</script>
|
||||
|
||||
<iframe name="TemplatePreview" width="100%" src=""/>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'TemplateEdit', 'tinymce' => true, 'jsonforms' => true));
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Vorlagetext: <?=$vorlagestudiengang_id?></h2>
|
||||
<!--StudiengangKZ: <?=$studiengang_kz?>-->
|
||||
<form method="post" action="../saveText/<?=$vorlagestudiengang_id?>">
|
||||
OE:<?php echo $this->templatelib->widget("organisationseinheit_widget", array('oe_kurzbz' => $oe_kurzbz, 'typ' => "'Erhalter','Studienzentrum','Studiengang','Lehrgang'")); ?>
|
||||
Sprache:<?php echo $this->templatelib->widget("sprache_widget", array('sprache' => $sprache)); ?>
|
||||
OrgForm:<?php echo $this->templatelib->widget("orgform_widget", array('orgform' => $orgform_kurzbz)); ?>
|
||||
Version: <input type="text" name="version" value="<?php echo $version; ?>" size="1" />
|
||||
Aktiv: <input type="text" name="aktiv" value="<?php echo $aktiv; ?>" size="1" />
|
||||
<input type="hidden" name="vorlagestudiengang_id" value="<?php echo $vorlagestudiengang_id; ?>" />
|
||||
<input type="hidden" name="studiengang_kz" value="<?php echo $studiengang_kz; ?>" />
|
||||
<?php
|
||||
// This is an example to show that you can load stuff from inside the template file
|
||||
echo $this->templatelib->widget("tinymce_widget", array('name' => 'text', 'text' => $text));
|
||||
?>
|
||||
<button type="submit">Save</button>
|
||||
</form>
|
||||
<hr/><h2>Preview-Data</h2>
|
||||
<form method="post" action="../preview/<?=$vorlagestudiengang_id?>" target="TemplatePreview">
|
||||
<?php echo $this->templatelib->widget("jsonforms_widget", array('id' => 'dataform', 'schema' => $schema)); ?>
|
||||
<input type="hidden" name="formdata" id="formdata" value="" />
|
||||
<button type="submit" onclick="getFormdata(this.form);">Preview</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" >
|
||||
// get json
|
||||
function getFormdata(form)
|
||||
{
|
||||
form.elements["formdata"].value = JSON.stringify(bf.getData(), null, 2);
|
||||
//alert(form.elements["formdata"].value);
|
||||
}
|
||||
</script>
|
||||
|
||||
<iframe name="TemplatePreview" width="100%" src=""/>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,45 +1,50 @@
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'TemplatetextList', 'tablesort' => true, 'tableid' => 't1', 'headers' => '7:{sorter:false}'));
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Vorlagentext - <?php echo $vorlage_kurzbz; ?></h2>
|
||||
<form method="post" action="../newtext" target="TemplatesBottom">
|
||||
<input type="hidden" name="vorlage_kurzbz" value="<?php echo $vorlage_kurzbz; ?>"/>
|
||||
<button type="submit">Neu</button>
|
||||
</form>
|
||||
|
||||
<table id="t1" class="tablesorter">
|
||||
<thead>
|
||||
<tr><th class='table-sortable:default'>ID</th>
|
||||
<th class='table-sortable:default'>Vorlage</th>
|
||||
<th class='table-sortable:default'>Version</th>
|
||||
<th class='table-sortable:default'>OrgEinheit</th>
|
||||
<th class='table-sortable:default'>OrgForm</th>
|
||||
<th class='table-sortable:default'>Berechtigung</th>
|
||||
<th>Anmerkung</th><th>Aktiv</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($vorlagentext as $v): ?>
|
||||
<tr><td><a href="../edittext/<?php echo $v->vorlagestudiengang_id; ?>" target="TemplatesBottom"><?php echo $v->vorlagestudiengang_id; ?></a></td>
|
||||
<td><a href="../edittext/<?php echo $v->vorlagestudiengang_id; ?>" target="TemplatesBottom"><?php echo $v->vorlage_kurzbz; ?></a></td>
|
||||
<td><?php echo $v->version; ?></td>
|
||||
<td><?php echo $v->oe_kurzbz; ?></td>
|
||||
<td></td>
|
||||
<td><?php echo $v->berechtigung; ?></td>
|
||||
<td><?php echo $v->anmerkung_vorlagestudiengang; ?></td>
|
||||
<td><?php echo $v->aktiv; ?></td>
|
||||
<td><a href="../editText/<?php echo $v->vorlagestudiengang_id; ?>" target="TemplatesBottom">Edit</a></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$this->load->view('templates/footer');
|
||||
?>
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'TemplatetextList', 'tablesort' => true, 'tableid' => 't1', 'headers' => '7:{sorter:false},8:{sorter:false},9:{sorter:false}'));
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Vorlagentext - <?php echo $vorlage_kurzbz; ?></h2>
|
||||
<form method="post" action="../newtext" target="TemplatesBottom">
|
||||
<input type="hidden" name="vorlage_kurzbz" value="<?php echo $vorlage_kurzbz; ?>"/>
|
||||
<button type="submit">Neu</button>
|
||||
</form>
|
||||
|
||||
<table id="t1" class="tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Vorlage</th>
|
||||
<th>Version</th>
|
||||
<th>OrgEinheit</th>
|
||||
<th>OrgForm</th>
|
||||
<th>Berechtigung</th>
|
||||
<th>Anmerkung</th>
|
||||
<th>Aktiv</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($vorlagentext as $v): ?>
|
||||
<tr>
|
||||
<td><a href="../edittext/<?php echo $v->vorlagestudiengang_id; ?>" target="TemplatesBottom"><?php echo $v->vorlagestudiengang_id; ?></a></td>
|
||||
<td><a href="../edittext/<?php echo $v->vorlagestudiengang_id; ?>" target="TemplatesBottom"><?php echo $v->vorlage_kurzbz; ?></a></td>
|
||||
<td><?php echo $v->version; ?></td>
|
||||
<td><?php echo $v->oe_kurzbz; ?></td>
|
||||
<td></td>
|
||||
<td><?php echo $v->berechtigung; ?></td>
|
||||
<td><?php echo $v->anmerkung_vorlagestudiengang; ?></td>
|
||||
<td><?php echo $v->aktiv; ?></td>
|
||||
<td><a href="../editText/<?php echo $v->vorlagestudiengang_id; ?>" target="TemplatesBottom">Edit Text</a></td>
|
||||
<td><a href="../linkDocuments/<?php echo $v->vorlagestudiengang_id; ?>" target="TemplatesBottom">Edit Documents</a></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$this->load->view('templates/footer');
|
||||
?>
|
||||
|
||||
@@ -38,6 +38,8 @@ $user = get_uid();
|
||||
if(!isset($_GET["prestudent_ids"]) || !isset($_GET["vorlage_kurzbz"]))
|
||||
die($p->t('anwesenheitsliste/fehlerhafteParameteruebergabe'));
|
||||
|
||||
|
||||
$vorlage_kurzbz = $_GET["vorlage_kurzbz"];
|
||||
$prestudent_ids = explode(";", $_GET["prestudent_ids"]);
|
||||
|
||||
if(empty($prestudent_ids))
|
||||
@@ -76,19 +78,41 @@ foreach($prestudent_ids as $pid)
|
||||
|
||||
if(empty($preErrors))
|
||||
{
|
||||
/*
|
||||
* Determine the oe_kurzbz
|
||||
*/
|
||||
$query= '
|
||||
SELECT
|
||||
oe_kurzbz
|
||||
FROM
|
||||
public.tbl_prestudent
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE
|
||||
prestudent_id='.$db->db_add_param($pid, FHC_INTEGER).'
|
||||
';
|
||||
if(!$res = $db->db_query($query))
|
||||
die("Es ist ein Fehler bei der Ermittlung der Organisationseinheit aufgetreten");
|
||||
|
||||
if(!$row = $db->db_fetch_object($res))
|
||||
die("Es ist ein Fehler bei der Ermittlung der Organisationseinheit aufgetreten");
|
||||
|
||||
$vorlagestudiengang_id = recursiveGetVorlagestudiengang_id($row->oe_kurzbz, $db);
|
||||
$oe_kurzbz = $row->oe_kurzbz;
|
||||
/*
|
||||
* Get all Documents
|
||||
*/
|
||||
$query= '
|
||||
SELECT
|
||||
titel, dms_id, inhalt, mimetype, dokument_kurzbz, bezeichnung
|
||||
titel, dms_id, inhalt, mimetype, dokument_kurzbz, tbl_dokument.bezeichnung, sort, akte_id
|
||||
FROM
|
||||
public.tbl_dokumentstudiengang
|
||||
JOIN public.tbl_prestudent USING(studiengang_kz)
|
||||
JOIN public.tbl_akte USING(person_id,dokument_kurzbz)
|
||||
public.tbl_vorlagedokument
|
||||
JOIN public.tbl_dokument USING(dokument_kurzbz)
|
||||
JOIN public.tbl_akte USING(dokument_kurzbz)
|
||||
JOIN public.tbl_prestudent USING(person_id)
|
||||
WHERE
|
||||
onlinebewerbung
|
||||
AND prestudent_id='.$db->db_add_param($pid, FHC_INTEGER).';
|
||||
vorlagestudiengang_id='.$db->db_add_param($vorlagestudiengang_id).'
|
||||
AND prestudent_id='.$db->db_add_param($pid).'
|
||||
ORDER BY sort asc;
|
||||
';
|
||||
|
||||
$preDocs = array();
|
||||
@@ -99,7 +123,7 @@ foreach($prestudent_ids as $pid)
|
||||
$filename = "";
|
||||
if($row->inhalt != null)
|
||||
{
|
||||
$filename = $tmpDir . "/".uniqid();
|
||||
$filename = $tmpDir . "/" . uniqid();
|
||||
$fileData = base64_decode($row->inhalt);
|
||||
file_put_contents($filename, $fileData);
|
||||
}
|
||||
@@ -118,13 +142,15 @@ foreach($prestudent_ids as $pid)
|
||||
|
||||
// this should never happen
|
||||
if($filename == "")
|
||||
$preErrors[] = "'" . $row->titel . "': Diese Datei hat keinen Inhalt und keine dms_id";
|
||||
{
|
||||
$preErrors[] = "'" . $row->akte_id . "': Diese Akte hat keinen Inhalt und keine dms_id";
|
||||
}
|
||||
|
||||
if(empty($preErrors))
|
||||
{
|
||||
/*
|
||||
* Determine the filetype
|
||||
* and convert if nessecary
|
||||
* and convert, if nessecary
|
||||
*/
|
||||
$fullFilename = "";
|
||||
$explodedTitle = explode(".", $row->titel);
|
||||
@@ -202,7 +228,7 @@ foreach($prestudent_ids as $pid)
|
||||
* Deckblatt
|
||||
*/
|
||||
$filename = $tmpDir . "/".uniqid();
|
||||
$doc = new dokument_export($_GET["vorlage_kurzbz"]);
|
||||
$doc = new dokument_export($vorlage_kurzbz, $oe_kurzbz);
|
||||
$doc->addDataArray(array('vorname' => $prestudent->vorname, 'nachname' => $prestudent->nachname, array('dokumente'=> $dokumente)),"dokumentenakt");
|
||||
|
||||
if(!$doc->create('pdf'))
|
||||
@@ -274,7 +300,7 @@ else
|
||||
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="hidden" name="vorlage_kurzbz" value="'.$vorlage_kurzbz.'"/>';
|
||||
echo '<input type="submit" name="force" value="Fortfahren" title="Fehlerhafte Dokumente auslassen"/>';
|
||||
echo "</form>";
|
||||
?>
|
||||
@@ -304,7 +330,6 @@ function cleanUpAndDie($msg, $tmpDir)
|
||||
|
||||
function removeFolder($dir)
|
||||
{
|
||||
return;
|
||||
if($dir == "/")
|
||||
return false;
|
||||
if (is_dir($dir) === true)
|
||||
@@ -318,4 +343,52 @@ return;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function recursiveGetVorlagestudiengang_id($oe_kurzbz, $db)
|
||||
{
|
||||
$query= '
|
||||
SELECT
|
||||
vorlagedokument_id, vorlagestudiengang_id
|
||||
FROM
|
||||
public.tbl_vorlagestudiengang
|
||||
JOIN public.tbl_vorlagedokument USING(vorlagestudiengang_id)
|
||||
WHERE
|
||||
oe_kurzbz='.$db->db_add_param($oe_kurzbz).'
|
||||
AND aktiv
|
||||
ORDER BY version DESC LIMIT 1
|
||||
';
|
||||
|
||||
if(!$res = $db->db_query($query))
|
||||
die("Fehler beim holen der Dokumentenliste");
|
||||
|
||||
|
||||
if(!$db->db_num_rows($res))
|
||||
{
|
||||
/*
|
||||
* Nothing found, so we determine the
|
||||
* oe_parent_kurzbz and try it again
|
||||
*/
|
||||
$queryParent= '
|
||||
SELECT
|
||||
oe_parent_kurzbz
|
||||
FROM
|
||||
public.tbl_organisationseinheit
|
||||
WHERE
|
||||
oe_kurzbz='.$db->db_add_param($oe_kurzbz).'
|
||||
';
|
||||
if(!$resultParent = $db->db_query($queryParent))
|
||||
die("Fehler beim holen der Dokumentenliste");
|
||||
if(!$rowParent = $db->db_fetch_object($resultParent))
|
||||
die("Fehler beim holen der Dokumentenliste");
|
||||
|
||||
return recursiveGetVorlagestudiengang_id($rowParent->oe_parent_kurzbz, $db);
|
||||
}
|
||||
else
|
||||
{
|
||||
$row = $db->db_fetch_object($res);
|
||||
return $row->vorlagestudiengang_id;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
?>
|
||||
|
||||
+497
-498
@@ -1,498 +1,497 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
*/
|
||||
/**
|
||||
* Verwaltet die Vorlagen fuer die Dokumentenerstellung
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
require_once(dirname(__FILE__).'/organisationseinheit.class.php');
|
||||
|
||||
class vorlage extends basis_db
|
||||
{
|
||||
// ErgebnisArray
|
||||
public $result=array();
|
||||
public $num_rows=0;
|
||||
public $errormsg;
|
||||
public $new;
|
||||
|
||||
//Tabellenspalten
|
||||
public $vorlage_kurzbz; // varchar(16)
|
||||
public $studiengang_kz; // integer
|
||||
public $version; // smallint
|
||||
public $text; // text
|
||||
public $mimetype; // varchar(64)
|
||||
public $bezeichnung; // varchar(64)
|
||||
public $anmerkung; // text
|
||||
public $style; // text
|
||||
public $berechtigung; // varchar(32)[]
|
||||
public $oe_kurzbz; // varchar(32)
|
||||
public $vorlagestudiengang_id; // bigint
|
||||
public $anmerkung_vorlagestudiengang; // text
|
||||
public $aktiv; // boolean
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt eine Vorlage
|
||||
* @param $vorlage_kurzbz
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function loadVorlage($vorlage_kurzbz)
|
||||
{
|
||||
$qry = "SELECT * FROM public.tbl_vorlage WHERE vorlage_kurzbz=".$this->db_add_param($vorlage_kurzbz);
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$this->vorlage_kurzbz = $row->vorlage_kurzbz;
|
||||
$this->bezeichnung = $row->bezeichnung;
|
||||
$this->anmerkung = $row->anmerkung;
|
||||
$this->mimetype = $row->mimetype;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Eintrag wurde nicht gefunden';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Speichert eine Vorlage
|
||||
* Wenn $new auf true gesetzt ist wird ein neuer Datensatz
|
||||
* angelegt, ansonsten der Datensatz upgedated
|
||||
* @return true wenn erfolgreich, false im Fehlerfall
|
||||
*/
|
||||
public function saveVorlage($new=null)
|
||||
{
|
||||
if(is_null($new))
|
||||
$new = $this->new;
|
||||
|
||||
if($new)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_vorlage(vorlage_kurzbz, bezeichnung, anmerkung, mimetype) VALUES(".
|
||||
$this->db_add_param($this->vorlage_kurzbz).','.
|
||||
$this->db_add_param($this->bezeichnung).','.
|
||||
$this->db_add_param($this->anmerkung).','.
|
||||
$this->db_add_param($this->mimetype).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry = 'UPDATE public.tbl_vorlage
|
||||
SET bezeichnung='.$this->db_add_param($this->bezeichnung).',
|
||||
anmerkung='.$this->db_add_param($this->anmerkung).',
|
||||
mimetype='.$this->db_add_param($this->mimetype).'
|
||||
WHERE vorlage_kurzbz='.$this->db_add_param($this->vorlage_kurzbz).';';
|
||||
}
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Speichern: '.$this->db_last_error();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert alle Vorlagen
|
||||
* @param $order Sortierreihenfolge. Default:vorlage_kurzbz
|
||||
*/
|
||||
public function getAllVorlagen($order='vorlage_kurzbz')
|
||||
{
|
||||
$qry ="SELECT * FROM public.tbl_vorlage ORDER BY ".$order.";";
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$obj = new vorlage();
|
||||
$obj->vorlage_kurzbz = $row->vorlage_kurzbz;
|
||||
$obj->bezeichnung = $row->bezeichnung;
|
||||
$obj->anmerkung = $row->anmerkung;
|
||||
$obj->mimetype = $row->mimetype;
|
||||
|
||||
$this->result[]= $obj;
|
||||
}
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt die Vorlage zu einer OE
|
||||
* @param $vorlage_kurzbz
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function loadVorlageOE($vorlagestudiengang_id)
|
||||
{
|
||||
$qry = "SELECT * FROM public.tbl_vorlagestudiengang WHERE vorlagestudiengang_id=".$this->db_add_param($vorlagestudiengang_id);
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$this->vorlagestudiengang_id = $row->vorlagestudiengang_id;
|
||||
$this->vorlage_kurzbz = $row->vorlage_kurzbz;
|
||||
$this->studiengang_kz = $row->studiengang_kz;
|
||||
$this->version = $row->version;
|
||||
$this->text = $row->text;
|
||||
$this->oe_kurzbz = $row->oe_kurzbz;
|
||||
$this->style = $row->style;
|
||||
$this->berechtigung = $row->berechtigung;
|
||||
$this->anmerkung_vorlagestudiengang = $row->anmerkung_vorlagestudiengang;
|
||||
$this->aktiv = $this->db_parse_bool($row->aktiv);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Eintrag wurde nicht gefunden';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt alle Versionen einer Vorlage
|
||||
* @param $vorlage_kurzbz
|
||||
* @param $oe_kurzbz Optional. Gibt nur die Vorlagen zu dieser OE aus.
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function getAllVersions($vorlage_kurzbz=null, $oe_kurzbz=null)
|
||||
{
|
||||
$qry = "SELECT
|
||||
*
|
||||
FROM
|
||||
public.tbl_vorlagestudiengang
|
||||
WHERE
|
||||
1=1";
|
||||
if(!is_null($vorlage_kurzbz) && $vorlage_kurzbz!='')
|
||||
{
|
||||
$qry.=" AND vorlage_kurzbz=".$this->db_add_param($vorlage_kurzbz);
|
||||
}
|
||||
if(!is_null($oe_kurzbz) && $oe_kurzbz!='')
|
||||
{
|
||||
$qry.=" AND oe_kurzbz=".$this->db_add_param($oe_kurzbz);
|
||||
}
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$obj = new vorlage();
|
||||
$obj->vorlagestudiengang_id = $row->vorlagestudiengang_id;
|
||||
$obj->vorlage_kurzbz = $row->vorlage_kurzbz;
|
||||
$obj->studiengang_kz = $row->studiengang_kz;
|
||||
$obj->version = $row->version;
|
||||
$obj->text = $row->text;
|
||||
$obj->oe_kurzbz = $row->oe_kurzbz;
|
||||
$obj->style = $row->style;
|
||||
$obj->berechtigung = $row->berechtigung;
|
||||
$obj->anmerkung_vorlagestudiengang = $row->anmerkung_vorlagestudiengang;
|
||||
$obj->aktiv = $this->db_parse_bool($row->aktiv);
|
||||
|
||||
$this->result[]= $obj;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert alle OEs, welche die $vorlage_kurzbz verwenden
|
||||
* @param $vorlage_kurzbz Kurzbezeichnung der Vorlage
|
||||
*/
|
||||
public function getOEsFromVorlage($vorlage_kurzbz=null)
|
||||
{
|
||||
$qry ="SELECT DISTINCT
|
||||
tbl_organisationseinheit.*
|
||||
FROM
|
||||
public.tbl_vorlagestudiengang
|
||||
JOIN
|
||||
public.tbl_organisationseinheit USING (oe_kurzbz)
|
||||
WHERE
|
||||
vorlage_kurzbz=".$this->db_add_param($vorlage_kurzbz)."
|
||||
ORDER BY oe_kurzbz";
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$obj = new vorlage();
|
||||
$obj->oe_kurzbz = $row->oe_kurzbz;
|
||||
$obj->oe_parent_kurzbz = $row->oe_parent_kurzbz;
|
||||
$obj->bezeichnung = $row->bezeichnung;
|
||||
$obj->organisationseinheittyp_kurzbz = $row->organisationseinheittyp_kurzbz;
|
||||
$obj->aktiv = $this->db_parse_bool($row->aktiv);
|
||||
$obj->mailverteiler = $this->db_parse_bool($row->mailverteiler);
|
||||
$obj->lehre = $this->db_parse_bool($row->lehre);
|
||||
|
||||
$this->result[]= $obj;
|
||||
}
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Speichert die Vorlage zu einer OE
|
||||
* Wenn $new auf true gesetzt ist wird ein neuer Datensatz
|
||||
* angelegt, ansonsten der Datensatz upgedated
|
||||
* @return true wenn erfolgreich, false im Fehlerfall
|
||||
*/
|
||||
public function saveVorlageOE($new=null)
|
||||
{
|
||||
if($new == null)
|
||||
$new = $this->new;
|
||||
|
||||
if($new)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_vorlagestudiengang(vorlage_kurzbz,studiengang_kz,version,text,oe_kurzbz,style,berechtigung,anmerkung_vorlagestudiengang,aktiv) VALUES(".
|
||||
$this->db_add_param($this->vorlage_kurzbz).','.
|
||||
$this->db_add_param($this->studiengang_kz).','.
|
||||
$this->db_add_param($this->version).','.
|
||||
$this->db_add_param($this->text).','.
|
||||
$this->db_add_param($this->oe_kurzbz).','.
|
||||
$this->db_add_param($this->style).','.
|
||||
$this->db_add_param($this->berechtigung).','.
|
||||
$this->db_add_param($this->anmerkung_vorlagestudiengang).','.
|
||||
$this->db_add_param($this->aktiv, FHC_BOOLEAN).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry = 'UPDATE public.tbl_vorlagestudiengang
|
||||
SET vorlage_kurzbz='.$this->db_add_param($this->vorlage_kurzbz).',
|
||||
studiengang_kz='.$this->db_add_param($this->studiengang_kz).',
|
||||
version='.$this->db_add_param($this->version).',
|
||||
text='.$this->db_add_param($this->text).',
|
||||
oe_kurzbz='.$this->db_add_param($this->oe_kurzbz).',
|
||||
style='.$this->db_add_param($this->style).',
|
||||
berechtigung='.$this->db_add_param($this->berechtigung).',
|
||||
aktiv='.$this->db_add_param($this->aktiv, FHC_BOOLEAN).',
|
||||
anmerkung_vorlagestudiengang='.$this->db_add_param($this->anmerkung_vorlagestudiengang).'
|
||||
WHERE vorlagestudiengang_id='.$this->db_add_param($this->vorlagestudiengang_id).';';
|
||||
}
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Speichern: '.$this->db_last_error();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Löscht die Vorlagestudiengagn
|
||||
* @param type $vorlagestudiengang_id ID der Vorlage
|
||||
*/
|
||||
public function deleteVorlagestudiengang($vorlagestudiengang_id)
|
||||
{
|
||||
$qry = 'DELETE FROM public.tbl_vorlagestudiengang WHERE vorlagestudiengang_id='.$this->db_add_param($vorlagestudiengang_id).';';
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Vorlage konnte nicht gelöscht werden';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert die hoechste Version der Vorlage
|
||||
*
|
||||
* @param $oe_kurzbz Organisationseinheit der Vorlage
|
||||
* @param $vorlage_kurzbz Name der Vorlage
|
||||
*/
|
||||
public function getMaxVersion($oe_kurzbz, $vorlage_kurzbz)
|
||||
{
|
||||
$qry = "SELECT
|
||||
max(version) maxversion
|
||||
FROM
|
||||
public.tbl_vorlagestudiengang
|
||||
WHERE
|
||||
vorlage_kurzbz=".$this->db_add_param($vorlage_kurzbz)."
|
||||
AND
|
||||
oe_kurzbz=".$this->db_add_param($oe_kurzbz);
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object($result))
|
||||
return $row->maxversion;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg='Fehler beim Ermitteln der hoechsten Version';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Liefert die aktuelle Vorlage
|
||||
*
|
||||
*
|
||||
* @param $oe_kurzbz Organisationseinheit der Vorlage
|
||||
* Fuer Kompatibilitaetszwecke kann hier statt der oe_kurzbz auch die Studiengangskennzahl uebergeben werden.
|
||||
* In diesem Fall wird ein load der OE des Studiengangs durchgef�hrt und die entsprechende OE verwendet.
|
||||
* @param string $vorlage_kurzbz Name der Vorlage
|
||||
* @param integer $version optional kann die Versionsnummer der Vorlage uebergeben werden
|
||||
* @param boolean $aktiv default:true. Optional. Wenn false: werden nur inaktive Vorlagen geladen. Wenn null, werden alle Vorlagen geladen.
|
||||
* @return boolean
|
||||
*/
|
||||
public function getAktuelleVorlage($oe_kurzbz, $vorlage_kurzbz, $version=null, $aktiv=true)
|
||||
{
|
||||
$studiengang_kz='';
|
||||
if(is_numeric($oe_kurzbz))
|
||||
{
|
||||
$studiengang = new studiengang();
|
||||
$studiengang->load($oe_kurzbz);
|
||||
$oe_kurzbz=$studiengang->oe_kurzbz;
|
||||
//Durch diese Bedingung wird die Abfrage der studiengang_kz im folgenden Abschnitt hinfaellig.
|
||||
}
|
||||
|
||||
if($studiengang_kz!='') // Es sollte aktuell keine Vorlage mehr ueber die Studiengang_kz aufgerufen werden, da hier kein Fallback der OE erfolgt. Fuer Testzwecke bleibt das noch bestehen. Kindlm 11.09.2015
|
||||
{
|
||||
$qry = "SELECT
|
||||
tbl_vorlagestudiengang.*, tbl_vorlage.mimetype, tbl_vorlage.bezeichnung
|
||||
FROM
|
||||
public.tbl_vorlagestudiengang
|
||||
JOIN public.tbl_vorlage USING(vorlage_kurzbz)
|
||||
WHERE
|
||||
(studiengang_kz=0 OR studiengang_kz=".$this->db_add_param($studiengang_kz, FHC_INTEGER).") AND
|
||||
vorlage_kurzbz=".$this->db_add_param($vorlage_kurzbz);
|
||||
if(!is_null($version) && $version!='')
|
||||
{
|
||||
$qry.=" AND version=".$this->db_add_param($version, FHC_INTEGER);
|
||||
}
|
||||
if(!is_null($aktiv) && $aktiv!='')
|
||||
{
|
||||
$qry.=" AND aktiv=".$this->db_add_param($aktiv, FHC_BOOLEAN);
|
||||
}
|
||||
if($studiengang_kz<0) //Damit bei negativer studiengang_kz richtiges Ergebnis kommt
|
||||
{
|
||||
$qry .=" ORDER BY studiengang_kz ASC, version DESC LIMIT 1;";
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry .=" ORDER BY studiengang_kz DESC, version DESC LIMIT 1;";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry = "SELECT
|
||||
tbl_vorlagestudiengang.*, tbl_vorlage.mimetype, tbl_vorlage.bezeichnung
|
||||
FROM
|
||||
public.tbl_vorlagestudiengang
|
||||
JOIN public.tbl_vorlage USING(vorlage_kurzbz)
|
||||
WHERE oe_kurzbz=".$this->db_add_param($oe_kurzbz)."
|
||||
AND vorlage_kurzbz=".$this->db_add_param($vorlage_kurzbz);
|
||||
if(!is_null($version) && $version!='')
|
||||
{
|
||||
$qry.=" AND version=".$this->db_add_param($version, FHC_INTEGER);
|
||||
}
|
||||
if(!is_null($aktiv) && $aktiv!='')
|
||||
{
|
||||
$qry.=" AND aktiv=".$this->db_add_param($aktiv, FHC_BOOLEAN);
|
||||
}
|
||||
$qry.=" ORDER BY version DESC LIMIT 1";
|
||||
}
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->vorlage_kurzbz = $row->vorlage_kurzbz;
|
||||
$this->studiengang_kz = $row->studiengang_kz;
|
||||
$this->version = $row->version;
|
||||
$this->text = $row->text;
|
||||
$this->mimetype = $row->mimetype;
|
||||
$this->bezeichnung = $row->bezeichnung;
|
||||
$this->style = $row->style;
|
||||
$this->berechtigung = $this->db_parse_array($row->berechtigung);
|
||||
$this->anmerkung_vorlagestudiengang = $row->anmerkung_vorlagestudiengang;
|
||||
$this->aktiv = $this->db_parse_bool($row->aktiv);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if($studiengang_kz!='')
|
||||
{
|
||||
$this->errormsg = 'Keine Vorlage gefunden';
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Wenn keine Vorlage zu dieser Organisationseinheit gefunden wurde,
|
||||
//nachsehen ob fuer eine der uebergeordneten OEs eine Vorlage vorhanden ist.
|
||||
$oe = new organisationseinheit();
|
||||
$oe->load($oe_kurzbz);
|
||||
|
||||
if($oe->oe_parent_kurzbz!='')
|
||||
{
|
||||
return $this->getAktuelleVorlage($oe->oe_parent_kurzbz, $vorlage_kurzbz, $version, $aktiv);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Keine Vorlage gefunden';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Vorlage';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/* Copyright (C) 2007 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
*/
|
||||
/**
|
||||
* Verwaltet die Vorlagen fuer die Dokumentenerstellung
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
require_once(dirname(__FILE__).'/organisationseinheit.class.php');
|
||||
|
||||
class vorlage extends basis_db
|
||||
{
|
||||
// ErgebnisArray
|
||||
public $result=array();
|
||||
public $num_rows=0;
|
||||
public $errormsg;
|
||||
public $new;
|
||||
|
||||
//Tabellenspalten
|
||||
public $vorlage_kurzbz; // varchar(16)
|
||||
public $studiengang_kz; // integer
|
||||
public $version; // smallint
|
||||
public $text; // text
|
||||
public $mimetype; // varchar(64)
|
||||
public $bezeichnung; // varchar(64)
|
||||
public $anmerkung; // text
|
||||
public $style; // text
|
||||
public $berechtigung; // varchar(32)[]
|
||||
public $oe_kurzbz; // varchar(32)
|
||||
public $vorlagestudiengang_id; // bigint
|
||||
public $anmerkung_vorlagestudiengang; // text
|
||||
public $aktiv; // boolean
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt eine Vorlage
|
||||
* @param $vorlage_kurzbz
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function loadVorlage($vorlage_kurzbz)
|
||||
{
|
||||
$qry = "SELECT * FROM public.tbl_vorlage WHERE vorlage_kurzbz=".$this->db_add_param($vorlage_kurzbz);
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$this->vorlage_kurzbz = $row->vorlage_kurzbz;
|
||||
$this->bezeichnung = $row->bezeichnung;
|
||||
$this->anmerkung = $row->anmerkung;
|
||||
$this->mimetype = $row->mimetype;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Eintrag wurde nicht gefunden';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Speichert eine Vorlage
|
||||
* Wenn $new auf true gesetzt ist wird ein neuer Datensatz
|
||||
* angelegt, ansonsten der Datensatz upgedated
|
||||
* @return true wenn erfolgreich, false im Fehlerfall
|
||||
*/
|
||||
public function saveVorlage($new=null)
|
||||
{
|
||||
if(is_null($new))
|
||||
$new = $this->new;
|
||||
|
||||
if($new)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_vorlage(vorlage_kurzbz, bezeichnung, anmerkung, mimetype) VALUES(".
|
||||
$this->db_add_param($this->vorlage_kurzbz).','.
|
||||
$this->db_add_param($this->bezeichnung).','.
|
||||
$this->db_add_param($this->anmerkung).','.
|
||||
$this->db_add_param($this->mimetype).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry = 'UPDATE public.tbl_vorlage
|
||||
SET bezeichnung='.$this->db_add_param($this->bezeichnung).',
|
||||
anmerkung='.$this->db_add_param($this->anmerkung).',
|
||||
mimetype='.$this->db_add_param($this->mimetype).'
|
||||
WHERE vorlage_kurzbz='.$this->db_add_param($this->vorlage_kurzbz).';';
|
||||
}
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Speichern: '.$this->db_last_error();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert alle Vorlagen
|
||||
* @param $order Sortierreihenfolge. Default:vorlage_kurzbz
|
||||
*/
|
||||
public function getAllVorlagen($order='vorlage_kurzbz')
|
||||
{
|
||||
$qry ="SELECT * FROM public.tbl_vorlage ORDER BY ".$order.";";
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$obj = new vorlage();
|
||||
$obj->vorlage_kurzbz = $row->vorlage_kurzbz;
|
||||
$obj->bezeichnung = $row->bezeichnung;
|
||||
$obj->anmerkung = $row->anmerkung;
|
||||
$obj->mimetype = $row->mimetype;
|
||||
|
||||
$this->result[]= $obj;
|
||||
}
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt die Vorlage zu einer OE
|
||||
* @param $vorlage_kurzbz
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function loadVorlageOE($vorlagestudiengang_id)
|
||||
{
|
||||
$qry = "SELECT * FROM public.tbl_vorlagestudiengang WHERE vorlagestudiengang_id=".$this->db_add_param($vorlagestudiengang_id);
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$this->vorlagestudiengang_id = $row->vorlagestudiengang_id;
|
||||
$this->vorlage_kurzbz = $row->vorlage_kurzbz;
|
||||
$this->studiengang_kz = $row->studiengang_kz;
|
||||
$this->version = $row->version;
|
||||
$this->text = $row->text;
|
||||
$this->oe_kurzbz = $row->oe_kurzbz;
|
||||
$this->style = $row->style;
|
||||
$this->berechtigung = $row->berechtigung;
|
||||
$this->anmerkung_vorlagestudiengang = $row->anmerkung_vorlagestudiengang;
|
||||
$this->aktiv = $this->db_parse_bool($row->aktiv);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Eintrag wurde nicht gefunden';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt alle Versionen einer Vorlage
|
||||
* @param $vorlage_kurzbz
|
||||
* @param $oe_kurzbz Optional. Gibt nur die Vorlagen zu dieser OE aus.
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function getAllVersions($vorlage_kurzbz=null, $oe_kurzbz=null)
|
||||
{
|
||||
$qry = "SELECT
|
||||
*
|
||||
FROM
|
||||
public.tbl_vorlagestudiengang
|
||||
WHERE
|
||||
1=1";
|
||||
if(!is_null($vorlage_kurzbz) && $vorlage_kurzbz!='')
|
||||
{
|
||||
$qry.=" AND vorlage_kurzbz=".$this->db_add_param($vorlage_kurzbz);
|
||||
}
|
||||
if(!is_null($oe_kurzbz) && $oe_kurzbz!='')
|
||||
{
|
||||
$qry.=" AND oe_kurzbz=".$this->db_add_param($oe_kurzbz);
|
||||
}
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$obj = new vorlage();
|
||||
$obj->vorlagestudiengang_id = $row->vorlagestudiengang_id;
|
||||
$obj->vorlage_kurzbz = $row->vorlage_kurzbz;
|
||||
$obj->studiengang_kz = $row->studiengang_kz;
|
||||
$obj->version = $row->version;
|
||||
$obj->text = $row->text;
|
||||
$obj->oe_kurzbz = $row->oe_kurzbz;
|
||||
$obj->style = $row->style;
|
||||
$obj->berechtigung = $row->berechtigung;
|
||||
$obj->anmerkung_vorlagestudiengang = $row->anmerkung_vorlagestudiengang;
|
||||
$obj->aktiv = $this->db_parse_bool($row->aktiv);
|
||||
|
||||
$this->result[]= $obj;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert alle OEs, welche die $vorlage_kurzbz verwenden
|
||||
* @param $vorlage_kurzbz Kurzbezeichnung der Vorlage
|
||||
*/
|
||||
public function getOEsFromVorlage($vorlage_kurzbz=null)
|
||||
{
|
||||
$qry ="SELECT DISTINCT
|
||||
tbl_organisationseinheit.*
|
||||
FROM
|
||||
public.tbl_vorlagestudiengang
|
||||
JOIN
|
||||
public.tbl_organisationseinheit USING (oe_kurzbz)
|
||||
WHERE
|
||||
vorlage_kurzbz=".$this->db_add_param($vorlage_kurzbz)."
|
||||
ORDER BY oe_kurzbz";
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$obj = new vorlage();
|
||||
$obj->oe_kurzbz = $row->oe_kurzbz;
|
||||
$obj->oe_parent_kurzbz = $row->oe_parent_kurzbz;
|
||||
$obj->bezeichnung = $row->bezeichnung;
|
||||
$obj->organisationseinheittyp_kurzbz = $row->organisationseinheittyp_kurzbz;
|
||||
$obj->aktiv = $this->db_parse_bool($row->aktiv);
|
||||
$obj->mailverteiler = $this->db_parse_bool($row->mailverteiler);
|
||||
$obj->lehre = $this->db_parse_bool($row->lehre);
|
||||
|
||||
$this->result[]= $obj;
|
||||
}
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Speichert die Vorlage zu einer OE
|
||||
* Wenn $new auf true gesetzt ist wird ein neuer Datensatz
|
||||
* angelegt, ansonsten der Datensatz upgedated
|
||||
* @return true wenn erfolgreich, false im Fehlerfall
|
||||
*/
|
||||
public function saveVorlageOE($new=null)
|
||||
{
|
||||
if($new == null)
|
||||
$new = $this->new;
|
||||
|
||||
if($new)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_vorlagestudiengang(vorlage_kurzbz,studiengang_kz,version,text,oe_kurzbz,style,berechtigung,anmerkung_vorlagestudiengang,aktiv) VALUES(".
|
||||
$this->db_add_param($this->vorlage_kurzbz).','.
|
||||
$this->db_add_param($this->studiengang_kz).','.
|
||||
$this->db_add_param($this->version).','.
|
||||
$this->db_add_param($this->text).','.
|
||||
$this->db_add_param($this->oe_kurzbz).','.
|
||||
$this->db_add_param($this->style).','.
|
||||
$this->db_add_param($this->berechtigung).','.
|
||||
$this->db_add_param($this->anmerkung_vorlagestudiengang).','.
|
||||
$this->db_add_param($this->aktiv, FHC_BOOLEAN).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry = 'UPDATE public.tbl_vorlagestudiengang
|
||||
SET vorlage_kurzbz='.$this->db_add_param($this->vorlage_kurzbz).',
|
||||
studiengang_kz='.$this->db_add_param($this->studiengang_kz).',
|
||||
version='.$this->db_add_param($this->version).',
|
||||
text='.$this->db_add_param($this->text).',
|
||||
oe_kurzbz='.$this->db_add_param($this->oe_kurzbz).',
|
||||
style='.$this->db_add_param($this->style).',
|
||||
berechtigung='.$this->db_add_param($this->berechtigung).',
|
||||
aktiv='.$this->db_add_param($this->aktiv, FHC_BOOLEAN).',
|
||||
anmerkung_vorlagestudiengang='.$this->db_add_param($this->anmerkung_vorlagestudiengang).'
|
||||
WHERE vorlagestudiengang_id='.$this->db_add_param($this->vorlagestudiengang_id).';';
|
||||
}
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Speichern: '.$this->db_last_error();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Löscht die Vorlagestudiengagn
|
||||
* @param type $vorlagestudiengang_id ID der Vorlage
|
||||
*/
|
||||
public function deleteVorlagestudiengang($vorlagestudiengang_id)
|
||||
{
|
||||
$qry = 'DELETE FROM public.tbl_vorlagestudiengang WHERE vorlagestudiengang_id='.$this->db_add_param($vorlagestudiengang_id).';';
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Vorlage konnte nicht gelöscht werden';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert die hoechste Version der Vorlage
|
||||
*
|
||||
* @param $oe_kurzbz Organisationseinheit der Vorlage
|
||||
* @param $vorlage_kurzbz Name der Vorlage
|
||||
*/
|
||||
public function getMaxVersion($oe_kurzbz, $vorlage_kurzbz)
|
||||
{
|
||||
$qry = "SELECT
|
||||
max(version) maxversion
|
||||
FROM
|
||||
public.tbl_vorlagestudiengang
|
||||
WHERE
|
||||
vorlage_kurzbz=".$this->db_add_param($vorlage_kurzbz)."
|
||||
AND
|
||||
oe_kurzbz=".$this->db_add_param($oe_kurzbz);
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object($result))
|
||||
return $row->maxversion;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg='Fehler beim Ermitteln der hoechsten Version';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Liefert die aktuelle Vorlage
|
||||
*
|
||||
*
|
||||
* @param $oe_kurzbz Organisationseinheit der Vorlage
|
||||
* Fuer Kompatibilitaetszwecke kann hier statt der oe_kurzbz auch die Studiengangskennzahl uebergeben werden.
|
||||
* In diesem Fall wird ein load der OE des Studiengangs durchgef�hrt und die entsprechende OE verwendet.
|
||||
* @param string $vorlage_kurzbz Name der Vorlage
|
||||
* @param integer $version optional kann die Versionsnummer der Vorlage uebergeben werden
|
||||
* @param boolean $aktiv default:true. Optional. Wenn false: werden nur inaktive Vorlagen geladen. Wenn null, werden alle Vorlagen geladen.
|
||||
* @return boolean
|
||||
*/
|
||||
public function getAktuelleVorlage($oe_kurzbz, $vorlage_kurzbz, $version=null, $aktiv=true)
|
||||
{
|
||||
$studiengang_kz='';
|
||||
if(is_numeric($oe_kurzbz))
|
||||
{
|
||||
$studiengang = new studiengang();
|
||||
$studiengang->load($oe_kurzbz);
|
||||
$oe_kurzbz=$studiengang->oe_kurzbz;
|
||||
//Durch diese Bedingung wird die Abfrage der studiengang_kz im folgenden Abschnitt hinfaellig.
|
||||
}
|
||||
|
||||
if($studiengang_kz!='') // Es sollte aktuell keine Vorlage mehr ueber die Studiengang_kz aufgerufen werden, da hier kein Fallback der OE erfolgt. Fuer Testzwecke bleibt das noch bestehen. Kindlm 11.09.2015
|
||||
{
|
||||
$qry = "SELECT
|
||||
tbl_vorlagestudiengang.*, tbl_vorlage.mimetype, tbl_vorlage.bezeichnung
|
||||
FROM
|
||||
public.tbl_vorlagestudiengang
|
||||
JOIN public.tbl_vorlage USING(vorlage_kurzbz)
|
||||
WHERE
|
||||
(studiengang_kz=0 OR studiengang_kz=".$this->db_add_param($studiengang_kz, FHC_INTEGER).") AND
|
||||
vorlage_kurzbz=".$this->db_add_param($vorlage_kurzbz);
|
||||
if(!is_null($version) && $version!='')
|
||||
{
|
||||
$qry.=" AND version=".$this->db_add_param($version, FHC_INTEGER);
|
||||
}
|
||||
if(!is_null($aktiv) && $aktiv!='')
|
||||
{
|
||||
$qry.=" AND aktiv=".$this->db_add_param($aktiv, FHC_BOOLEAN);
|
||||
}
|
||||
if($studiengang_kz<0) //Damit bei negativer studiengang_kz richtiges Ergebnis kommt
|
||||
{
|
||||
$qry .=" ORDER BY studiengang_kz ASC, version DESC LIMIT 1;";
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry .=" ORDER BY studiengang_kz DESC, version DESC LIMIT 1;";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry = "SELECT
|
||||
tbl_vorlagestudiengang.*, tbl_vorlage.mimetype, tbl_vorlage.bezeichnung
|
||||
FROM
|
||||
public.tbl_vorlagestudiengang
|
||||
JOIN public.tbl_vorlage USING(vorlage_kurzbz)
|
||||
WHERE oe_kurzbz=".$this->db_add_param($oe_kurzbz)."
|
||||
AND vorlage_kurzbz=".$this->db_add_param($vorlage_kurzbz);
|
||||
if(!is_null($version) && $version!='')
|
||||
{
|
||||
$qry.=" AND version=".$this->db_add_param($version, FHC_INTEGER);
|
||||
}
|
||||
if(!is_null($aktiv) && $aktiv!='')
|
||||
{
|
||||
$qry.=" AND aktiv=".$this->db_add_param($aktiv, FHC_BOOLEAN);
|
||||
}
|
||||
$qry.=" ORDER BY version DESC LIMIT 1";
|
||||
}
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->vorlage_kurzbz = $row->vorlage_kurzbz;
|
||||
$this->studiengang_kz = $row->studiengang_kz;
|
||||
$this->version = $row->version;
|
||||
$this->text = $row->text;
|
||||
$this->mimetype = $row->mimetype;
|
||||
$this->bezeichnung = $row->bezeichnung;
|
||||
$this->style = $row->style;
|
||||
$this->berechtigung = $this->db_parse_array($row->berechtigung);
|
||||
$this->anmerkung_vorlagestudiengang = $row->anmerkung_vorlagestudiengang;
|
||||
$this->aktiv = $this->db_parse_bool($row->aktiv);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if($studiengang_kz!='')
|
||||
{
|
||||
$this->errormsg = 'Keine Vorlage gefunden';
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Wenn keine Vorlage zu dieser Organisationseinheit gefunden wurde,
|
||||
//nachsehen ob fuer eine der uebergeordneten OEs eine Vorlage vorhanden ist.
|
||||
$oe = new organisationseinheit();
|
||||
$oe->load($oe_kurzbz);
|
||||
|
||||
if($oe->oe_parent_kurzbz!='')
|
||||
{
|
||||
return $this->getAktuelleVorlage($oe->oe_parent_kurzbz, $vorlage_kurzbz, $version, $aktiv);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Keine Vorlage gefunden';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Vorlage';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -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
@@ -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>';
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
@@ -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();
|
||||
@@ -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();
|
||||
@@ -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();
|
||||
@@ -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();
|
||||
@@ -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();
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user