Exemplo n.º 1
0
 public function execute($dataContainer)
 {
     parent::entryPoint($dataContainer);
     $classes = $this->assignmentsGet();
     $this->_smarty->assign('classes', $classes);
     $this->displayTpl('classlist.tpl');
 }
Exemplo n.º 2
0
 public function execute($dataContainer)
 {
     parent::entryPoint($dataContainer);
     die(json_encode(array('value' => 'error', 'message' => json_encode($_POST))));
     $this->classChange($_POST['userId'], $_POST['classId'], $_POST['newClassId'], $_POST['newClassCategoryId']);
     die(json_encode(array('value' => 'success', 'message' => _g('The User was successfully moved.'))));
 }
Exemplo n.º 3
0
 public function execute($dataContainer)
 {
     parent::entryPoint($dataContainer);
     $userId = $this->userIdGetByUsername($_POST['username']);
     $statusId = $this->statusIdGetByName($_POST['statusname']);
     $this->userAssignToClass($userId, $_POST['classId'], $_POST['categoryId'], $statusId);
     die(json_encode(array('value' => 'success', 'message' => _g('The User was successfully added'))));
 }
Exemplo n.º 4
0
 public function execute($dataContainer)
 {
     parent::entryPoint($dataContainer);
     $this->_pdo->beginTransaction();
     $this->usersInClassJointDeleteByNewAssignments();
     $this->newAssignmentsAddToJoints();
     $this->_pdo->commit();
     $this->_interface->backlink('administrator|Kuwasys|KuwasysUsers|' . 'AssignUsersToClasses');
     $this->_interface->dieSuccess(_g('The users were successfully assigned to their respective classes!'));
 }
Exemplo n.º 5
0
 public function execute($dataContainer)
 {
     parent::entryPoint($dataContainer);
     try {
         $statusId = $_POST['statusname'] != 'removed' ? $this->statusIdGetByNameWoException($_POST['statusname']) : 0;
     } catch (PDOException $e) {
         die(json_encode(array('value' => 'error', 'message' => _g('Could not fetch the Status'))));
     }
     $this->changeStatus($_POST['userId'], $_POST['classId'], $statusId);
     die(json_encode(array('value' => 'success', 'message' => _g('The Status of the User was successfully changed'))));
 }
Exemplo n.º 6
0
 public function execute($dataContainer)
 {
     parent::entryPoint($dataContainer);
     if ($this->tableExists()) {
         $this->tableDrop();
     }
     $this->tableCreate();
     $this->statusSet();
     $this->tableFill();
     $this->_smarty->assign('backlink', 'javascript:history.back()');
     $this->_interface->dieSuccess(_g('The Data was successfully Assigned. You can now go back and view and edit the temporary changes'));
 }
Exemplo n.º 7
0
 public function execute($dataContainer)
 {
     parent::entryPoint($dataContainer);
     try {
         $data = $this->temporaryAssignmentsRequestsOfClassGet($_POST['classId'], $_POST['categoryId']);
         $data = $this->requestsAtSameCategoryForRequestsAppend($data);
     } catch (PDOException $e) {
         $this->_logger->log('Error fetching the user-assignments', 'Notice', Null, json_encode(array('msg' => $e->getMessage())));
         die(json_encode(array('value' => 'error', 'message' => _g('Could not fetch the User-Assignments') . $e->getMessage())));
     }
     die(json_encode($data));
 }
Exemplo n.º 8
0
 public function execute($dataContainer)
 {
     parent::entryPoint($dataContainer);
     try {
         $class = $this->classWithCategoryGet($_GET['classId'], $_GET['categoryId']);
         $classes = $this->classesGetAllOfActiveSchoolyear();
     } catch (PDOException $e) {
         $this->_logger->log('Could not fetch the data of class' . "{$_GET['classId']} in " . __METHOD__, 'error');
         $this->_interface->dieError(_g('Error while fetching the data!'));
     }
     $this->_smarty->assign('classId', $_GET['classId']);
     $this->_smarty->assign('categoryId', $_GET['categoryId']);
     $this->_smarty->assign('class', $class);
     $this->_smarty->assign('classes', $classes);
     $this->displayTpl('classdetails.tpl');
 }