mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 18:02:18 +00:00
Merge branch 'master' into cleanci
This commit is contained in:
@@ -11,12 +11,13 @@
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class AmpelMail extends FHC_Controller
|
||||
class AmpelMail extends CLI_Controller
|
||||
{
|
||||
private $CIS_AMPELVERWALTUNG_URL;
|
||||
const CIS_AMPELVERWALTUNG_URL = CIS_ROOT. "cis/index.php?menu=".
|
||||
CIS_ROOT. "cis/menu.php?content_id=&content=".
|
||||
CIS_ROOT. "cis/private/tools/ampelverwaltung.php";
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@@ -25,39 +26,12 @@ class AmpelMail extends FHC_Controller
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Allow script execution only from CLI
|
||||
if ($this->input->is_cli_request())
|
||||
{
|
||||
$cli = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->output->set_status_header(403, 'Jobs must be run from the CLI');
|
||||
echo "Jobs must be run from the CLI";
|
||||
exit;
|
||||
}
|
||||
$this->CIS_AMPELVERWALTUNG_URL = CIS_ROOT. "cis/index.php?menu=".
|
||||
CIS_ROOT. "cis/menu.php?content_id=&content=".
|
||||
CIS_ROOT. "cis/private/tools/ampelverwaltung.php";
|
||||
// Load helpers
|
||||
$this->load->helper('hlp_sancho');
|
||||
|
||||
// Load models
|
||||
$this->load->model('content/Ampel_model', 'AmpelModel');
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
|
||||
// Load helpers
|
||||
$this->load->helper('hlp_sancho');
|
||||
}
|
||||
|
||||
/**
|
||||
* Main function index as help
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$result = "The following are the available command line interface commands\n\n";
|
||||
$result .= "php index.ci.php jobs/AmpelMail generateAmpelMail";
|
||||
|
||||
echo $result. PHP_EOL;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -210,7 +184,7 @@ class AmpelMail extends FHC_Controller
|
||||
'uid' => $uid,
|
||||
'firstName' => $firstName,
|
||||
'ampel_list' => $html_text,
|
||||
'link' => $this->CIS_AMPELVERWALTUNG_URL
|
||||
'link' => self::CIS_AMPELVERWALTUNG_URL
|
||||
);
|
||||
}
|
||||
return $ampel_data_arr;
|
||||
|
||||
@@ -17,10 +17,9 @@
|
||||
*
|
||||
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>
|
||||
*/
|
||||
if (! defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class LVPlanJob extends FHC_Controller
|
||||
class LVPlanJob extends CLI_Controller
|
||||
{
|
||||
/**
|
||||
* Initialize LVPlanJob Class
|
||||
@@ -29,32 +28,7 @@ class LVPlanJob extends FHC_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// An empty array as parameter will ensure that this controller is ONLY callable from command line
|
||||
parent::__construct(array());
|
||||
|
||||
if ($this->input->is_cli_request())
|
||||
{
|
||||
$cli = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->output->set_status_header(403, 'Jobs must be run from the CLI');
|
||||
echo "Jobs must be run from the CLI";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Main function index as help
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$result = "The following are the available command line interface commands\n\n";
|
||||
$result .= "php ".$this->config->item('index_page')." jobs/LVPlanJob AddDirectGroups";
|
||||
|
||||
echo $result.PHP_EOL;
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,8 +7,7 @@ if (! defined('BASEPATH'))
|
||||
* Database Class
|
||||
*
|
||||
*/
|
||||
|
||||
class Prestudentstatus extends FHC_Controller
|
||||
class Prestudentstatus extends CLI_Controller
|
||||
{
|
||||
/**
|
||||
* Initialize Prestudentstatus Class
|
||||
@@ -17,32 +16,7 @@ class Prestudentstatus extends FHC_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// An empty array as parameter will ensure that this controller is ONLY callable from command line
|
||||
parent::__construct(array());
|
||||
|
||||
if ($this->input->is_cli_request())
|
||||
{
|
||||
$cli = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->output->set_status_header(403, 'Jobs must be run from the CLI');
|
||||
echo "Jobs must be run from the CLI";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Main function index as help
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$result = "The following are the available command line interface commands\n\n";
|
||||
$result .= "php ".$this->config->item('index_page')." jobs/Prestudentstatus CorrectStudienplan";
|
||||
|
||||
echo $result.PHP_EOL;
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class ReihungstestJob extends FHC_Controller
|
||||
class ReihungstestJob extends CLI_Controller
|
||||
{
|
||||
private $VILESCI_RT_VERWALTUNGS_URL;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@@ -13,20 +11,6 @@ class ReihungstestJob extends FHC_Controller
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Allow script execution only from CLI
|
||||
if ($this->input->is_cli_request())
|
||||
{
|
||||
$cli = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->output->set_status_header(403, 'Jobs must be run from the CLI');
|
||||
echo "Jobs must be run from the CLI";
|
||||
exit;
|
||||
}
|
||||
|
||||
$this->VILESCI_RT_VERWALTUNGS_URL = site_url('/organisation/Reihungstest');
|
||||
|
||||
// Load models
|
||||
$this->load->model('crm/Reihungstest_model', 'ReihungstestModel');
|
||||
$this->load->model('crm/RtStudienplan_model', 'RtStudienplanModel');
|
||||
@@ -38,18 +22,8 @@ class ReihungstestJob extends FHC_Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Main function index as help
|
||||
*
|
||||
* @return void
|
||||
* runReihungstestJob
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$result = "The following are the available command line interface commands\n\n";
|
||||
$result .= "php index.ci.php jobs/ReihungstestJob runReihungstestInfo";
|
||||
|
||||
echo $result. PHP_EOL;
|
||||
}
|
||||
|
||||
public function runReihungstestJob()
|
||||
{
|
||||
// Get study plans that have no assigned placement tests yet
|
||||
@@ -92,6 +66,9 @@ class ReihungstestJob extends FHC_Controller
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* runZentraleReihungstestAnmeldefristAssistenzJob
|
||||
*/
|
||||
public function runZentraleReihungstestAnmeldefristAssistenzJob()
|
||||
{
|
||||
// Get placement tests where registration date was yesterday
|
||||
@@ -198,7 +175,6 @@ class ReihungstestJob extends FHC_Controller
|
||||
$mailcontent .= '<p style="font-family: verdana, sans-serif;"><a href="mailto:?bcc=' . $mailReceipients . '">Mail an alle schicken</a></p>';
|
||||
}
|
||||
$mailcontent_data_arr['table'] = $mailcontent;
|
||||
//$mailcontent_data_arr['link'] = $this->VILESCI_RT_VERWALTUNGS_URL;
|
||||
|
||||
// Send email in Sancho design
|
||||
if (!isEmptyString($mailcontent))
|
||||
@@ -215,7 +191,9 @@ class ReihungstestJob extends FHC_Controller
|
||||
}
|
||||
}
|
||||
|
||||
// Checks, if an applicant was assigned to a test after Anmeldefrist
|
||||
/**
|
||||
* Checks, if an applicant was assigned to a test after Anmeldefrist
|
||||
*/
|
||||
public function runZentraleReihungstestNachtraeglichHinzugefuegtJob()
|
||||
{
|
||||
// Get applicants that have been added to a test after Anmeldefrist
|
||||
@@ -315,6 +293,9 @@ class ReihungstestJob extends FHC_Controller
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* runRemindApplicantsOfPlacementTestJob
|
||||
*/
|
||||
public function runRemindApplicantsOfPlacementTestJob()
|
||||
{
|
||||
// Get placement tests with testdate within 3 working days
|
||||
@@ -473,8 +454,7 @@ class ReihungstestJob extends FHC_Controller
|
||||
// Set associative array with the prepared HTML tables and URL be used by the template's variables
|
||||
$content_data_arr['studienplan_list'] = $studienplan_list;
|
||||
$content_data_arr['freie_plaetze_list'] = $freie_plaetze_list;
|
||||
$content_data_arr['link'] = $this->VILESCI_RT_VERWALTUNGS_URL;
|
||||
;
|
||||
$content_data_arr['link'] = site_url('/organisation/Reihungstest');
|
||||
|
||||
return $content_data_arr;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class Filters extends FHC_Controller
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Retrives data about the current filter from the session and will be written on the output in JSON format
|
||||
* Retrieves data about the current filter from the session and will be written on the output in JSON format
|
||||
*/
|
||||
public function getFilter()
|
||||
{
|
||||
@@ -43,7 +43,7 @@ class Filters extends FHC_Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrives the number of records present in the current dataset and will be written on the output in JSON format
|
||||
* Retrieves the number of records present in the current dataset and will be written on the output in JSON format
|
||||
*/
|
||||
public function rowNumber()
|
||||
{
|
||||
@@ -243,11 +243,11 @@ class Filters extends FHC_Controller
|
||||
// If it is present in the HTTP GET
|
||||
if (isset($_GET[self::FILTER_PAGE_PARAM]))
|
||||
{
|
||||
$filterPage = $this->input->get(self::FILTER_PAGE_PARAM); // is retrived from the HTTP GET
|
||||
$filterPage = $this->input->get(self::FILTER_PAGE_PARAM); // is retrieved from the HTTP GET
|
||||
}
|
||||
elseif (isset($_POST[self::FILTER_PAGE_PARAM])) // Else if it is present in the HTTP POST
|
||||
{
|
||||
$filterPage = $this->input->post(self::FILTER_PAGE_PARAM); // is retrived from the HTTP POST
|
||||
$filterPage = $this->input->post(self::FILTER_PAGE_PARAM); // is retrieved from the HTTP POST
|
||||
}
|
||||
|
||||
// Loads the FiltersLib that contains all the used logic
|
||||
|
||||
@@ -69,11 +69,11 @@ class Navigation extends Auth_Controller
|
||||
// If it is present in the HTTP GET
|
||||
if (isset($_GET[self::NAVIGATION_PAGE_PARAM]))
|
||||
{
|
||||
$navigationPage = $this->input->get(self::NAVIGATION_PAGE_PARAM); // is retrived from the HTTP GET
|
||||
$navigationPage = $this->input->get(self::NAVIGATION_PAGE_PARAM); // is retrieved from the HTTP GET
|
||||
}
|
||||
elseif (isset($_POST[self::NAVIGATION_PAGE_PARAM])) // Else if it is present in the HTTP POST
|
||||
{
|
||||
$navigationPage = $this->input->post(self::NAVIGATION_PAGE_PARAM); // is retrived from the HTTP POST
|
||||
$navigationPage = $this->input->post(self::NAVIGATION_PAGE_PARAM); // is retrieved from the HTTP POST
|
||||
}
|
||||
|
||||
// Loads the NavigationLib that contains all the used logic
|
||||
|
||||
Reference in New Issue
Block a user