Codeception

This commit is contained in:
paolo
2016-04-27 11:46:29 +02:00
parent 932d48d95b
commit 51774021b4
5 changed files with 107 additions and 139 deletions
@@ -2,11 +2,6 @@
class Studienplan_model extends DB_Model
{
//
protected $_studienplaeneQuery = "SELECT DISTINCT tbl_studienplan.*
FROM lehre.tbl_studienplan JOIN lehre.tbl_studienordnung USING(studienordnung_id)
WHERE tbl_studienordnung.studiengang_kz = ?";
/**
*
*/
@@ -21,12 +16,15 @@ class Studienplan_model extends DB_Model
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($this->_studienplaeneQuery, array($studiengang_kz));
$result = $this->db->query($studienplaeneQuery, array($studiengang_kz));
}
return $result;