本文整理汇总了PHP中Subjects::getStudentCount方法的典型用法代码示例。如果您正苦于以下问题:PHP Subjects::getStudentCount方法的具体用法?PHP Subjects::getStudentCount怎么用?PHP Subjects::getStudentCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Subjects
的用法示例。
在下文中一共展示了Subjects::getStudentCount方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
function show($metaPoziadavkaID)
{
$res = $this->requirements->load($metaPoziadavkaID);
$this->set("meta_poziadavka", $res["meta_poziadavka"]);
$this->set("requirement", $res["requirement"]);
// doplnujuce informacie, co, kto a kedy
$subjects = new Subjects();
$rooms = new Rooms();
//TODO nenatiahnut to do meta poziadavky rovno aj nazov predmetu ??
$id_predmet = $res["meta_poziadavka"]["id_predmet"];
$subject = $subjects->getSubject($id_predmet);
$student_count = $subjects->getStudentCount($id_predmet);
$student_count_info = $subjects->getStudentCountInfo($id_predmet);
$this->set("subject", $subject["nazov"]);
$this->set('student_count', $student_count['count']);
$this->set('student_count_info', $student_count_info);
$this->set('rooms', $rooms->getAll());
$this->set('metaPoziadavkaID', $metaPoziadavkaID);
$id_predmet = $res["meta_poziadavka"]["id_predmet"];
$id_poziadavka_typ = 1;
$previousMetaID = $this->requirements->getPreviousMetaID($id_predmet, $metaPoziadavkaID);
$nextMetaID = $this->requirements->getNextMetaID($id_predmet, $metaPoziadavkaID);
$this->set("previousMetaID", $previousMetaID);
$this->set("nextMetaID", $nextMetaID);
}
示例2: show
function show($metaPoziadavkaID)
{
$res = $this->requirements->load($metaPoziadavkaID);
$this->set("meta_poziadavka", $res["meta_poziadavka"]);
$this->set("requirement", $res["requirement"]);
$subjects = new Subjects();
$rooms = new Rooms();
$id_predmet = $res["meta_poziadavka"]["id_predmet"];
$subject = $subjects->getSubject($id_predmet);
$student_count = $subjects->getStudentCount($id_predmet);
$student_count_info = $subjects->getStudentCountInfo($id_predmet);
$this->set("subject", $subject["nazov"]);
$this->set('student_count', $student_count['count']);
$this->set('student_count_info', $student_count_info);
$this->set('rooms', $rooms->getAll());
$this->set('types', $rooms->getTypes());
$this->set('metaPoziadavkaID', $metaPoziadavkaID);
$id_predmet = $res["meta_poziadavka"]["id_predmet"];
$id_poziadavka_typ = 2;
$previousMetaID = $this->requirements->getPreviousMetaID($id_predmet, $metaPoziadavkaID);
$nextMetaID = $this->requirements->getNextMetaID($id_predmet, $metaPoziadavkaID);
$this->set("previousMetaID", $previousMetaID);
$this->set("nextMetaID", $nextMetaID);
}
示例3: __getCommonData
/**
* Ziska data poziadavky, nastavi aj predmet aj semester
* @param unknown_type $courseID
* @return unknown_type
*/
private function __getCommonData($courseID)
{
$rooms = new Rooms();
$subjects = new Subjects();
$student_count = $subjects->getStudentCount($courseID);
$student_count_info = $subjects->getStudentCountInfo($courseID);
$this->set('capacities', $rooms->getCapacities());
$this->set('types', $rooms->getTypes());
$this->set('type_capacity', $rooms->getCapacitiesForTypes());
$this->set('rooms', $rooms->getAll());
// zoradene, len podla nazvu
$this->set('roomsByName', $rooms->getAll(true));
$this->set('subject', $subjects->getSubject($courseID));
$this->set('student_count', $student_count['count']);
$this->set('student_count_info', $student_count_info);
$this->set('course_id', $courseID);
$this->set("semester_id", $this->session->read("semester"));
// flag blokovania a comment k tomu
$this->set('blokovanie_preberania', $this->subjects->isBlockedCopying($courseID));
}
示例4: __createcsvrow
private function __createcsvrow($id_predmet)
{
//vytiahni data o prednaskach a cvikach predmetu
$metaPoz = $this->prequirements->getLastRequest($id_predmet);
$metaPoz2 = $this->crequirements->getLastRequest($id_predmet);
if (!empty($metaPoz)) {
$req = $this->prequirements->load($metaPoz["id"]);
}
if (!empty($metaPoz2)) {
$req2 = $this->crequirements->load($metaPoz2["id"]);
}
$subjects = new Subjects();
$roomz = new Rooms();
$subject = $subjects->getSubject($id_predmet);
$student_count = $subjects->getStudentCount($id_predmet);
$student_count_info = $subjects->getStudentCountInfo($id_predmet);
$rooms = $roomz->getAll();
$types = $roomz->getTypes();
$rooms_nazvy = array();
foreach ($rooms as $room) {
$rooms_nazvy[$room["id"]] = $room["nazov"];
}
$rooms_types = array();
foreach ($types as $type) {
$rooms_types[$type["id"]] = $type["nazov"];
}
//nahadz vytiahnute data do struktury csv
$csvrow .= '"' . $subject["nazov"] . '"';
$csvrow .= ';"' . $student_count['count'] . '"';
$csvrow .= ';"' . ($req["requirement"]["komentare"]["vseobecne"] ? str_replace(array("\n", "\r"), " ", $req["requirement"]["komentare"]["vseobecne"]) : "NULL") . '"';
$csvrow .= ';"' . ($req["requirement"]["komentare"]["sw"] ? str_replace(array("\n", "\r"), " ", $req["requirement"]["komentare"]["sw"]) : "NULL") . '"';
$layind = "a";
for ($j = 1; $j <= 3; $j++) {
$csvrow .= ';"' . ($req["requirement"]["layouts"][$layind]["lecture_count"] ? $req["requirement"]["layouts"][$layind]["lecture_count"] : "NULL") . '"';
$tmp = '';
for ($k = 0; $k < 13; $k++) {
if ($req["requirement"]["layouts"][$layind]["weeks"][$k]) {
$tmp .= $k + 1 . ' ';
}
}
$csvrow .= ';"' . ($tmp ? $tmp : "NULL") . '"';
for ($k = 1; $k <= 3; $k++) {
$csvrow .= ';"' . ($req["requirement"]["layouts"][$layind]["requirement"][$k]["lecture_hours"] ? $req["requirement"]["layouts"][$layind]["requirement"][$k]["lecture_hours"] : "NULL") . '"';
$csvrow .= ';"' . ($req["requirement"]["layouts"][$layind]["requirement"][$k]["rooms"]["students_count"] ? $req["requirement"]["layouts"][$layind]["requirement"][$k]["rooms"]["students_count"] : "NULL") . '"';
$csvrow .= ';"' . ($req["requirement"]["layouts"][$layind]["requirement"][$k]["equipment"]["chair_count"] ? $req["requirement"]["layouts"][$layind]["requirement"][$k]["equipment"]["chair_count"] : "NULL") . '"';
$csvrow .= ';"' . ($req["requirement"]["layouts"][$layind]["requirement"][$k]["rooms"]["capacity"] ? $req["requirement"]["layouts"][$layind]["requirement"][$k]["rooms"]["capacity"] : "NULL") . '"';
$sel_rooms = array();
foreach ($req["requirement"]["layouts"][$layind]["requirement"][$k]["rooms"]["selected"] as $sel_room) {
$sel_rooms[] = $rooms_nazvy[$sel_room];
}
$csvrow .= ';"' . ($sel_rooms ? implode(" ", $sel_rooms) : "NULL") . '"';
$csvrow .= ';"' . ($req["requirement"]["layouts"][$layind]["requirement"][$k]["equipment"]["notebook"] ? "true" : "false") . '"';
$csvrow .= ';"' . ($req["requirement"]["layouts"][$layind]["requirement"][$k]["equipment"]["beamer"] ? "true" : "false") . '"';
$csvrow .= ';"' . ($req["requirement"]["layouts"][$layind]["requirement"][$k]["after_lecture"] ? "true" : "false") . '"';
$csvrow .= ';"' . ($req["requirement"]["layouts"][$layind]["requirement"][$k]["before_lecture"] ? "true" : "false") . '"';
$csvrow .= ';"' . ($req["requirement"]["layouts"][$layind]["requirement"][$k]["comment"] ? str_replace(array("\n", "\r"), " ", $req["requirement"]["layouts"][$layind]["requirement"][$k]["comment"]) : "NULL") . '"';
}
$layind = chr(ord($layind) + 1);
}
$csvrow .= ';"' . ($req2["requirement"]["komentare"]["vseobecne"] ? str_replace(array("\n", "\r"), " ", $req2["requirement"]["komentare"]["vseobecne"]) : "NULL") . '"';
$csvrow .= ';"' . ($req2["requirement"]["komentare"]["sw"] ? str_replace(array("\n", "\r"), " ", $req2["requirement"]["komentare"]["sw"]) : "NULL") . '"';
$layind = "a";
for ($j = 1; $j <= 3; $j++) {
$csvrow .= ';"' . ($req2["requirement"]["layouts"][$layind]["pract_count"] ? $req2["requirement"]["layouts"][$layind]["pract_count"] : "NULL") . '"';
$tmp = '';
for ($k = 0; $k < 13; $k++) {
if ($req2["requirement"]["layouts"][$layind]["weeks"][$k]) {
$tmp .= $k + 1 . ' ';
}
}
$csvrow .= ';"' . ($tmp ? $tmp : "NULL") . '"';
for ($k = 1; $k <= 3; $k++) {
$csvrow .= ';"' . ($req2["requirement"]["layouts"][$layind]["requirement"][$k]["pract_hours"] ? $req2["requirement"]["layouts"][$layind]["requirement"][$k]["pract_hours"] : "NULL") . '"';
$csvrow .= ';"' . ($req2["requirement"]["layouts"][$layind]["requirement"][$k]["pract_paralell"] ? $req2["requirement"]["layouts"][$layind]["requirement"][$k]["pract_paralell"] : "NULL") . '"';
for ($l = 1; $l <= 2; $l++) {
$csvrow .= ';"' . ($req2["requirement"]["layouts"][$layind]["requirement"][$k]["rooms"][$l]["students_count"] ? $req2["requirement"]["layouts"][$layind]["requirement"][$k]["rooms"][$l]["students_count"] : "NULL") . '"';
$csvrow .= ';"' . ($req2["requirement"]["layouts"][$layind]["requirement"][$k]["rooms"][$l]["type"] ? $rooms_types[$req2["requirement"]["layouts"][$layind]["requirement"][$k]["rooms"][$l]["type"]] : "NULL") . '"';
$csvrow .= ';"' . ($req2["requirement"]["layouts"][$layind]["requirement"][$k]["rooms"][$l]["capacity"] ? $req2["requirement"]["layouts"][$layind]["requirement"][$k]["rooms"][$l]["capacity"] : "NULL") . '"';
$sel_rooms2 = array();
foreach ($req2["requirement"]["layouts"][$layind]["requirement"][$k]["rooms"][$l]["selected"] as $sel_room) {
$sel_rooms2[] = $rooms_nazvy[$sel_room];
}
$csvrow .= ';"' . ($sel_rooms2 ? implode(" ", $sel_rooms2) : "NULL") . '"';
$csvrow .= ';"' . ($req2["requirement"]["layouts"][$layind]["requirement"][$k]["comment"] ? str_replace(array("\n", "\r"), " ", $req2["requirement"]["layouts"][$layind]["requirement"][$k]["comment"]) : "NULL") . '"';
}
}
$layind = chr(ord($layind) + 1);
}
$csvrow .= "\n";
return $csvrow;
}
示例5: __createdocstruct
private function __createdocstruct($id_predmet)
{
$metaPoz = $this->prequirements->getLastRequest($id_predmet);
$metaPoz2 = $this->crequirements->getLastRequest($id_predmet);
if (!empty($metaPoz)) {
$req = $this->prequirements->load($metaPoz["id"]);
}
if (!empty($metaPoz2)) {
$req2 = $this->crequirements->load($metaPoz2["id"]);
}
$subjects = new Subjects();
$roomz = new Rooms();
$subject = $subjects->getSubject($id_predmet);
$student_count = $subjects->getStudentCount($id_predmet);
$student_count_info = $subjects->getStudentCountInfo($id_predmet);
$rooms = $roomz->getAll();
$types = $roomz->getTypes();
$rooms_nazvy = array();
foreach ($rooms as $room) {
$rooms_nazvy[$room["id"]] = $room["nazov"];
}
$rooms_types = array();
foreach ($types as $type) {
$rooms_types[$type["id"]] = $type["nazov"];
}
$i = 0;
$doc = '<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="ProgId" content="Word.Document">
<meta name="Generator" content="Systém pre podporu tvorby rozvrhov">
<meta name="Originator" content="Systém pre podporu tvorby rozvrhov">
<style>
@page Section1
{size: 595.35pt 841.995pt;
mso-page-orientation: portrait;
margin: 3cm 2.5cm 3cm 2.5cm;
mso-header-margin: 36pt;
mso-footer-margin: 36pt;
mso-paper-source: 0;}
div.Section1
{page: Section1;}
p.normalText, li.normalText, div.normalText{
mso-style-parent: "";
margin: 0cm;
margin-bottom: 6pt;
mso-pagination: widow-orphan;
font-size: 12pt;
font-family: "Times New Roman";
mso-fareast-font-family: "Times New Roman";
}
table.normalTable{
mso-style-name: "Tabela com grade";
mso-tstyle-rowband-size: 0;
mso-tstyle-colband-size: 0;
border-collapse: collapse;
mso-border-alt: solid windowtext 0.5pt;
mso-yfti-tbllook: 480;
mso-padding-alt: 0cm 5px 0cm 5px;
mso-border-insideh: 1px solid windowtext;
mso-border-insidev: 1px solid windowtext;
mso-para-margin: 0cm;
mso-para-margin-bottom: 0pt;
mso-pagination: widow-orphan;
font-size: 12pt;
font-family: "Times New Roman";
width: 600px;
}
table.normalTable td{
border: solid windowtext 1px;
border-left: none;
mso-border-left-alt: solid windowtext .5pt;
mso-border-alt: solid windowtext .5pt;
padding: 0cm 5px 0cm 5px;
}
</style>
</head>
<body lang="SK" style="tab-interval: 35.4pt">
<div class="Section1">';
//////////////////////////////////////////////////////////////////////
///////////////////////////////prednasky
//////////////////////////////////////////////////////////////////////
$doc .= '<p class="normalText" style="text-align: center;font-weight: bold;font-size: 24pt;">' . $subject["nazov"] . '</p>
<br>
<p class="normalText" style="font-weight: bold;font-size: 20pt;">Prednášky</p>
<table class="normalTable" style="" border="0" cellspacing="0" cellpadding="0">
<tr style="mso-yfti-irow: ' . $i++ . '">
<td width="120" align="left" valign="top" style=""><b>Čas zadania:</b></td>
<td width="130" align="left" valign="top" style="">' . $metaPoz['cas_pridania'] . '</td>
<td width="80" align="left" valign="top" style=""><b>Zadal:</b></td>
<td width="270" align="left" valign="top" style="">' . $metaPoz['pedagog'] . '</td>
</tr>
<tr style="mso-yfti-irow: ' . $i++ . '">
<td width="250" align="left" valign="top" style="" colspan="2"><b>Odbor</b></td>
<td width="80" align="left" valign="top" style="" colspan="1"><b>Ročník</b></td>
<td width="270" align="left" valign="top" style="" colspan="1"><b>Počet študentov</b></td>
//.........这里部分代码省略.........