mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 09:52:22 +00:00
35 lines
785 B
PHP
35 lines
785 B
PHP
<?php
|
|
class Studienplan_model extends DB_Model
|
|
{
|
|
|
|
/**
|
|
* Constructor
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->dbTable = 'lehre.tbl_studienplan';
|
|
$this->pk = 'studienplan_id';
|
|
}
|
|
|
|
/**
|
|
*
|
|
*/
|
|
public function getStudienplaene($studiengang_kz)
|
|
{
|
|
$result = NULL;
|
|
$studienplaeneQuery = "SELECT DISTINCT tbl_studienplan.*
|
|
FROM lehre.tbl_studienplan JOIN lehre.tbl_studienordnung USING(studienordnung_id)
|
|
WHERE tbl_studienordnung.studiengang_kz = ?";
|
|
|
|
// Checks if the operation is permitted by the API caller
|
|
// All the code should be put inside this if statement
|
|
if(isAllowed($this->getAddonID(), 'plan'))
|
|
{
|
|
$result = $this->db->query($studienplaeneQuery, array($studiengang_kz));
|
|
}
|
|
|
|
return $result;
|
|
}
|
|
}
|