Beispiel #1
0
 /**
  * @param array $params
  * @param bool $isPartOfList [optional]
  */
 function __construct($params, $isPartOfList = false)
 {
     if (!isset($params[self::PROP_ID])) {
         $params[self::PROP_ID] = BasicEntity::UNSAVED_INSTANCE_ID;
     }
     $headID = intval($params[self::PROP_HEAD_ID]);
     $member1ID = intval($params[self::PROP_MEMBER1_ID]);
     $member2ID = intval($params[self::PROP_MEMBER2_ID]);
     $seasonID = intval($params[self::PROP_SEASON_ID]);
     $subjectID = intval($params[self::PROP_SUBJECT_ID]);
     $departmentID = intval($params[self::PROP_DEPARTMENT_ID]);
     $seasonInstance = Season::getBuilder()->getByIdentifier(array(Season::PROP_ID => $seasonID));
     $subjectInstance = Subject::getBuilder()->getByIdentifier(array(Subject::PROP_ID => $subjectID));
     $departmentInstance = Department::getBuilder()->getByIdentifier(array(Department::PROP_ID => $departmentID));
     $this->headID = $headID;
     $this->member1ID = $member1ID;
     $this->member2ID = $member2ID;
     $this->label = self::LABEL;
     $this->id = array(self::PROP_ID => $params[self::PROP_ID]);
     $this->properties[self::PROP_ID] = new IntegerProperty(self::PROP_ID, 'ID', $this->id[self::PROP_ID], false, false);
     $this->properties[self::PROP_SEASON_ID] = new EntityProperty(self::PROP_SEASON_ID, 'Sezon', intval($params[self::PROP_SEASON_ID]), Season::getBuilder()->getList($isPartOfList), true, true, $seasonInstance);
     $this->properties[self::PROP_SUBJECT_ID] = new EntityProperty(self::PROP_SUBJECT_ID, 'Lende', $subjectID, Subject::getBuilder()->getList($isPartOfList), true, true, $subjectInstance);
     $this->properties[self::PROP_DEPARTMENT_ID] = new EntityProperty(self::PROP_DEPARTMENT_ID, 'Dege', $departmentID, Department::getBuilder()->getList($isPartOfList), true, true, $departmentInstance);
     $this->properties[self::PROP_HEAD_ID] = new EntityProperty(self::PROP_HEAD_ID, 'Kryetar Komisioni', $headID, Professor::getBuilder()->getList($isPartOfList), true);
     $this->properties[self::PROP_MEMBER1_ID] = new EntityProperty(self::PROP_MEMBER1_ID, 'Anëtar 1', $member1ID, Professor::getBuilder()->getList($isPartOfList), true);
     $this->properties[self::PROP_MEMBER2_ID] = new EntityProperty(self::PROP_MEMBER2_ID, 'Anëtar 2', $member2ID, Professor::getBuilder()->getList($isPartOfList), true);
     $this->actionHelper = new EntityActionHelper(self::TABLE_NAME, $this);
     $this->isPartOfList = $isPartOfList;
 }
Beispiel #2
0
 /**
  * @param array $params
  * @param bool $isPartOfList [optional]
  */
 function __construct($params, $isPartOfList = false)
 {
     $this->label = self::LABEL;
     $this->isPartOfList = $isPartOfList;
     $this->id = array(self::PROP_SUBJECT_ID => intval($params[self::PROP_SUBJECT_ID]), self::PROP_STUDENT_ID => intval($params[self::PROP_STUDENT_ID]));
     $this->properties[self::PROP_SUBJECT_ID] = new EntityProperty(self::PROP_SUBJECT_ID, 'Lende', $this->id[self::PROP_SUBJECT_ID], Subject::getBuilder()->getList($isPartOfList), true, true, Subject::getBuilder()->getByIdentifier(array(Subject::PROP_ID => $this->id[self::PROP_SUBJECT_ID])));
     $this->properties[self::PROP_STUDENT_ID] = new EntityProperty(self::PROP_STUDENT_ID, 'Student', $this->id[self::PROP_STUDENT_ID], Student::getBuilder()->getList($isPartOfList), true, true, Student::getBuilder()->getByIdentifier(array(Student::PROP_ID => $this->id[self::PROP_STUDENT_ID])));
     $this->properties[self::PROP_SEMINARIES] = new BooleanProperty(self::PROP_SEMINARIES, 'Frekuentim Seminaresh', $params, self::PROP_SEMINARIES, true, true);
     $this->properties[self::PROP_LAB] = new BooleanProperty(self::PROP_LAB, 'Frekuentim Laboratoresh', $params, self::PROP_LAB, true, true);
     $this->properties[self::PROP_ASSIGNMENT] = new BooleanProperty(self::PROP_ASSIGNMENT, 'Dorëzim Detyre Kursi', $params, self::PROP_ASSIGNMENT, true, true);
     $this->properties[self::PROP_STATUS] = new BooleanProperty(self::PROP_STATUS, 'Përmirësim', $params, self::PROP_STATUS, true, true);
     $this->actionHelper = new EntityActionHelper(self::TABLE_NAME, $this);
 }
