mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 09:52:22 +00:00
Now the helper message is loaded only by these controllers and models:
- APIv1_Controller - FHC_Controller - MessageToken_model
This commit is contained in:
@@ -16,9 +16,6 @@ class Phrases extends FHC_Controller
|
||||
|
||||
// Loads the widget library
|
||||
$this->load->library('WidgetLib');
|
||||
|
||||
// Loads helper message to manage returning messages
|
||||
$this->load->helper('message');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,14 +7,11 @@ class PrestudentMultiAssign extends VileSci_Controller
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Loads helper message to manage returning messages
|
||||
$this->load->helper('message');
|
||||
|
||||
|
||||
// Loads the widget library
|
||||
$this->load->library('WidgetLib');
|
||||
}
|
||||
|
||||
|
||||
public function index()
|
||||
{
|
||||
$studiengang = $this->input->post('studiengang');
|
||||
@@ -22,27 +19,27 @@ class PrestudentMultiAssign extends VileSci_Controller
|
||||
$aufnahmegruppe = $this->input->post('aufnahmegruppe');
|
||||
$reihungstest = $this->input->post('reihungstest');
|
||||
$stufe = $this->input->post('stufe');
|
||||
|
||||
|
||||
// Converts string 'null' to a null value
|
||||
$stufe = ($stufe == 'null' ? null : $stufe);
|
||||
$studiengang = ($studiengang == 'null' ? null : $studiengang);
|
||||
$reihungstest = ($reihungstest == 'null' ? null : $reihungstest);
|
||||
$aufnahmegruppe = ($aufnahmegruppe == 'null' ? null : $aufnahmegruppe);
|
||||
$studiensemester = ($studiensemester == 'null' ? null : $studiensemester);
|
||||
|
||||
|
||||
$returnUsers = null;
|
||||
if ($studiengang != null || $studiensemester != null || $aufnahmegruppe!= null
|
||||
|| $reihungstest != null || $stufe != null)
|
||||
{
|
||||
$returnUsers = $this->_getPrestudents($studiengang, $studiensemester, $aufnahmegruppe, $reihungstest, $stufe);
|
||||
}
|
||||
|
||||
|
||||
$users = null;
|
||||
if (hasData($returnUsers))
|
||||
{
|
||||
$users = $returnUsers->retval;
|
||||
}
|
||||
|
||||
|
||||
if ($returnUsers == null || isSuccess($returnUsers))
|
||||
{
|
||||
$viewData = array(
|
||||
@@ -53,7 +50,7 @@ class PrestudentMultiAssign extends VileSci_Controller
|
||||
'stufe' => $stufe,
|
||||
'users' => $users
|
||||
);
|
||||
|
||||
|
||||
$this->load->view('system/aufnahme/prestudentMultiAssign', $viewData);
|
||||
}
|
||||
else if (isError($returnUsers))
|
||||
@@ -61,7 +58,7 @@ class PrestudentMultiAssign extends VileSci_Controller
|
||||
show_error($returnUsers->retval);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* To assign a stufe to one or more prestudents
|
||||
*/
|
||||
@@ -69,16 +66,16 @@ class PrestudentMultiAssign extends VileSci_Controller
|
||||
{
|
||||
$prestudentIdArray = $this->input->post('prestudent_id');
|
||||
$stufe = $this->input->post('stufe');
|
||||
|
||||
|
||||
// Converts string 'null' to a null value
|
||||
$stufe = ($stufe == 'null' ? null : $stufe);
|
||||
|
||||
|
||||
// Load model PrestudentstatusModel
|
||||
$this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
|
||||
|
||||
|
||||
// Set the HTTP header
|
||||
$this->output->set_header('Content-Type: application/json; charset=utf-8');
|
||||
|
||||
|
||||
$result = error("No valid parameters");
|
||||
if (isset($stufe)
|
||||
&& isset($prestudentIdArray)
|
||||
@@ -86,7 +83,7 @@ class PrestudentMultiAssign extends VileSci_Controller
|
||||
&& count($prestudentIdArray) > 0)
|
||||
{
|
||||
$result = $this->PrestudentstatusModel->updateStufe($prestudentIdArray, $stufe);
|
||||
|
||||
|
||||
if (isSuccess($result))
|
||||
{
|
||||
echo '{"msg": "Data correctly saved"}';
|
||||
@@ -101,7 +98,7 @@ class PrestudentMultiAssign extends VileSci_Controller
|
||||
echo '{"msg": "'.$result->retval.'"}';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* To assign one or more prestudents to a gruppe
|
||||
*/
|
||||
@@ -109,16 +106,16 @@ class PrestudentMultiAssign extends VileSci_Controller
|
||||
{
|
||||
$prestudentIdArray = $this->input->post('prestudent_id');
|
||||
$aufnahmegruppe = $this->input->post('aufnahmegruppe');
|
||||
|
||||
|
||||
// Converts string 'null' to a null value
|
||||
$aufnahmegruppe = ($aufnahmegruppe == 'null' ? null : $aufnahmegruppe);
|
||||
|
||||
|
||||
// Load model PrestudentstatusModel
|
||||
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||
|
||||
|
||||
// Set the HTTP header
|
||||
$this->output->set_header('Content-Type: application/json; charset=utf-8');
|
||||
|
||||
|
||||
$result = error("No valid parameters");
|
||||
if (isset($aufnahmegruppe)
|
||||
&& isset($prestudentIdArray)
|
||||
@@ -126,7 +123,7 @@ class PrestudentMultiAssign extends VileSci_Controller
|
||||
&& count($prestudentIdArray) > 0)
|
||||
{
|
||||
$result = $this->PrestudentModel->updateAufnahmegruppe($prestudentIdArray, $aufnahmegruppe);
|
||||
|
||||
|
||||
if (isSuccess($result))
|
||||
{
|
||||
echo '{"msg": "Data correctly saved"}';
|
||||
@@ -141,7 +138,7 @@ class PrestudentMultiAssign extends VileSci_Controller
|
||||
echo '{"msg": "'.$result->retval.'"}';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the prestudents using search parameters
|
||||
*/
|
||||
@@ -149,32 +146,32 @@ class PrestudentMultiAssign extends VileSci_Controller
|
||||
{
|
||||
// Load model prestudentm_model
|
||||
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||
|
||||
|
||||
if ($studiengang == '' || empty($studiengang))
|
||||
{
|
||||
$studiengang = null;
|
||||
}
|
||||
|
||||
|
||||
if ($studiensemester == '' || empty($studiensemester))
|
||||
{
|
||||
$studiensemester = null;
|
||||
}
|
||||
|
||||
|
||||
if ($aufnahmegruppe == '' || empty($aufnahmegruppe))
|
||||
{
|
||||
$aufnahmegruppe = null;
|
||||
}
|
||||
|
||||
|
||||
if ($reihungstest == '' || empty($reihungstest))
|
||||
{
|
||||
$reihungstest = null;
|
||||
}
|
||||
|
||||
|
||||
if ($stufe == '' || empty($stufe))
|
||||
{
|
||||
$stufe = null;
|
||||
}
|
||||
|
||||
|
||||
return $this->PrestudentModel->getPrestudentMultiAssign(
|
||||
$studiengang,
|
||||
$studiensemester,
|
||||
@@ -183,4 +180,4 @@ class PrestudentMultiAssign extends VileSci_Controller
|
||||
$stufe
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user