Merge branch 'feature-3994/Digitaler_Lehrauftrag' of https://github.com/FH-Complete/FHC-Core into feature-3994/Digitaler_Lehrauftrag

This commit is contained in:
hainberg
2019-11-12 16:21:38 +01:00
4 changed files with 115 additions and 49 deletions
+52 -45
View File
@@ -51,16 +51,16 @@ $config['navigation_header'] = array(
'sort' => 30,
'requiredPermissions' => 'infocenter:r'
),
'lehrauftrag' => array(
'link' => site_url('lehre/lehrauftrag/Lehrauftrag'),
'description' => 'Lehrauftrag',
'expand' => true,
'sort' => 40,
'requiredPermissions' => array(
'lehre/lehrauftrag_bestellen:r',
'lehre/lehrauftrag_erteilen:r'
)
)
'lehrauftrag' => array(
'link' => site_url('lehre/lehrauftrag/Lehrauftrag/Dashboard'),
'description' => 'Lehrauftrag',
'expand' => true,
'sort' => 40,
'requiredPermissions' => array(
'lehre/lehrauftrag_bestellen:r',
'lehre/lehrauftrag_erteilen:r'
)
)
)
),
'Personen' => array(
@@ -136,40 +136,47 @@ $config['navigation_menu']['organisation/Reihungstest/index'] = array(
)
);
$config['navigation_menu']['lehre/lehrauftrag/Lehrauftrag/index'] = array(
'lehrauftragBestellen' => array(
'link' => site_url('lehre/lehrauftrag/Lehrauftrag'),
'description' => 'Lehrauftrag bestellen',
'icon' => '',
'sort' => 1,
'requiredPermissions' => 'lehre/lehrauftrag_bestellen:r',
'target' => '_self'
),
'lehrauftragErteilen' => array(
'link' => site_url('lehre/lehrauftrag/LehrauftragErteilen'),
'description' => 'Lehrauftrag erteilen',
'icon' => '',
'sort' => 1,
'requiredPermissions' => 'lehre/lehrauftrag_erteilen:r',
'target' => '_self'
)
$config['navigation_menu']['lehre/lehrauftrag/Lehrauftrag/*'] = array(
'lehrauftragDashboard' => array(
'link' => site_url('lehre/lehrauftrag/Lehrauftrag/Dashboard'),
'description' => 'Dashboard',
'icon' => 'dashboard',
'sort' => 1,
'requiredPermissions' => array('lehre/lehrauftrag_bestellen:r','lehre/lehrauftrag_erteilen:r')
),'lehrauftragBestellen' => array(
'link' => site_url('lehre/lehrauftrag/Lehrauftrag'),
'description' => 'Lehrauftrag bestellen',
'icon' => '',
'sort' => 1,
'requiredPermissions' => 'lehre/lehrauftrag_bestellen:r'
),
'lehrauftragErteilen' => array(
'link' => site_url('lehre/lehrauftrag/LehrauftragErteilen'),
'description' => 'Lehrauftrag erteilen',
'icon' => '',
'sort' => 1,
'requiredPermissions' => 'lehre/lehrauftrag_erteilen:r'
)
);
$config['navigation_menu']['lehre/lehrauftrag/LehrauftragErteilen/index'] = array(
'lehrauftragBestellen' => array(
'link' => site_url('lehre/lehrauftrag/Lehrauftrag'),
'description' => 'Lehrauftrag bestellen',
'icon' => '',
'sort' => 1,
'requiredPermissions' => 'lehre/lehrauftrag_bestellen:r',
'target' => '_self'
),
'lehrauftragErteilen' => array(
'link' => site_url('lehre/lehrauftrag/LehrauftragErteilen'),
'description' => 'Lehrauftrag erteilen',
'icon' => '',
'sort' => 1,
'requiredPermissions' => 'lehre/lehrauftrag_erteilen:r',
'target' => '_self'
)
$config['navigation_menu']['lehre/lehrauftrag/LehrauftragErteilen/*'] = array(
'lehrauftragDashboard' => array(
'link' => site_url('lehre/lehrauftrag/Lehrauftrag/Dashboard'),
'description' => 'Dashboard',
'icon' => 'dashboard',
'sort' => 1,
'requiredPermissions' => array('lehre/lehrauftrag_bestellen:r','lehre/lehrauftrag_erteilen:r')
),'lehrauftragBestellen' => array(
'link' => site_url('lehre/lehrauftrag/Lehrauftrag'),
'description' => 'Lehrauftrag bestellen',
'icon' => '',
'sort' => 1,
'requiredPermissions' => 'lehre/lehrauftrag_bestellen:r'
),
'lehrauftragErteilen' => array(
'link' => site_url('lehre/lehrauftrag/LehrauftragErteilen'),
'description' => 'Lehrauftrag erteilen',
'icon' => '',
'sort' => 1,
'requiredPermissions' => 'lehre/lehrauftrag_erteilen:r'
)
);
@@ -26,6 +26,7 @@ class Lehrauftrag extends Auth_Controller
array(
'index' => 'lehre/lehrauftrag_bestellen:r',
'orderLehrauftrag' => 'lehre/lehrauftrag_bestellen:rw',
'Dashboard' => array('lehre/lehrauftrag_bestellen:r', 'lehre/lehrauftrag_erteilen:rw')
)
);
@@ -59,6 +60,15 @@ class Lehrauftrag extends Auth_Controller
$this->setControllerId(); // sets the controller id
}
/**
* Display of Custom Dashboard for Lehraufträge App
* Charts are hooked from Reporting Addon
*/
public function Dashboard()
{
$this->load->view('lehre/lehrauftrag/Dashboard.php');
}
// -----------------------------------------------------------------------------------------------------------------
// Public methods
/**
@@ -0,0 +1,38 @@
<?php
$this->load->view(
'templates/FHC-Header',
array(
'title' => 'Lehrauftrag bestellen',
'jquery' => true,
'jqueryui' => true,
'bootstrap' => true,
'fontawesome' => true,
'sbadmintemplate' => true,
'ajaxlib' => true,
'dialoglib' => true,
'navigationwidget' => true,
'addons' => true,
)
);
?>
<body>
<?php echo $this->widgetlib->widget('NavigationWidget'); ?>
<div id="page-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h3 class="page-header">
Lehrauftrag
</h3>
</div>
</div>
<div id="dashboard"></div>
</div>
</div>
</body>
<?php $this->load->view('templates/FHC-Footer'); ?>
+15 -4
View File
@@ -514,6 +514,13 @@ class statistik extends basis_db
if($this->sql!='')
{
$sql = $this->sql;
// Wenn im SQL ein $user vorkommt wird das durch den eingeloggten User ersetzt
if(strpos($sql, '$user')!==false)
{
$uid = get_uid();
$sql = str_replace('$user',$this->db_add_param($uid),$sql);
}
foreach($_REQUEST as $name=>$value)
{
if (is_array($value))
@@ -615,11 +622,15 @@ class statistik extends basis_db
$check = '/\$[0-9A-z]+/';
preg_match_all($check, $value, $result);
$result = $result[0];
$vars = array();
for($i=0;$i<count($result);$i++)
{
$result[$i] = mb_str_replace('$','',$result[$i]);
// $user wird automatisch ersetzt und daher auch nicht geliefert
if($result[$i]!='$user')
{
$vars[$i] = mb_str_replace('$','',$result[$i]);
}
}
return array_unique($result);
return array_unique($vars);
}
}
}