Beispiel #3
0
<?php

/**
 * Created by PhpStorm.
 * User: Marin Kaçaj
 * Date: 6/14/2015
 * Time: 2:05 PM
 */
use fti\adv_db\entity\Subject;
use fti\adv_db\http\HttpEntityParamBuilder;
require_once dirname(dirname(__FILE__)) . '/includes/loader.php';
require_once dirname(dirname(__FILE__)) . '/pages/editHelper.php';
redirectIfNotSecretary();
$identifier = HttpEntityParamBuilder::retrieveFilter(array(Subject::PROP_ID));
$entityBuilder = Subject::getBuilder();
buildEditView($entityBuilder, $identifier);
require_once dirname(dirname(__FILE__)) . '/pages/formPage.php';
Beispiel #4
0
<?php

/**
 * Created by PhpStorm.
 * User: Marin Kaçaj
 * Date: 6/14/2015
 * Time: 4:49 PM
 */
use fti\adv_db\entity\Subject;
use fti\adv_db\http\HttpEntityParamBuilder;
use fti\adv_db\nav\ActionNavigator;
require_once dirname(dirname(__FILE__)) . '/includes/session.php';
require_once dirname(dirname(__FILE__)) . '/auth/security.php';
require_once dirname(dirname(dirname(__FILE__))) . '/src/fti/adv_db/functions/auto_loader.php';
spl_autoload_register('class_auto_loader');
redirectIfNotSecretary();
$id = HttpEntityParamBuilder::retrieveFilter(array(Subject::PROP_ID));
$subjectInstance = Subject::getBuilder()->getByIdentifier($id);
$actionNavigator = new ActionNavigator($subjectInstance);
$actionNavigator->deleteAndRedirect();
Beispiel #5
0
    array_push($entityInstances, $entityBuilder->createEmpty());
} else {
    $headProfessor = Professor::getBuilder()->getByIdentifier(array(Professor::PROP_ID => $entityInstances[0]->getProperty(ExamResult::PROP_EXAM_HEAD_ID)->getValue()));
    $member1Professor = Professor::getBuilder()->getByIdentifier(array(Professor::PROP_ID => $entityInstances[0]->getProperty(ExamResult::PROP_EXAM_MEMBER1_ID)->getValue()));
    $member2Professor = Professor::getBuilder()->getByIdentifier(array(Professor::PROP_ID => $entityInstances[0]->getProperty(ExamResult::PROP_EXAM_MEMBER2_ID)->getValue()));
}
$listViewAggregator = new ListViewAggregator($entityInstances, true);
$listViewAggregator->setIsUpdateButtonDisplayed(true);
$listViewAggregator->setIsDeleteButtonDisplayed(false);
$baseURL = get_assets_base_url();
$listDefaultFileName = LIST_DEFAULT_FILE_NAME;
$filterArgs = http_build_str($filters);
$previousURL = $baseURL . "result/{$listDefaultFileName}?{$filterArgs}";
$previousURL = urlencode($previousURL);
$listViewAggregator->setCommonParams(array(PREVIOUS_URL => $previousURL));
$subjectInstance = Subject::getBuilder()->getByIdentifier(array(Subject::PROP_ID => $subjectID));
$groupInstance = Group::getBuilder()->getByIdentifier(array(Group::PROP_ID => $groupID));
$contentHeader = $entityBuilder->getLabel();
$contentAction = 'Lista';
$contentHTML = $listViewAggregator->buildListHTML($isEmpty, false);
?>

<!DOCTYPE html>
<html>
<?php 
require_once dirname(dirname(__FILE__)) . '/includes/head.php';
?>
<body class="custom-body">
<div id="wrapper">
    <?php 
require_once dirname(dirname(__FILE__)) . '/includes/navigation.php';
Beispiel #6
0
 * Created by PhpStorm.
 * User: C.R.C
 * Date: 6/28/2015
 * Time: 9:57 PM
 */
use fti\adv_db\entity\Group;
use fti\adv_db\entity\Season;
use fti\adv_db\entity\Subject;
require_once dirname(dirname(__FILE__)) . '/includes/session.php';
require_once dirname(dirname(__FILE__)) . '/auth/security.php';
require_once dirname(dirname(dirname(__FILE__))) . '/src/fti/adv_db/constants/gen_purpose.php';
require_once dirname(dirname(dirname(__FILE__))) . '/src/fti/adv_db/functions/auto_loader.php';
spl_autoload_register('class_auto_loader');
redirectIfNotProfessor();
$seasonInstances = Season::getBuilder()->getList();
$subjectInstances = Subject::getBuilder()->getList();
$groupInstances = Group::getBuilder()->getList();
?>

<!DOCTYPE html>
<html>
<?php 
require_once dirname(dirname(__FILE__)) . '/includes/head.php';
?>
<body>
<?php 
require_once dirname(dirname(__FILE__)) . '/includes/navigation.php';
?>
<div id="wrapper">
    <div id="page-wrapper">
        <div class="row">