mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 17:32:18 +00:00
Models
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
class Studienplan_model extends DB_Model
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user