mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Merge branch 'master' into feature-6189/SAP_basic_structure_for_data_synchronization
This commit is contained in:
@@ -127,37 +127,25 @@ define('EMAIL_CONFIG_INDEX', 'mail');
|
||||
| Messaging system constants
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
// Email kontakt type
|
||||
define('EMAIL_KONTAKT_TYPE', 'email');
|
||||
// tbl_msg_recipient->sentInfo separator
|
||||
define('SENT_INFO_NEWLINE', '\n');
|
||||
|
||||
// Message statuses
|
||||
define('MSG_STATUS_UNREAD', 0);
|
||||
define('MSG_STATUS_READ', 1);
|
||||
define('MSG_STATUS_ARCHIVED', 2);
|
||||
define('MSG_STATUS_DELETED', 3);
|
||||
|
||||
// Priority
|
||||
define('PRIORITY_LOW', 1);
|
||||
define('PRIORITY_NORMAL', 2);
|
||||
define('PRIORITY_HIGH', 3);
|
||||
define('PRIORITY_URGENT', 4);
|
||||
// Message priorities
|
||||
define('MSG_PRIORITY_LOW', 1);
|
||||
define('MSG_PRIORITY_NORMAL', 2);
|
||||
define('MSG_PRIORITY_HIGH', 3);
|
||||
define('MSG_PRIORITY_URGENT', 4);
|
||||
|
||||
define('MSG_ERR_SUBJECT_EMPTY', 40);
|
||||
define('MSG_ERR_BODY_EMPTY', 41);
|
||||
define('MSG_ERR_TEMPLATE_NOT_FOUND', 42);
|
||||
define('MSG_ERR_DELIVERY_MESSAGE', 43);
|
||||
define('MSG_ERR_CONTACT_NOT_FOUND', 44);
|
||||
define('MSG_ERR_OU_CONTACTS_NOT_FOUND', 45);
|
||||
|
||||
define('MSG_ERR_INVALID_USER_ID', 100);
|
||||
define('MSG_ERR_INVALID_MSG_ID', 101);
|
||||
define('MSG_ERR_INVALID_THREAD_ID', 102);
|
||||
define('MSG_ERR_INVALID_STATUS_ID', 103);
|
||||
define('MSG_ERR_INVALID_SENDER_ID', 104);
|
||||
define('MSG_ERR_INVALID_RECIPIENTS', 105);
|
||||
define('MSG_ERR_INVALID_RECEIVER_ID', 106);
|
||||
define('MSG_ERR_INVALID_OU', 107);
|
||||
define('MSG_ERR_INVALID_TEMPLATE', 108);
|
||||
define('MSG_ERR_INVALID_TOKEN', 109);
|
||||
// Message error status
|
||||
define('MSG_ERR_INVALID_SUBJECT', 40);
|
||||
define('MSG_ERR_INVALID_BODY', 41);
|
||||
define('MSG_ERR_INVALID_TEMPLATE', 42);
|
||||
define('MSG_ERR_INVALID_MSG_ID', 43);
|
||||
define('MSG_ERR_INVALID_STATUS_ID', 44);
|
||||
define('MSG_ERR_INVALID_SENDER', 45);
|
||||
define('MSG_ERR_INVALID_RECIPIENTS', 46);
|
||||
define('MSG_ERR_INVALID_OU', 47);
|
||||
define('MSG_ERR_INVALID_TOKEN', 48);
|
||||
|
||||
@@ -29,3 +29,6 @@ $config['wrapchars'] = 76; // Character count to wrap at.
|
||||
$config['mailtype'] = 'html'; // html or text
|
||||
$config['priority'] = 3; // Email Priority. 1 = highest. 5 = lowest. 3 = normal
|
||||
$config['validate'] = false; // If true then the email address will be validated
|
||||
|
||||
// If enabled will be logged info about emails in Codeigniter error logs
|
||||
$config['enable_debug'] = false;
|
||||
|
||||
@@ -7,13 +7,19 @@ $config['send_immediately'] = false;
|
||||
|
||||
$config['msg_delivery'] = true; // Default true
|
||||
$config['system_person_id'] = 1; // Dummy sender, used for sending messages from the system
|
||||
$config['redirect_view_message_url'] = '/Redirect/redirectByToken/';
|
||||
$config['message_html_view_url'] = '/ViewMessage/toHTML/';
|
||||
$config['redirect_view_message_url'] = '/system/messages/ViewMessage/redirectByToken/';
|
||||
$config['message_html_view_url'] = '/system/messages/ViewMessage/toHTML/';
|
||||
|
||||
// Change this to CIS Server (https://cis.example.com/index.ci.php) if you are sending Messages from Vilesci
|
||||
$config['message_server'] = site_url();
|
||||
$config['assistent_function'] = 'ass';
|
||||
// Organization unit function that are allowed to read messages for the organisation unit
|
||||
$config['ou_receivers'] = array('ass');
|
||||
// Organization units that will never receive notice emails
|
||||
$config['ou_receivers_no_notice'] = array('infocenter');
|
||||
// Organization units that will not send the notice email to the internal account, but to the private one
|
||||
$config['ou_receivers_private'] = array('eac', 'ewu', 'scs');
|
||||
|
||||
$config['message_redirect_url'] = array();
|
||||
$config['message_redirect_url']['fallback'] = site_url('ViewMessage/writeReply');
|
||||
// $config['message_redirect_url']['OE_ROOT'] = 'https://SERVER-NAME/addons/aufnahme/OE_ROOT/cis/index.php';
|
||||
$config['message_redirect_url']['fallback'] = site_url('system/messages/ViewMessage/writeReply');
|
||||
// $config['message_redirect_url']['OE_ROOT_1'] = 'https://<server name>/addons/aufnahme/OE_ROOT/cis/index.php';
|
||||
// $config['message_redirect_url']['OE_ROOT_2'] = 'https://<server name>/<where ever you like to land to a message reply page>';
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if (!defined("BASEPATH")) exit("No direct script access allowed");
|
||||
|
||||
class MailJob extends Auth_Controller
|
||||
{
|
||||
/**
|
||||
* API constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// An empty array as parameter will ensure that this controller is ONLY callable from command line
|
||||
parent::__construct(array());
|
||||
|
||||
// Loads MessageLib
|
||||
$this->load->library('MessageLib');
|
||||
}
|
||||
|
||||
public function sendMessages($numberToSent = null, $numberPerTimeRange = null, $email_time_range = null, $email_from_system = null)
|
||||
{
|
||||
$this->messagelib->sendAll($numberToSent, $numberPerTimeRange, $email_time_range, $email_from_system);
|
||||
}
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Redirect extends FHC_Controller
|
||||
{
|
||||
/**
|
||||
* API constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Loads model MessageTokenModel
|
||||
$this->load->model('system/MessageToken_model', 'MessageTokenModel');
|
||||
}
|
||||
|
||||
/**
|
||||
* redirectByToken
|
||||
*
|
||||
* - Loads the message using a token
|
||||
* - Loads the root of the organisation unit tree using the oe_kurzbz present in the message
|
||||
* - Redirect to the aufnahme related to the found organisation unit
|
||||
*/
|
||||
public function redirectByToken($token)
|
||||
{
|
||||
$msg = $this->MessageTokenModel->getMessageByToken($token);
|
||||
if (isError($msg))
|
||||
{
|
||||
show_error(getError($msg));
|
||||
}
|
||||
|
||||
$oe_kurzbz = null;
|
||||
if (hasData($msg)) $oe_kurzbz = getData($msg)[0]->oe_kurzbz;
|
||||
|
||||
if ($oe_kurzbz != null && $oe_kurzbz != '')
|
||||
{
|
||||
$organisationRoot = null;
|
||||
|
||||
$getOERoot = $this->MessageTokenModel->getOERoot($oe_kurzbz);
|
||||
if (isSuccess($getOERoot)) // If no errors occurred
|
||||
{
|
||||
$organisationRoot = getData($getOERoot);
|
||||
}
|
||||
else
|
||||
{
|
||||
show_error('No organisation unit present in the message');
|
||||
}
|
||||
|
||||
$addonAufnahmeUrls = $this->config->item('message_redirect_url');
|
||||
if(!isset($addonAufnahmeUrls[$organisationRoot]))
|
||||
$organisationRoot = 'fallback';
|
||||
|
||||
if (isset($token)
|
||||
&& hasData($msg)
|
||||
&& is_array($addonAufnahmeUrls)
|
||||
&& $organisationRoot != null
|
||||
&& isset($addonAufnahmeUrls[$organisationRoot]))
|
||||
{
|
||||
redirect($addonAufnahmeUrls[$organisationRoot] . '?token=' . $token);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$addonAufnahmeUrls = $this->config->item('message_redirect_url');
|
||||
if (isset($token)
|
||||
&& hasData($msg)
|
||||
&& is_array($addonAufnahmeUrls)
|
||||
&& isset($addonAufnahmeUrls['fallback']))
|
||||
{
|
||||
redirect($addonAufnahmeUrls['fallback'] . '?token=' . $token);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,150 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Handles sending messages with token
|
||||
* NOTE: in this controller is not possible to include/call everything
|
||||
* that automatically call the authentication system, like the most of models or libraries
|
||||
*/
|
||||
class ViewMessage extends FHC_Controller
|
||||
{
|
||||
/**
|
||||
* API constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Loading config file message
|
||||
$this->config->load('message');
|
||||
|
||||
// Load model MessageToken_model, not calling the authentication system
|
||||
$this->load->model('system/MessageToken_model', 'MessageTokenModel');
|
||||
$this->load->model('CL/Messages_model', 'CLMessagesModel');
|
||||
}
|
||||
|
||||
/**
|
||||
* Using the MessageTokenModel instead of MessageLib to allow
|
||||
* viewing the message without prompting the login
|
||||
*/
|
||||
public function toHTML($token)
|
||||
{
|
||||
$msg = $this->MessageTokenModel->getMessageByToken($token);
|
||||
if (isError($msg))
|
||||
{
|
||||
show_error(getError($msg));
|
||||
}
|
||||
|
||||
if (is_array(getData($msg)) && count(getData($msg)) > 0)
|
||||
{
|
||||
$setReadMessageStatusByToken = $this->MessageTokenModel->setReadMessageStatusByToken($token);
|
||||
if (isError($setReadMessageStatusByToken))
|
||||
{
|
||||
show_error(getError($setReadMessageStatusByToken));
|
||||
}
|
||||
|
||||
$sender_id = getData($msg)[0]->sender_id;
|
||||
$receiver_id = getData($msg)[0]->receiver_id;
|
||||
$sender = $this->MessageTokenModel->getSenderData($sender_id);
|
||||
|
||||
// To decide how to change the redirection
|
||||
$isEmployee = $this->MessageTokenModel->isEmployee($receiver_id);
|
||||
if (isError($isEmployee))
|
||||
{
|
||||
show_error(getError($isEmployee));
|
||||
}
|
||||
|
||||
if($this->config->item('redirect_view_message_url') != '')
|
||||
$href = $this->config->item('message_server').$this->config->item('redirect_view_message_url').$token;
|
||||
else
|
||||
$href = '';
|
||||
|
||||
$data = array (
|
||||
'sender_id' => $sender_id,
|
||||
'sender' => getData($sender)[0],
|
||||
'message' => getData($msg)[0],
|
||||
'isEmployee' => hasData($isEmployee),
|
||||
'href' => $href
|
||||
);
|
||||
|
||||
$this->load->view('system/messages/messageHTML.php', $data);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* write the reply
|
||||
*/
|
||||
public function writeReply()
|
||||
{
|
||||
$token = $this->input->get('token');
|
||||
|
||||
if (isEmptyString($token))
|
||||
{
|
||||
show_error('No token supplied');
|
||||
}
|
||||
|
||||
$msg = null;
|
||||
|
||||
// Get message data if possible
|
||||
$msg = $this->MessageTokenModel->getMessageByToken($token);
|
||||
if (!hasData($msg))
|
||||
{
|
||||
show_error('No message found');
|
||||
}
|
||||
|
||||
$msg = getData($msg)[0];
|
||||
|
||||
// Get variables
|
||||
$receiverData = $this->MessageTokenModel->getPersonData($msg->sender_id);
|
||||
if (!hasData($receiverData))
|
||||
{
|
||||
show_error('No sender found');
|
||||
}
|
||||
|
||||
$data = array (
|
||||
'receivers' => getData($receiverData),
|
||||
'message' => $msg,
|
||||
'token' => $token
|
||||
);
|
||||
|
||||
$this->load->view('system/messages/messageWriteReply', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a reply
|
||||
*/
|
||||
public function sendReply()
|
||||
{
|
||||
$subject = $this->input->post('subject');
|
||||
$body = $this->input->post('body');
|
||||
$persons = $this->input->post('persons');
|
||||
$relationmessage_id = $this->input->post('relationmessage_id');
|
||||
$token = $this->input->post('token');
|
||||
|
||||
if (!isset($relationmessage_id) || $relationmessage_id == '' || !isset($token) || $token == '')
|
||||
{
|
||||
show_error('Error while sending reply');
|
||||
}
|
||||
|
||||
$sendReply = $this->CLMessagesModel->sendReply($subject, $body, $persons, $relationmessage_id, $token);
|
||||
if (isError($sendReply))
|
||||
{
|
||||
show_error(getError($sendReply));
|
||||
}
|
||||
|
||||
$this->load->view('system/messages/messageReplySent');
|
||||
}
|
||||
}
|
||||
@@ -144,26 +144,26 @@ class Message extends API_Controller
|
||||
*/
|
||||
public function postMessage()
|
||||
{
|
||||
$validation = $this->_validatePostMessage($this->post());
|
||||
$postMessage = $this->_validatePostMessage($this->post());
|
||||
|
||||
if (isSuccess($validation))
|
||||
if (isSuccess($postMessage))
|
||||
{
|
||||
$result = $this->messagelib->sendMessage(
|
||||
isset($this->post()['person_id']) ? $this->post()['person_id'] : null,
|
||||
isset($this->post()['receiver_id']) ? $this->post()['receiver_id'] : null,
|
||||
$this->post()['subject'],
|
||||
$this->post()['body'],
|
||||
PRIORITY_NORMAL,
|
||||
isset($this->post()['relationmessage_id']) ? $this->post()['relationmessage_id'] : null,
|
||||
isset($this->post()['oe_kurzbz']) ? $this->post()['oe_kurzbz'] : null, // Sender organisation unit
|
||||
isset($this->post()['multiPartMime']) ? $this->post()['multiPartMime'] : true
|
||||
$result = $this->messagelib->sendMessageUser(
|
||||
$this->post()['receiver_id']), // receiverPersonId
|
||||
$this->post()['subject'], // subject
|
||||
$this->post()['body'], // body
|
||||
$this->post()['person_id']) ? $this->post()['person_id'] : null, // sender_id
|
||||
isset($this->post()['oe_kurzbz']) ? $this->post()['oe_kurzbz'] : null, // senderOU
|
||||
isset($this->post()['relationmessage_id']) ? $this->post()['relationmessage_id'] : null, // relationmessage_id
|
||||
MSG_PRIORITY_NORMAL, // priority
|
||||
isset($this->post()['multiPartMime']) ? $this->post()['multiPartMime'] : true // multiPartMime
|
||||
);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response($validation, REST_Controller::HTTP_OK);
|
||||
$this->response($postMessage, REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,26 +172,27 @@ class Message extends API_Controller
|
||||
*/
|
||||
public function postMessageVorlage()
|
||||
{
|
||||
$validation = $this->_validatePostMessageVorlage($this->post());
|
||||
$postMessage = $this->_validatePostMessageVorlage($this->post());
|
||||
|
||||
if (isSuccess($validation))
|
||||
if (isSuccess($postMessage))
|
||||
{
|
||||
$result = $this->messagelib->sendMessageVorlage(
|
||||
isset($this->post()['sender_id']) ? $this->post()['sender_id'] : null,
|
||||
isset($this->post()['receiver_id']) ? $this->post()['receiver_id'] : null,
|
||||
$this->post()['vorlage_kurzbz'],
|
||||
isset($this->post()['oe_kurzbz']) ? $this->post()['oe_kurzbz'] : null, // Sender organisation unit
|
||||
$this->post()['data'],
|
||||
isset($this->post()['relationmessage_id']) ? $this->post()['relationmessage_id'] : null,
|
||||
isset($this->post()['orgform_kurzbz']) ? $this->post()['orgform_kurzbz'] : null,
|
||||
isset($this->post()['multiPartMime']) ? $this->post()['multiPartMime'] : true
|
||||
$result = $this->messagelib->sendMessageUserTemplate(
|
||||
isset($this->post()['receiver_id']) ? $this->post()['receiver_id'] : null, // receiversPersonId
|
||||
$this->post()['vorlage_kurzbz'], // vorlage
|
||||
$this->post()['data'], // parseData
|
||||
isset($this->post()['orgform_kurzbz']) ? $this->post()['orgform_kurzbz'] : null, // orgform
|
||||
isset($this->post()['sender_id']) ? $this->post()['sender_id'] : null, // sender_id
|
||||
isset($this->post()['oe_kurzbz']) ? $this->post()['oe_kurzbz'] : null, // senderOU
|
||||
isset($this->post()['relationmessage_id']) ? $this->post()['relationmessage_id'] : null, // relationmessage_id
|
||||
MSG_PRIORITY_NORMAL, // priority
|
||||
isset($this->post()['multiPartMime']) ? $this->post()['multiPartMime'] : true // multiPartMime
|
||||
);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response($validation, REST_Controller::HTTP_OK);
|
||||
$this->response($postMessage, REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,26 +221,26 @@ class Message extends API_Controller
|
||||
/**
|
||||
* _validatePostMessage
|
||||
*/
|
||||
private function _validatePostMessage($message = null)
|
||||
private function _validatePostMessage($post = null)
|
||||
{
|
||||
if (!isset($message))
|
||||
if (!isset($post))
|
||||
{
|
||||
return error('Parameter is null');
|
||||
}
|
||||
if (!isset($message['subject']))
|
||||
if (!isset($post['subject']))
|
||||
{
|
||||
return error('subject is not set');
|
||||
}
|
||||
if( !isset($message['body']))
|
||||
if (!isset($post['body']))
|
||||
{
|
||||
return error('body is not set');
|
||||
}
|
||||
if (!isset($message['receiver_id']) && !isset($message['oe_kurzbz']))
|
||||
if (!isset($post['receiver_id']))
|
||||
{
|
||||
return error('If a receiver_id is not given a oe_kurzbz must be specified');
|
||||
return error('receiver_id is not set');
|
||||
}
|
||||
|
||||
return success('Input data are valid');
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
if (!defined("BASEPATH")) exit("No direct script access allowed");
|
||||
|
||||
class MailJob extends JOB_Controller
|
||||
{
|
||||
/**
|
||||
* API constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Loads MessageLib
|
||||
$this->load->library('MessageLib');
|
||||
}
|
||||
|
||||
/**
|
||||
* Send all the NOT sent notice emails for messaging system
|
||||
* The parameters are all not mandatory, they could be used to overrides the configs for testing, debug or one shot purposes
|
||||
*/
|
||||
public function sendAllMessageEmailNotices($since = '1970-01-01', $numberToSent = null, $numberPerTimeRange = null, $emailTimeRange = null, $emailFromSystem = null)
|
||||
{
|
||||
$this->logInfo('Send all message email notices started');
|
||||
|
||||
// Send them all!
|
||||
$sendAllEmailNotices = $this->messagelib->sendAllEmailNotices($since, $numberToSent, $numberPerTimeRange, $emailTimeRange, $emailFromSystem);
|
||||
|
||||
if (isError($sendAllEmailNotices))
|
||||
{
|
||||
$optionalParameters = new stdClass();
|
||||
$optionalParameters->$since = $since;
|
||||
$optionalParameters->$numberToSent = $numberToSent;
|
||||
$optionalParameters->$numberPerTimeRange = $numberPerTimeRange;
|
||||
$optionalParameters->$emailTimeRange = $emailTimeRange;
|
||||
$optionalParameters->$emailFromSystem = $emailFromSystem;
|
||||
|
||||
$this->logError($sendAllEmailNotices->retval, $optionalParameters);
|
||||
}
|
||||
elseif (!hasData($sendAllEmailNotices))
|
||||
{
|
||||
$this->logInfo('There were no unsent messages');
|
||||
}
|
||||
|
||||
$this->logInfo('Send all message email notices ended');
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,191 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class FASMessages extends Auth_Controller
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(
|
||||
array(
|
||||
'write' => 'basis/message:rw',
|
||||
'writeReply' => 'basis/message:rw'
|
||||
)
|
||||
);
|
||||
|
||||
// Loads the message library
|
||||
$this->load->library('MessageLib');
|
||||
|
||||
// Loads the widget library
|
||||
$this->load->library('WidgetLib');
|
||||
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
'global',
|
||||
'ui'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Write a new message
|
||||
*/
|
||||
public function write($sender_id)
|
||||
{
|
||||
$prestudent_id = $this->input->post('prestudent_id'); // recipients prestudend_id(s)
|
||||
|
||||
if (!is_numeric($sender_id))
|
||||
{
|
||||
show_error('The current logged user person_id is not defined');
|
||||
}
|
||||
|
||||
$msgVarsData = $this->_getMsgVarsData($prestudent_id);
|
||||
|
||||
// Retrieves message vars for a person from view view vw_msg_vars_person
|
||||
$variablesArray = $this->_getMessageVarsPerson();
|
||||
|
||||
// Organisation units used to get the templates
|
||||
$oe_kurzbz = $this->_getOeKurzbz($sender_id);
|
||||
|
||||
// Admin or commoner?
|
||||
$isAdmin = $this->_getIsAdmin($sender_id);
|
||||
|
||||
$data = array(
|
||||
'recipients' => getData($msgVarsData),
|
||||
'variables' => $variablesArray,
|
||||
'oe_kurzbz' => $oe_kurzbz, // used to get the templates
|
||||
'isAdmin' => $isAdmin
|
||||
);
|
||||
|
||||
$this->load->view('system/messages/messageWrite', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Write a reply
|
||||
*/
|
||||
public function writeReply($sender_id, $msg_id, $receiver_id)
|
||||
{
|
||||
$prestudent_id = $this->input->post('prestudent_id'); // recipients prestudend_id(s)
|
||||
|
||||
if (!is_numeric($sender_id))
|
||||
{
|
||||
show_error('The current logged user person_id is not defined');
|
||||
}
|
||||
|
||||
if (!is_numeric($msg_id))
|
||||
{
|
||||
show_error('The msg_id must be a number');
|
||||
}
|
||||
|
||||
if (!is_numeric($receiver_id))
|
||||
{
|
||||
show_error('The receiver_id must be a number');
|
||||
}
|
||||
|
||||
$msg = $this->_getMessage($msg_id, $receiver_id);
|
||||
|
||||
$msgVarsData = $this->_getMsgVarsData($prestudent_id);
|
||||
|
||||
// Retrieves message vars for a person from view view vw_msg_vars_person
|
||||
$variablesArray = $this->_getMessageVarsPerson();
|
||||
|
||||
// Organisation units used to get the templates
|
||||
$oe_kurzbz = $this->_getOeKurzbz($sender_id);
|
||||
|
||||
// Admin or commoner?
|
||||
$isAdmin = $this->_getIsAdmin($sender_id);
|
||||
|
||||
$data = array(
|
||||
'recipients' => getData($msgVarsData),
|
||||
'message' => $msg,
|
||||
'variables' => $variablesArray,
|
||||
'oe_kurzbz' => $oe_kurzbz, // used to get the templates
|
||||
'isAdmin' => $isAdmin
|
||||
);
|
||||
|
||||
$this->load->view('system/messages/messageWrite', $data);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function _getMessage($msg_id, $receiver_id)
|
||||
{
|
||||
$msg = $this->messagelib->getMessage($msg_id, $receiver_id);
|
||||
if (isError($msg))
|
||||
{
|
||||
show_error(getError($msg));
|
||||
}
|
||||
elseif (!hasData($msg))
|
||||
{
|
||||
show_error('The selected message does not exist');
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg = getData($msg)[0];
|
||||
}
|
||||
|
||||
return $msg;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves message vars from view vw_msg_vars
|
||||
*/
|
||||
private function _getMsgVarsData($prestudent_id)
|
||||
{
|
||||
$this->load->model('system/Message_model', 'MessageModel');
|
||||
$msgVarsData = $this->MessageModel->getMsgVarsDataByPrestudentId($prestudent_id);
|
||||
|
||||
if (isError($msgVarsData))
|
||||
{
|
||||
show_error(getError($msgVarsData));
|
||||
}
|
||||
|
||||
return $msgVarsData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method to call messagelib->getMessageVarsPerson
|
||||
*/
|
||||
private function _getMessageVarsPerson()
|
||||
{
|
||||
$variables = $this->messagelib->getMessageVarsPerson();
|
||||
|
||||
if (isError($variables)) show_error(getError($variables));
|
||||
|
||||
return getData($variables);
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method to call messagelib->getOeKurzbz
|
||||
*/
|
||||
private function _getOeKurzbz($sender_id)
|
||||
{
|
||||
$oe_kurzbz = $this->messagelib->getOeKurzbz($sender_id);
|
||||
|
||||
if (isError($oe_kurzbz)) show_error(getError($oe_kurzbz));
|
||||
|
||||
return getData($oe_kurzbz);
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method to call messagelib->getIsAdmin
|
||||
*/
|
||||
private function _getIsAdmin($sender_id)
|
||||
{
|
||||
$isAdmin = $this->messagelib->getIsAdmin($sender_id);
|
||||
|
||||
if (isError($isAdmin)) show_error(getError($isAdmin));
|
||||
|
||||
return getData($isAdmin);
|
||||
}
|
||||
}
|
||||
@@ -1,210 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Messages extends Auth_Controller
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(
|
||||
array(
|
||||
'write' => array('basis/message:rw', 'infocenter:rw'),
|
||||
'send' => array('basis/message:rw', 'infocenter:rw'),
|
||||
'sendJson' => array('basis/message:rw', 'infocenter:rw'),
|
||||
'getVorlage' => array('basis/message:r', 'infocenter:r'),
|
||||
'parseMessageText' => array('basis/message:r', 'infocenter:r'),
|
||||
'getMessageFromIds' => array('basis/message:r', 'infocenter:r')
|
||||
)
|
||||
);
|
||||
|
||||
// Loads the message library
|
||||
$this->load->library('MessageLib');
|
||||
|
||||
// Loads the widget library
|
||||
$this->load->library('WidgetLib');
|
||||
|
||||
$this->load->model('system/Message_model', 'MessageModel');
|
||||
$this->load->model('CL/Messages_model', 'CLMessagesModel');
|
||||
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
'global',
|
||||
'ui'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Write a new message
|
||||
*/
|
||||
public function write()
|
||||
{
|
||||
$person_id = $this->input->post('person_id');
|
||||
$sender_id = null;
|
||||
|
||||
$authUser = $this->CLMessagesModel->getAuthUser();
|
||||
if (isError($authUser))
|
||||
{
|
||||
show_error(getError($authUser));
|
||||
}
|
||||
else
|
||||
{
|
||||
$sender_id = getData($authUser)[0]->person_id;
|
||||
}
|
||||
|
||||
$msgVarsData = $this->MessageModel->getMsgVarsDataByPersonId($person_id);
|
||||
if (isError($msgVarsData)) show_error(getError($msgVarsData));
|
||||
|
||||
// Retrieves message vars for a person from view view vw_msg_vars_person
|
||||
$variables = $this->messagelib->getMessageVarsPerson();
|
||||
if (isError($variables)) show_error(getError($variables));
|
||||
|
||||
// Organisation units used to get the templates
|
||||
$oe_kurzbz = $this->messagelib->getOeKurzbz($sender_id);
|
||||
if (isError($oe_kurzbz)) show_error(getError($oe_kurzbz));
|
||||
|
||||
// Admin or commoner?
|
||||
$isAdmin = $this->messagelib->getIsAdmin($sender_id);
|
||||
if (isError($isAdmin)) show_error(getError($isAdmin));
|
||||
|
||||
$data = array (
|
||||
'recipients' => getData($msgVarsData),
|
||||
'variables' => getData($variables),
|
||||
'oe_kurzbz' => getData($oe_kurzbz), // used to get the templates
|
||||
'isAdmin' => getData($isAdmin)
|
||||
);
|
||||
|
||||
$this->load->view('system/messages/messageWrite', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send message
|
||||
*/
|
||||
public function send()
|
||||
{
|
||||
$persons = $this->input->post('persons');
|
||||
$relationmessage_id = $this->input->post('relationmessage_id');
|
||||
|
||||
$msgVarsData = $this->MessageModel->getMsgVarsDataByPersonId($persons);
|
||||
|
||||
$send = $this->CLMessagesModel->send($msgVarsData, $relationmessage_id);
|
||||
|
||||
$this->load->view('system/messages/messageSent', array('success' => isSuccess($send)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Send message, response is in JSON format
|
||||
*/
|
||||
public function sendJson()
|
||||
{
|
||||
$prestudents = $this->input->post('prestudents');
|
||||
$vorlage_kurzbz = $this->input->post('vorlage_kurzbz');
|
||||
$oe_kurzbz = $this->input->post('oe_kurzbz');
|
||||
$msgVars = $this->input->post('msgvars');
|
||||
|
||||
$msgVarsData = $this->MessageModel->getMsgVarsDataByPrestudentId($prestudents);
|
||||
|
||||
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||
$prestudentsData = $this->PrestudentModel->getOrganisationunits($prestudents);
|
||||
|
||||
// Adds the organisation unit to each prestudent
|
||||
if (isEmptyString($oe_kurzbz) && hasData($msgVarsData) && hasData($prestudentsData))
|
||||
{
|
||||
$this->CLMessagesModel->addOeToPrestudents($msgVarsData, $prestudentsData);
|
||||
}
|
||||
|
||||
$send = $this->CLMessagesModel->send($msgVarsData, null, $oe_kurzbz, $vorlage_kurzbz, $msgVars);
|
||||
if (isError($send))
|
||||
{
|
||||
$this->outputJsonError(getError($send));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->outputJsonSuccess(getData($send));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* getVorlage
|
||||
*/
|
||||
public function getVorlage()
|
||||
{
|
||||
$vorlage_kurzbz = $this->input->get('vorlage_kurzbz');
|
||||
$result = null;
|
||||
|
||||
if (!isEmptyString($vorlage_kurzbz))
|
||||
{
|
||||
$this->load->model('system/Vorlagestudiengang_model', 'VorlagestudiengangModel');
|
||||
$this->VorlagestudiengangModel->addOrder('version','DESC');
|
||||
|
||||
$result = $this->VorlagestudiengangModel->loadWhere(array('vorlage_kurzbz' => $vorlage_kurzbz));
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = error('The given vorlage_kurzbz is not valid');
|
||||
}
|
||||
|
||||
if (isError($result) || !hasData($result))
|
||||
{
|
||||
$this->outputJsonError(getError($result));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->outputJsonSuccess(getData($result));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* parseMessageText
|
||||
*/
|
||||
public function parseMessageText()
|
||||
{
|
||||
$person_id = $this->input->get('person_id');
|
||||
$text = $this->input->get('text');
|
||||
$parsedText = '';
|
||||
$data = null;
|
||||
|
||||
if (is_numeric($person_id))
|
||||
{
|
||||
$data = $this->MessageModel->getMsgVarsDataByPersonId($person_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$data = error('The given person_id is not a valid number');
|
||||
}
|
||||
|
||||
if (isError($data) || !hasData($data))
|
||||
{
|
||||
$this->outputJsonError(getError($data));
|
||||
}
|
||||
else
|
||||
{
|
||||
$parsedText = $this->messagelib->parseMessageText($text, $this->CLMessagesModel->replaceKeys((array)getData($data)[0]));
|
||||
|
||||
$this->outputJsonSuccess($parsedText);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs message data for a message (identified my msg id and receiver id) in JSON format
|
||||
* @param $msg_id
|
||||
* @param $receiver_id
|
||||
*/
|
||||
public function getMessageFromIds()
|
||||
{
|
||||
$msg_id = $this->input->get('msg_id');
|
||||
$receiver_id = $this->input->get('receiver_id');
|
||||
|
||||
$msg = $this->messagelib->getMessage($msg_id, $receiver_id);
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode(array(getData($msg)[0])));
|
||||
}
|
||||
}
|
||||
@@ -269,7 +269,7 @@ class Vorlage extends Auth_Controller
|
||||
show_error(getError($vorlagetext));
|
||||
|
||||
$data = array(
|
||||
'text' => $this->vorlagelib->parseVorlagetext($vorlagetext->retval[0]->text, $jsonDecodedForm)
|
||||
'text' => parseText($vorlagetext->retval[0]->text, $jsonDecodedForm)
|
||||
);
|
||||
|
||||
$this->load->view('system/vorlage/templatetextPreview', $data);
|
||||
|
||||
@@ -69,6 +69,7 @@ class InfoCenter extends Auth_Controller
|
||||
// Name of Interessentenstatus
|
||||
const INTERESSENTSTATUS = 'Interessent';
|
||||
const ABGEWIESENERSTATUS = 'Abgewiesener';
|
||||
const BEWERBERSTATUS = 'Bewerber';
|
||||
|
||||
// Statusgruende for which no Studiengangsfreigabemessage should be sent
|
||||
private $_statusgruendeNoStgFreigabeMessage = array('FIT Programm', 'FIT program', 'FIT programme');
|
||||
@@ -493,7 +494,9 @@ class InfoCenter extends Auth_Controller
|
||||
|
||||
$logdata = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id);
|
||||
|
||||
$akteresult = $this->AkteModel->loadWhere(array('person_id' => $logdata['person_id'], 'formal_geprueft_amum !=' => NULL));
|
||||
$person_id = $logdata['person_id'];
|
||||
|
||||
$akteresult = $this->AkteModel->loadWhere(array('person_id' => $person_id, 'formal_geprueft_amum !=' => NULL));
|
||||
|
||||
if (hasData($lastStatus) && isSuccess($akteresult))
|
||||
{
|
||||
@@ -529,6 +532,8 @@ class InfoCenter extends Auth_Controller
|
||||
if (isSuccess($result))
|
||||
{
|
||||
$this->load->model('crm/Dokumentprestudent_model', 'DokumentprestudentModel');
|
||||
$json->retval['nonCriticalErrors'] = array();
|
||||
$json->retval['infoMessages'] = array();
|
||||
|
||||
//set documents which have been formal geprüft to accepted
|
||||
$dokument_kurzbzs = array();
|
||||
@@ -542,7 +547,7 @@ class InfoCenter extends Auth_Controller
|
||||
|
||||
// acceptresult returns null if no documents to accept
|
||||
if ($acceptresult !== null && isError($acceptresult))
|
||||
$json->retval['nonCriticalErrors'] = 'error when accepting documents in FAS';
|
||||
$json->retval['nonCriticalErrors'][] = 'error when accepting documents in FAS';
|
||||
|
||||
$logparams = array($prestudent_id, $logdata['studiengang_kurzbz'], '');
|
||||
|
||||
@@ -554,8 +559,69 @@ class InfoCenter extends Auth_Controller
|
||||
if (hasData($statusgrund_kurzbz))
|
||||
$logparams[2] = ', confirmation type '.$statusgrund_kurzbz->retval[0]->bezeichnung_mehrsprachig[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
// check if there is already a Bewerberstatus and Reihungsverfahren already absolviert
|
||||
$bewerber = $this->PersonModel->hasBewerber($person_id, $lastStatus->studiensemester_kurzbz, 'b');
|
||||
|
||||
$this->_log($logdata['person_id'], 'freigegeben', $logparams);
|
||||
if (hasData($bewerber))
|
||||
{
|
||||
$bewerbercnt = getData($bewerber);
|
||||
|
||||
if (is_numeric($bewerbercnt[0]->anzahl_bewerber) && $bewerbercnt[0]->anzahl_bewerber > 0)
|
||||
{
|
||||
// then insert Bewerberstatus and rt absolviert, teilgenommen for prestudent
|
||||
$bewerberresult = $this->PrestudentstatusModel->insert(
|
||||
array(
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'status_kurzbz' => self::BEWERBERSTATUS,
|
||||
'studiensemester_kurzbz' => $lastStatus->studiensemester_kurzbz,
|
||||
'ausbildungssemester' => $lastStatus->ausbildungssemester,
|
||||
'datum' => date('Y-m-d'),
|
||||
'orgform_kurzbz' => $lastStatus->orgform_kurzbz,
|
||||
'studienplan_id' => $lastStatus->studienplan_id,
|
||||
'insertvon' => $this->_uid,
|
||||
'insertamum' => date('Y-m-d H:i:s')
|
||||
)
|
||||
);
|
||||
|
||||
if (isError($bewerberresult))
|
||||
$json->retval['nonCriticalErrors'][] = 'error when inserting Bewerberstatus';
|
||||
|
||||
$rtangetretenres = $this->PrestudentModel->update(
|
||||
$prestudent_id,
|
||||
array(
|
||||
'reihungstestangetreten' => true
|
||||
)
|
||||
);
|
||||
|
||||
if (isError($rtangetretenres))
|
||||
{
|
||||
$json->retval['nonCriticalErrors'][] = 'error when setting reihungstestangetreten';
|
||||
}
|
||||
else
|
||||
{
|
||||
$json->retval['infoMessages'][] = $this->p->t('infocenter', 'rtPunkteEintragenInfo');
|
||||
$this->load->model('crm/RtPerson_model', 'RtPersonModel');
|
||||
|
||||
$rtteilgenommenres = $this->RtPersonModel->update(
|
||||
array(
|
||||
'person_id' => $person_id,
|
||||
'studienplan_id' => $lastStatus->studienplan_id
|
||||
),
|
||||
array(
|
||||
'teilgenommen' => true
|
||||
)
|
||||
);
|
||||
|
||||
if (isError($rtteilgenommenres))
|
||||
$json->retval['nonCriticalErrors'][] = 'error when setting reihungstest teilgenommen';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->_log($person_id, 'freigegeben', $logparams);
|
||||
|
||||
$this->_sendFreigabeMail($prestudent_id);
|
||||
}
|
||||
@@ -649,7 +715,7 @@ class InfoCenter extends Auth_Controller
|
||||
public function reloadMessages($person_id)
|
||||
{
|
||||
$messages = $this->MessageModel->getMessagesOfPerson($person_id, 1);
|
||||
$this->load->view('system/messages/messageList.php', array('messages' => $messages->retval));
|
||||
$this->load->view('system/infocenter/messageList.php', array('messages' => $messages->retval));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1496,7 +1562,7 @@ class InfoCenter extends Auth_Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends infomail with prestudent and person data when Prestudent is freigegeben
|
||||
* Sends infomail to Studiengang with prestudent and person data when Prestudent is freigegeben
|
||||
* @param $prestudent_id
|
||||
*/
|
||||
private function _sendFreigabeMail($prestudent_id)
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class FASMessages extends Auth_Controller
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(
|
||||
array(
|
||||
'writeTemplate' => 'basis/message:rw',
|
||||
'writeReplyTemplate' => 'basis/message:rw'
|
||||
)
|
||||
);
|
||||
|
||||
// Loads model CLMessagesModel which contains the GUI logic
|
||||
$this->load->model('CL/Messages_model', 'CLMessagesModel');
|
||||
|
||||
// Phrases used in loaded views
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
'global',
|
||||
'ui'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a new message to a prestudent using templates
|
||||
*/
|
||||
public function writeTemplate()
|
||||
{
|
||||
$prestudents = $this->input->post('prestudent_id'); // recipients prestudend_id(s)
|
||||
|
||||
// Loads the view to write a new message with a template
|
||||
$this->load->view(
|
||||
'system/messages/htmlWriteTemplate',
|
||||
$this->CLMessagesModel->prepareHtmlWriteTemplatePrestudents($prestudents)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a reply to a message identified by parameters $message_id and $recipient_id
|
||||
* The recipient is a prestudent
|
||||
* Uses templates
|
||||
*/
|
||||
public function writeReplyTemplate($message_id, $recipient_id)
|
||||
{
|
||||
$prestudents = $this->input->post('prestudent_id'); // recipients prestudend_id(s)
|
||||
|
||||
// Loads the view to write a new message with a template
|
||||
$this->load->view(
|
||||
'system/messages/htmlWriteTemplate',
|
||||
$this->CLMessagesModel->prepareHtmlWriteTemplatePrestudents($prestudents, $message_id, $recipient_id)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* NOTE: MessageClient extends FHC_Controller and NOT Auth_Controller to be able to use
|
||||
* the authentication system without the need to load the permissions system
|
||||
*/
|
||||
class MessageClient extends FHC_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Loads authentication library and starts authentication
|
||||
// NOTE: it is loaded here because the controller extends FHC_Controller and NOT Auth_Controller
|
||||
$this->load->library('AuthLib');
|
||||
|
||||
// Loads model CLMessagesModel which contains the GUI logic
|
||||
$this->load->model('CL/Messages_model', 'CLMessagesModel');
|
||||
|
||||
// Phrases used in loaded views
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
'global',
|
||||
'ui'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the GUI used to read all the personal messages
|
||||
*/
|
||||
public function read()
|
||||
{
|
||||
// Loads the view to read messages
|
||||
$this->load->view('system/messages/ajaxRead');
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the GUI used to write a personal message to an organisation unit
|
||||
*/
|
||||
public function write()
|
||||
{
|
||||
// Loads the view to write a message
|
||||
$this->load->view('system/messages/ajaxWrite', $this->CLMessagesModel->prepareAjaxWrite());
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the GUI used to reply to a received personal message
|
||||
*/
|
||||
public function writeReply()
|
||||
{
|
||||
$token = $this->input->get('token');
|
||||
|
||||
// Loads the view to reply to a message
|
||||
$this->load->view('system/messages/ajaxWriteReply', $this->CLMessagesModel->prepareAjaxWriteReply($token));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns JSON that that contains all the received messages by the currently logged user
|
||||
*/
|
||||
public function listReceivedMessages()
|
||||
{
|
||||
$this->outputJson($this->CLMessagesModel->prepareAjaxReadReceived());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns JSON that that contains all the sent messages by the currently logged user
|
||||
*/
|
||||
public function listSentMessages()
|
||||
{
|
||||
$this->outputJson($this->CLMessagesModel->prepareAjaxReadSent());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a message to an organisation unit
|
||||
*/
|
||||
public function sendMessageToOU()
|
||||
{
|
||||
$receiverOU = $this->input->post('receiverOU');
|
||||
$subject = $this->input->post('subject');
|
||||
$body = $this->input->post('body');
|
||||
|
||||
$this->outputJson($this->CLMessagesModel->sendToOrganisationUnit($receiverOU, $subject, $body));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a message to an organisation unit
|
||||
*/
|
||||
public function sendMessageReply()
|
||||
{
|
||||
$receiver_id = $this->input->post('receiver_id');
|
||||
$relationmessage_id = $this->input->post('relationmessage_id');
|
||||
$token = $this->input->post('token');
|
||||
$subject = $this->input->post('subject');
|
||||
$body = $this->input->post('body');
|
||||
|
||||
$this->outputJson($this->CLMessagesModel->sendReply($receiver_id, $subject, $body, $relationmessage_id, $token));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a message as read
|
||||
*/
|
||||
public function setMessageRead()
|
||||
{
|
||||
$message_id = $this->input->post('message_id');
|
||||
$statusPersonId = $this->input->post('statusPersonId');
|
||||
|
||||
$this->outputJson($this->CLMessagesModel->setMessageRead($message_id, $statusPersonId));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Messages extends Auth_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(
|
||||
array(
|
||||
'writeTemplate' => array('basis/message:rw', 'infocenter:rw'),
|
||||
'sendImplicitTemplate' => array('basis/message:rw', 'infocenter:rw'),
|
||||
'sendExplicitTemplateJson' => array('basis/message:rw', 'infocenter:rw'),
|
||||
'getVorlage' => array('basis/message:r', 'infocenter:r'),
|
||||
'parseMessageText' => array('basis/message:r', 'infocenter:r'),
|
||||
'getMessageFromIds' => array('basis/message:r', 'infocenter:r')
|
||||
)
|
||||
);
|
||||
|
||||
// Loads model CLMessagesModel which contains the GUI logic
|
||||
$this->load->model('CL/Messages_model', 'CLMessagesModel');
|
||||
|
||||
// Phrases used in loaded views
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
'global',
|
||||
'ui'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Methods with HTML output
|
||||
|
||||
/**
|
||||
* Initialize all the parameters used by view system/messages/htmlWriteTemplate
|
||||
* to build a GUI used to write a messate to user/s using a template
|
||||
*/
|
||||
public function writeTemplate()
|
||||
{
|
||||
$persons = $this->input->post('person_id');
|
||||
|
||||
// Loads the view to write a new message with a template
|
||||
$this->load->view(
|
||||
'system/messages/htmlWriteTemplate',
|
||||
$this->CLMessagesModel->prepareHtmlWriteTemplatePersons($persons)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a new message or reply to user/s
|
||||
* If a relationmessage_id this message is a reply to another one
|
||||
* Body is a template and will be parsed using information present in persons parameter
|
||||
*/
|
||||
public function sendImplicitTemplate()
|
||||
{
|
||||
$subject = $this->input->post('subject');
|
||||
$body = $this->input->post('body');
|
||||
$recipients_ids = $this->input->post('recipients_ids');
|
||||
$relationmessage_id = $this->input->post('relationmessage_id');
|
||||
$type = $this->input->post('type');
|
||||
|
||||
$sendImplicitTemplate = $this->CLMessagesModel->sendImplicitTemplate($type, $recipients_ids, $subject, $body, $relationmessage_id);
|
||||
if (isSuccess($sendImplicitTemplate))
|
||||
{
|
||||
$this->load->view('system/messages/htmlMessageSentSuccess');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->load->view('system/messages/htmlMessageSentError');
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Methods with JSON output called by this controller and FASMessages (view system/messages/htmlWriteTemplate)
|
||||
|
||||
/**
|
||||
* Returns an object that represent a template store in database
|
||||
* If no templates are found with the given parameter or the given parameter is an empty string,
|
||||
* then an error is returned
|
||||
*/
|
||||
public function getVorlage()
|
||||
{
|
||||
$vorlage_kurzbz = $this->input->get('vorlage_kurzbz');
|
||||
|
||||
$this->outputJson($this->CLMessagesModel->getVorlage($vorlage_kurzbz));
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse the given given text using data from the given user
|
||||
* Use the CI parser which performs simple text substitution for pseudo-variable
|
||||
*/
|
||||
public function parseMessageText()
|
||||
{
|
||||
$receiver_id = $this->input->get('receiver_id');
|
||||
$text = $this->input->get('text');
|
||||
$type = $this->input->get('type');
|
||||
|
||||
if ($type == Messages_model::TYPE_PERSONS)
|
||||
{
|
||||
$this->outputJson($this->CLMessagesModel->parseMessageTextPerson($receiver_id, $text));
|
||||
}
|
||||
elseif ($type == Messages_model::TYPE_PRESTUDENTS)
|
||||
{
|
||||
$this->outputJson($this->CLMessagesModel->parseMessageTextPrestudent($receiver_id, $text));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->outputJsonError('Not a person nor a prestudent was provided');
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Methods with JSON output called by infocenter
|
||||
|
||||
/**
|
||||
* Outputs message data for a message (identified my msg id and receiver id) in JSON format
|
||||
*/
|
||||
public function getMessageFromIds()
|
||||
{
|
||||
$message_id = $this->input->get('msg_id');
|
||||
$receiver_id = $this->input->get('receiver_id');
|
||||
|
||||
$this->outputJson($this->CLMessagesModel->getMessageFromIds($message_id, $receiver_id));
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a new message
|
||||
* - The recipients are prestudents
|
||||
* - An email template with message var may be provided
|
||||
* - A global organisation unit may be provided, otherwise is used the prestudent one
|
||||
* - A template is explicitly specified
|
||||
*/
|
||||
public function sendExplicitTemplateJson()
|
||||
{
|
||||
$prestudents = $this->input->post('prestudents');
|
||||
$oe_kurzbz = $this->input->post('oe_kurzbz');
|
||||
$vorlage_kurzbz = $this->input->post('vorlage_kurzbz');
|
||||
$msgVars = $this->input->post('msgvars');
|
||||
|
||||
$sendExplicitTemplate = $this->CLMessagesModel->sendExplicitTemplate($prestudents, $oe_kurzbz, $vorlage_kurzbz, $msgVars);
|
||||
$this->outputJson(getData($sendExplicitTemplate));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Handles sending messages with token
|
||||
* NOTE: it extends FHC_Controller instead of Auth_Controller because authentication is not needed
|
||||
*/
|
||||
class ViewMessage extends FHC_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Loading config file message
|
||||
$this->config->load('message');
|
||||
|
||||
// Load model MessageToken_model, not calling the authentication system
|
||||
$this->load->model('CL/Messages_model', 'CLMessagesModel');
|
||||
|
||||
// Phrases used in loaded views
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
'global',
|
||||
'ui'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a message in read mode only using the specified token
|
||||
*/
|
||||
public function toHTML($token)
|
||||
{
|
||||
// Loads the view to read a received message using its token as identifier
|
||||
$this->load->view('system/messages/htmlRead', $this->CLMessagesModel->prepareHtmlRead($token));
|
||||
}
|
||||
|
||||
/**
|
||||
* Write a reply message to a received one using its token as identifier
|
||||
*/
|
||||
public function writeReply()
|
||||
{
|
||||
$token = $this->input->get('token'); // gets received message token
|
||||
|
||||
// Loads the view to write a reply message
|
||||
$this->load->view('system/messages/htmlWriteReply', $this->CLMessagesModel->prepareHtmlWriteReply($token));
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a reply message (no templates are used)
|
||||
*/
|
||||
public function sendReply()
|
||||
{
|
||||
$subject = $this->input->post('subject');
|
||||
$body = $this->input->post('body');
|
||||
$receiver_id = $this->input->post('receiver_id');
|
||||
$relationmessage_id = $this->input->post('relationmessage_id');
|
||||
$token = $this->input->post('token');
|
||||
|
||||
$sendReply = $this->CLMessagesModel->sendReply($receiver_id, $subject, $body, $relationmessage_id, $token);
|
||||
if (isSuccess($sendReply))
|
||||
{
|
||||
$this->load->view('system/messages/htmlMessageSentSuccess');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->load->view('system/messages/htmlMessageSentError');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* With the given token redirects the user to reply page configured in the config/message.php file
|
||||
*/
|
||||
public function redirectByToken($token)
|
||||
{
|
||||
// Loads model MessageTokenModel
|
||||
$this->load->model('system/MessageToken_model', 'MessageTokenModel');
|
||||
|
||||
// Retrieves the single message data using the given token
|
||||
$msg = $this->MessageTokenModel->getMessageByToken($token);
|
||||
// If it is an error or it does not contain data show an error
|
||||
if (!hasData($msg)) show_error('MSG-ERR-0001: An error occurred while redirecting, please contact the administrator');
|
||||
// else
|
||||
$oe_kurzbz = getData($msg)[0]->oe_kurzbz;
|
||||
|
||||
$organisationRoot = null; // by default is null
|
||||
|
||||
// If an organisation unit is present in the message tries to retrieve the root organisation unit
|
||||
// from the one found in the message
|
||||
if (!isEmptyString($oe_kurzbz))
|
||||
{
|
||||
// Retrieves the root organisation unit from the one found in the message
|
||||
$getOERoot = $this->MessageTokenModel->getOERoot($oe_kurzbz);
|
||||
// If it is an error or it does not contain data show an error
|
||||
if (!hasData($getOERoot)) show_error('MSG-ERR-0002: An error occurred while redirecting, please contact the administrator');
|
||||
// else
|
||||
$organisationRoot = getData($getOERoot)[0]->oe_kurzbz;
|
||||
}
|
||||
|
||||
// Retrieves the possible redirecting URLs array from configs
|
||||
$messageRedirectUrls = $this->config->item('message_redirect_url');
|
||||
// If it is not a valid array then show an error
|
||||
if (isEmptyArray($messageRedirectUrls)) show_error('MSG-ERR-0003: An error occurred while redirecting, please contact the administrator');
|
||||
|
||||
// If this organisation unit root is not configured as an entry in the possible redirecting URLs array,
|
||||
// then tries to use the default one...
|
||||
if (!isset($messageRedirectUrls[$organisationRoot]))
|
||||
{
|
||||
$organisationRoot = 'fallback';
|
||||
|
||||
// ...if even the default one is not present show an error
|
||||
if (!isset($messageRedirectUrls[$organisationRoot]))
|
||||
{
|
||||
show_error('MSG-ERR-0004: An error occurred while redirecting, please contact the administrator');
|
||||
}
|
||||
}
|
||||
|
||||
// Finally if everything was right then the user can be redirected
|
||||
redirect($messageRedirectUrls[$organisationRoot] . '?token=' . $token);
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,6 @@ function getAuthPersonId()
|
||||
return isLogged() ? ($ci->authlib->getAuthObj())->{AuthLib::AO_PERSON_ID} : null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If the user is NOT logged then a null value is returned.
|
||||
* If the user is alredy logged, then it is possible to access to the authentication object
|
||||
|
||||
@@ -24,39 +24,54 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* generateToken() - generates a new token for diffent use
|
||||
* - reading Messages from external
|
||||
* - forgotten Password
|
||||
*
|
||||
* @return string
|
||||
* Generates a new token for diffent use cases. Default token length is 64
|
||||
* - Reading messages
|
||||
* - Forgotten password
|
||||
* - etc
|
||||
* Returns null on failure
|
||||
*/
|
||||
function generateToken($length = 64)
|
||||
{
|
||||
$token = null;
|
||||
$firstGeneratedToken = null;
|
||||
|
||||
// For PHP 7 you can use random_bytes()
|
||||
if (function_exists('random_bytes'))
|
||||
{
|
||||
$token = base64_encode(random_bytes($length));
|
||||
//base64 is about 33% longer, so we need to truncate the result
|
||||
return strtr(substr($token, 0, $length), '+/=', '-_,');
|
||||
try
|
||||
{
|
||||
$firstGeneratedToken = random_bytes($length); // try to generates cryptographically secure pseudo-random bytes...
|
||||
}
|
||||
catch (Exception $e) { $firstGeneratedToken = null; } // if fails $firstGeneratedToken is set to null
|
||||
}
|
||||
|
||||
// for PHP >=5.3 and <7
|
||||
if (function_exists('openssl_random_pseudo_bytes'))
|
||||
// For PHP >= 5.3 and < 7 and openssl is available
|
||||
elseif (function_exists('openssl_random_pseudo_bytes'))
|
||||
{
|
||||
$token = base64_encode(openssl_random_pseudo_bytes($length, $strong));
|
||||
// is the token strong enough?
|
||||
if($strong == true)
|
||||
return strtr(substr($token, 0, $length), '+/=', '-_,');
|
||||
$firstGeneratedToken = openssl_random_pseudo_bytes($length, $strong);
|
||||
// If the token generation ended with errors OR the generated token is NOT strong enough
|
||||
if ($firstGeneratedToken == false || $strong == false) $firstGeneratedToken = null; // $firstGeneratedToken is set to null
|
||||
}
|
||||
|
||||
//fallback to mt_rand if php < 5.3 or no openssl available
|
||||
$characters = '0123456789';
|
||||
$characters .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz/+';
|
||||
$charactersLength = strlen($characters)-1;
|
||||
$token = '';
|
||||
//select some random characters
|
||||
for ($i = 0; $i < $length; $i++)
|
||||
$token .= $characters[mt_rand(0, $charactersLength)];
|
||||
if ($firstGeneratedToken != null) // If everything was fine
|
||||
{
|
||||
// base64 is about 33% longer, so we need to truncate the result
|
||||
$token = strtr(substr(base64_encode($firstGeneratedToken), 0, $length), '+/=', '-_,');
|
||||
}
|
||||
|
||||
// Fallback to mt_rand if:
|
||||
// php < 5.3
|
||||
// OR no openssl is available
|
||||
// OR openssl_random_pseudo_bytes used an algorithm that is cryptographically NOT strong
|
||||
// OR one of the previous methods failed
|
||||
if ($token == null)
|
||||
{
|
||||
$token = ''; // set $token as an empty string
|
||||
$characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz/+';
|
||||
$charactersLength = strlen($characters) - 1;
|
||||
|
||||
// Select some random characters
|
||||
for ($i = 0; $i < $length; $i++) $token .= $characters[mt_rand(0, $charactersLength)];
|
||||
}
|
||||
|
||||
return $token;
|
||||
}
|
||||
@@ -225,6 +240,52 @@ function isDateWorkingDay($date, $days = null)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse the given text using the given data parameter
|
||||
* Use the CI parser which performs simple text substitution for pseudo-variable
|
||||
*/
|
||||
function parseText($text, $data)
|
||||
{
|
||||
$ci =& get_instance(); // get CI instance
|
||||
$ci->load->library('parser'); // Loads CI parser library
|
||||
|
||||
return $ci->parser->parse_string($text, $data, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse the given template using the given data parameter
|
||||
* Use the CI parser which performs simple text substitution for pseudo-variable
|
||||
*/
|
||||
function parseTemplate($template, $data)
|
||||
{
|
||||
$ci =& get_instance(); // get CI instance
|
||||
$ci->load->library('parser'); // Loads CI parser library
|
||||
|
||||
return $ci->parser->parse($template, $data, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Terminate immediately the execution of the current script.
|
||||
* If message parameter is given then:
|
||||
* - logs the given message in CI logs
|
||||
* - prints the given message to standard output
|
||||
* Otherwise terminate with the generic error
|
||||
*/
|
||||
function terminateWithError($message = null)
|
||||
{
|
||||
if (!isEmptyString($message))
|
||||
{
|
||||
$ci =& get_instance(); // get CI instance
|
||||
$ci->load->library('LogLib'); // Loads LogLib
|
||||
|
||||
$ci->loglib->logError($message);
|
||||
|
||||
exit($message);
|
||||
}
|
||||
|
||||
exit(EXIT_ERROR);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the current user is logged by checking that the AuthLib is loaded and
|
||||
* it is present the authentication object in session
|
||||
|
||||
@@ -98,9 +98,7 @@ function _parseMailContent($vorlage_kurzbz, $vorlage_data)
|
||||
!isEmptyString($result->retval[0]->text))
|
||||
{
|
||||
// Parses template text
|
||||
$parsedText = $ci->vorlagelib->parseVorlagetext($result->retval[0]->text, $vorlage_data);
|
||||
|
||||
return $parsedText;
|
||||
return parseText($result->retval[0]->text, $vorlage_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
*/
|
||||
class MailLib
|
||||
{
|
||||
const ENABLE_DEBUG = 'enable_debug';
|
||||
|
||||
private $sended; // Sended email counter
|
||||
|
||||
// Properties for storing the configuration
|
||||
@@ -15,6 +17,8 @@ class MailLib
|
||||
private $email_time_range;
|
||||
private $email_from_system;
|
||||
|
||||
private $_ci; // Codeigniter instance
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
*/
|
||||
@@ -24,16 +28,16 @@ class MailLib
|
||||
$this->sended = 0;
|
||||
|
||||
// Get CI instance
|
||||
$this->ci =& get_instance();
|
||||
$this->_ci =& get_instance();
|
||||
|
||||
// The second parameter is used to avoiding name collisions in the config array
|
||||
$this->ci->config->load('mail', true);
|
||||
$this->_ci->config->load('mail', true);
|
||||
|
||||
// CI Email library
|
||||
$this->ci->load->library('email');
|
||||
$this->_ci->load->library('email');
|
||||
|
||||
// Initializing email library with the loaded configurations
|
||||
$this->ci->email->initialize($this->ci->config->config['mail']);
|
||||
$this->_ci->email->initialize($this->_ci->config->config['mail']);
|
||||
|
||||
// Set the configuration properties with the standard configuration values
|
||||
$this->email_number_to_sent = $this->getEmailCfgItem('email_number_to_sent');
|
||||
@@ -48,6 +52,22 @@ class MailLib
|
||||
*/
|
||||
public function send($from, $to, $subject, $message, $alias = '', $cc = null, $bcc = null, $altMessage = '', $bulk = false, $autogenerated = false)
|
||||
{
|
||||
// If it is configured then log mail info into the CI error logs
|
||||
if ($this->getEmailCfgItem(self::ENABLE_DEBUG) === true)
|
||||
{
|
||||
$this->_ci->load->library('LogLib'); // Loads logging library
|
||||
|
||||
// Log them all!
|
||||
$this->_ci->loglib->logError('From: '.$from);
|
||||
$this->_ci->loglib->logError('To: '.$to);
|
||||
$this->_ci->loglib->logError('Subject: '.$subject);
|
||||
$this->_ci->loglib->logError('Message: '.$message);
|
||||
$this->_ci->loglib->logError('Alias: '.$alias);
|
||||
$this->_ci->loglib->logError('CC: '.$cc);
|
||||
$this->_ci->loglib->logError('BCC: '.$bcc);
|
||||
$this->_ci->loglib->logError('Alternative message: '.$altMessage);
|
||||
}
|
||||
|
||||
// If from is not specified then use the standard one
|
||||
if (is_null($from) || $from == '')
|
||||
{
|
||||
@@ -67,7 +87,7 @@ class MailLib
|
||||
}
|
||||
}
|
||||
|
||||
$this->ci->email->from($from, $alias);
|
||||
$this->_ci->email->from($from, $alias);
|
||||
|
||||
// Check if the email address of the debug recipient is a valid one
|
||||
$recipient = $to;
|
||||
@@ -83,20 +103,20 @@ class MailLib
|
||||
$recipientBCC = MAIL_DEBUG;
|
||||
}
|
||||
|
||||
$this->ci->email->to($recipient);
|
||||
if (!is_null($recipientCC)) $this->ci->email->cc($recipientCC);
|
||||
if (!is_null($recipientBCC)) $this->ci->email->bcc($recipientBCC);
|
||||
$this->ci->email->subject($subject);
|
||||
$this->ci->email->message($message);
|
||||
if (!isEmptyString($altMessage)) $this->ci->email->set_alt_message($altMessage);
|
||||
$this->_ci->email->to($recipient);
|
||||
if (!is_null($recipientCC)) $this->_ci->email->cc($recipientCC);
|
||||
if (!is_null($recipientBCC)) $this->_ci->email->bcc($recipientBCC);
|
||||
$this->_ci->email->subject($subject);
|
||||
$this->_ci->email->message($message);
|
||||
if (!isEmptyString($altMessage)) $this->_ci->email->set_alt_message($altMessage);
|
||||
|
||||
if($bulk)
|
||||
$this->ci->email->set_header('Precedence', 'bulk');
|
||||
$this->_ci->email->set_header('Precedence', 'bulk');
|
||||
if($autogenerated)
|
||||
$this->ci->email->set_header('Auto-Submitted', 'auto-generated');
|
||||
$this->_ci->email->set_header('Auto-Submitted', 'auto-generated');
|
||||
|
||||
// Avoid printing on standard output ugly error messages
|
||||
$result = @$this->ci->email->send();
|
||||
$result = @$this->_ci->email->send();
|
||||
|
||||
// If the email was succesfully sended then increment the counter
|
||||
// and checks if it has to wait until the sending of the next
|
||||
@@ -110,43 +130,34 @@ class MailLib
|
||||
}
|
||||
|
||||
/**
|
||||
* To ovveride the configurations
|
||||
* Overrides configuration parameters
|
||||
* If the given parameters are not null or empty strings then they are used to override
|
||||
* the following properties of this object:
|
||||
* - email_number_to_sent
|
||||
* - email_number_per_time_range
|
||||
* - email_time_range
|
||||
* - email_from_system
|
||||
*/
|
||||
public function overrideConfigs($cfg)
|
||||
public function overrideConfigs($numberToSent, $numberPerTimeRange, $emailTimeRange, $emailFromSystem)
|
||||
{
|
||||
if (!is_null($cfg))
|
||||
if (is_numeric($numberToSent)) $this->email_number_to_sent = $numberToSent;
|
||||
|
||||
if (is_numeric($numberPerTimeRange)) $this->email_number_per_time_range = $numberPerTimeRange;
|
||||
|
||||
if (is_numeric($emailTimeRange)) $this->email_time_range = $emailTimeRange;
|
||||
|
||||
if (!isEmptyString($emailFromSystem) && filter_var($emailFromSystem, FILTER_VALIDATE_EMAIL))
|
||||
{
|
||||
if (isset($cfg->email_number_to_sent) && is_numeric($cfg->email_number_to_sent))
|
||||
{
|
||||
$this->email_number_to_sent = $cfg->email_number_to_sent;
|
||||
}
|
||||
if (isset($cfg->email_number_per_time_range) && is_numeric($cfg->email_number_per_time_range))
|
||||
{
|
||||
$this->email_number_per_time_range = $cfg->email_number_per_time_range;
|
||||
}
|
||||
if (isset($cfg->email_time_range) && is_numeric($cfg->email_time_range))
|
||||
{
|
||||
$this->email_time_range = $cfg->email_time_range;
|
||||
}
|
||||
if (isset($cfg->email_from_system) && filter_var($cfg->email_from_system, FILTER_VALIDATE_EMAIL))
|
||||
{
|
||||
$this->email_from_system = $cfg->email_from_system;
|
||||
}
|
||||
$this->email_from_system = $emailFromSystem;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current configuration
|
||||
* Returns value of property email_number_to_sent
|
||||
*/
|
||||
public function getConfigs()
|
||||
public function getEmailNumberToSent()
|
||||
{
|
||||
$cfg = new stdClass();
|
||||
$cfg->email_number_to_sent = $this->email_number_to_sent;
|
||||
$cfg->email_number_per_time_range = $this->email_number_per_time_range;
|
||||
$cfg->email_time_range = $this->email_time_range;
|
||||
$cfg->email_from_system = $this->email_from_system;
|
||||
|
||||
return $cfg;
|
||||
return $this->email_number_to_sent;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -180,6 +191,6 @@ class MailLib
|
||||
*/
|
||||
private function getEmailCfgItem($itemName)
|
||||
{
|
||||
return $this->ci->config->item($itemName, EMAIL_CONFIG_INDEX);
|
||||
return $this->_ci->config->item($itemName, EMAIL_CONFIG_INDEX);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -165,16 +165,6 @@ class PhrasesLib
|
||||
}
|
||||
|
||||
/**
|
||||
* parseVorlagetext() - will parse a Vorlagetext.
|
||||
*/
|
||||
public function parseVorlagetext($text, $data = array())
|
||||
{
|
||||
if (isEmptyString($text)) return error('Not a valid text');
|
||||
|
||||
return $this->_ci->parser->parse_string($text, $data, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a phrases from the the property _phrases with the given parameters
|
||||
* It also replace parameters inside the phrase if they are provided
|
||||
* @param string $category Category name which is used to categorize the phrase.
|
||||
@@ -201,7 +191,7 @@ class PhrasesLib
|
||||
{
|
||||
if (!is_array($parameters)) $parameters = array(); // if params is not an array
|
||||
|
||||
return $this->_ci->parser->parse_string($_phrase->text, $parameters, true); // parsing
|
||||
return parseText($_phrase->text, $parameters); // parsing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,18 +188,4 @@ class VorlageLib
|
||||
$vorlagetext = $this->ci->VorlageStudiengangModel->update($vorlagestudiengang_id, $data);
|
||||
return $vorlagetext;
|
||||
}
|
||||
|
||||
/**
|
||||
* parseVorlagetext() - will parse a Vorlagetext.
|
||||
*
|
||||
* @param string $text REQUIRED
|
||||
* @param array $data REQUIRED
|
||||
* @return string
|
||||
*/
|
||||
public function parseVorlagetext($text, $data = array())
|
||||
{
|
||||
if (isEmptyString($text)) return error('Not a valid text');
|
||||
|
||||
return $this->ci->parser->parse_string($text, $data, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This model extends CI_Model because here is just implemented logic
|
||||
* It does not represent a resource (ex. like models that extend DB_Model)
|
||||
* Messages GUI logic
|
||||
* - This model extends CI_Model because here is just implemented logic
|
||||
* - It does not represent a resource (ex. like models that extend DB_Model)
|
||||
*/
|
||||
class Messages_model extends CI_Model
|
||||
{
|
||||
const REPLY_SUBJECT_PREFIX = 'Re: '; // reply subject prefix
|
||||
// To quote a reply body message
|
||||
const REPLY_BODY_FORMAT = '<br>
|
||||
<br>
|
||||
<blockquote>
|
||||
<i>
|
||||
On %s %s %s wrote:
|
||||
</i>
|
||||
</blockquote>
|
||||
<blockquote style="border-left:2px solid; padding-left: 8px">
|
||||
%s
|
||||
</blockquote>';
|
||||
|
||||
const NO_AUTH_UID = 'online'; // hard coded uid if no authentication is performed
|
||||
|
||||
// Recipients types
|
||||
const TYPE_PERSONS = 'persons';
|
||||
const TYPE_PRESTUDENTS = 'prestudents';
|
||||
|
||||
const ALT_OE = 'infocenter'; // alternative organisation unit when no one is found for a presetudent
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@@ -14,159 +36,618 @@ class Messages_model extends CI_Model
|
||||
parent::__construct();
|
||||
|
||||
// Loads the message library
|
||||
$this->load->library('MessageLib');
|
||||
|
||||
$this->load->library('MessageLib'); // MessageModel loaded here!
|
||||
// Loads the person log library
|
||||
$this->load->library('PersonLogLib');
|
||||
// Loads the widget library
|
||||
$this->load->library('WidgetLib');
|
||||
|
||||
// Loads model MessageToken_model
|
||||
$this->load->model('system/MessageToken_model', 'MessageTokenModel');
|
||||
// Loads model Benutzerrolle_model
|
||||
$this->load->model('system/Benutzerrolle_model', 'BenutzerrolleModel');
|
||||
// Loads model Prestudent_model
|
||||
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Executes message sending
|
||||
* @param $sender_id
|
||||
* @return array wether execution was successfull - error or success
|
||||
* Set a message as read by its id ($message_id + $person_id)
|
||||
*/
|
||||
public function send($msgVarsData, $relationmessage_id = null, $oe_kurzbz = null, $vorlage_kurzbz = null, $msgVars = null)
|
||||
public function setMessageRead($message_id, $person_id)
|
||||
{
|
||||
$subject = $this->input->post('subject');
|
||||
$body = $this->input->post('body');
|
||||
// Checks parameters
|
||||
if (!is_numeric($message_id) || !is_numeric($person_id)) return error('Invalid setMessageRead parameters');
|
||||
|
||||
$authUser = $this->getAuthUser();
|
||||
// Loads needed models
|
||||
$this->load->model('system/MsgStatus_model', 'MsgStatusModel');
|
||||
|
||||
if (isError($authUser)) return $authUser;
|
||||
$statuResult = $this->MsgStatusModel->loadWhere(
|
||||
array(
|
||||
'message_id' => $message_id,
|
||||
'person_id' => $person_id,
|
||||
'status' => MSG_STATUS_READ
|
||||
)
|
||||
);
|
||||
|
||||
$sender_id = getData($authUser)[0]->person_id;
|
||||
|
||||
// Send message(s)
|
||||
if (hasData($msgVarsData))
|
||||
if (isError($statuResult)) return $statuResult;
|
||||
if (!hasData($statuResult))
|
||||
{
|
||||
for ($i = 0; $i < count(getData($msgVarsData)); $i++)
|
||||
{
|
||||
$parsedText = "";
|
||||
$msgVarsDataArray = $this->replaceKeys((array)getData($msgVarsData)[$i]); // replaces array keys
|
||||
|
||||
// Send without vorlage
|
||||
if (isEmptyString($vorlage_kurzbz))
|
||||
{
|
||||
$parsedText = $this->messagelib->parseMessageText($body, $msgVarsDataArray);
|
||||
$msg = $this->messagelib->sendMessage($sender_id, $msgVarsDataArray['person_id'], $subject, $parsedText, PRIORITY_NORMAL, $relationmessage_id, $oe_kurzbz);
|
||||
}
|
||||
// Send with vorlage
|
||||
else
|
||||
{
|
||||
if (is_array($msgVars))
|
||||
{
|
||||
// Additional message variables
|
||||
foreach ($msgVars as $key => $msgvar)
|
||||
{
|
||||
$msgVarsDataArray[$key] = $msgvar;
|
||||
}
|
||||
}
|
||||
$msg = $this->messagelib->sendMessageVorlage($sender_id, $msgVarsDataArray['person_id'], $vorlage_kurzbz, $oe_kurzbz, $msgVarsDataArray);
|
||||
}
|
||||
|
||||
if (isError($msg)) return $msg;
|
||||
|
||||
// Write log entry
|
||||
$personLog = $this->personloglib->log(
|
||||
$msgVarsDataArray['person_id'],
|
||||
'Action',
|
||||
array(
|
||||
'name' => 'Message sent',
|
||||
'message' => 'Message sent from person '.$sender_id.' to '.$msgVarsDataArray['person_id'].', messageid '.getData($msg),
|
||||
'success' => 'true'
|
||||
),
|
||||
'kommunikation',
|
||||
'core',
|
||||
null,
|
||||
getAuthUID()
|
||||
);
|
||||
|
||||
if (isError($personLog)) return $personLog;
|
||||
}
|
||||
|
||||
return success('Messages sent successfully');
|
||||
// Set date used to insert
|
||||
return $this->MsgStatusModel->insert(
|
||||
array(
|
||||
'message_id' => $message_id,
|
||||
'person_id' => $person_id,
|
||||
'status' => MSG_STATUS_READ,
|
||||
'insertvon' => getAuthUID()
|
||||
)
|
||||
); // insert and return result
|
||||
}
|
||||
else
|
||||
{
|
||||
return $msgVarsData;
|
||||
return success('Already set as read');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a reply
|
||||
* Prepares data for the view system/messages/ajaxWrite
|
||||
*/
|
||||
public function sendReply($subject, $body, $persons, $relationmessage_id, $token)
|
||||
public function prepareAjaxWrite()
|
||||
{
|
||||
$relationmsg = $this->MessageTokenModel->getMessageByToken($token);
|
||||
if (!hasData($relationmsg) || $relationmessage_id !== getData($relationmsg)[0]->message_id)
|
||||
{
|
||||
show_error('Error while sending reply');
|
||||
}
|
||||
$ouResult = $this->PrestudentModel->getOrganisationunitsByPersonId(getAuthPersonId());
|
||||
|
||||
// Get sender (receiver of previous msg)
|
||||
$sender_id = getData($relationmsg)[0]->receiver_id;
|
||||
if (isError($ouResult)) show_error('An error occurred while loading this page, please contact the site administrator');
|
||||
|
||||
// Get message data of persons
|
||||
$data = $this->MessageTokenModel->getPersonData($persons);
|
||||
if (hasData($data))
|
||||
$ouOptions = '<option value="0">Select...</option>';
|
||||
|
||||
if (hasData($ouResult))
|
||||
{
|
||||
for ($i = 0; $i < count(getData($data)); $i++)
|
||||
foreach (getData($ouResult) as $ou)
|
||||
{
|
||||
$dataArray = (array)getData($data)[$i];
|
||||
|
||||
$msg = $this->messagelib->sendMessage($sender_id, $dataArray['person_id'], $subject, $body, PRIORITY_NORMAL, $relationmessage_id, null);
|
||||
if (isError($msg)) return $msg;
|
||||
|
||||
// Logs person data
|
||||
$personLog = $this->personloglib->log(
|
||||
$sender_id,
|
||||
'Action',
|
||||
array(
|
||||
'name' => 'Message sent',
|
||||
'message' => 'Message sent from person '.$sender_id.' to '.$dataArray['person_id'].', messageid '.getData($msg),
|
||||
'success' => 'true'
|
||||
),
|
||||
'kommunikation',
|
||||
'core',
|
||||
null,
|
||||
'online'
|
||||
$ouOptions .= sprintf(
|
||||
"\n".'<option value="%s">%s</option>',
|
||||
is_numeric($ou->prestudent_id) ? $ou->oe_kurzbz : self::ALT_OE,
|
||||
$ou->bezeichnung . (is_numeric($ou->prestudent_id) ? '' : ' *')
|
||||
);
|
||||
|
||||
// Unpark bewerber after he sends message
|
||||
$personLog = $this->personloglib->unPark($sender_id);
|
||||
|
||||
if (isError($personLog)) return $personLog;
|
||||
}
|
||||
}
|
||||
|
||||
return success('Reply sent');
|
||||
return array('organisationUnitOptions' => $ouOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Prepares data for the view system/messages/ajaxWriteReply
|
||||
*/
|
||||
public function getAuthUser()
|
||||
public function prepareAjaxWriteReply($token)
|
||||
{
|
||||
$sender_id = null;
|
||||
if (isEmptyString($token)) show_error('The given token is not valid');
|
||||
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
$authUser = $this->PersonModel->getByUid(getAuthUID());
|
||||
// Retrieves message using the given token
|
||||
$messageResult = $this->MessageTokenModel->getMessageByToken($token);
|
||||
if (isError($messageResult)) show_error('An error occurred while loading this page, please contact the site administrator');
|
||||
|
||||
if (!hasData($authUser)) $authUser = error('The current logged user person_id is not defined');
|
||||
if (hasData($messageResult))
|
||||
{
|
||||
$message = getData($messageResult)[0]; // Found message data
|
||||
|
||||
return $authUser;
|
||||
// Retrieves message sender information
|
||||
$senderResult = $this->MessageTokenModel->getSenderData($message->sender_id);
|
||||
if (isError($senderResult)) show_error('An error occurred while loading this page, please contact the site administrator');
|
||||
|
||||
if (hasData($senderResult))
|
||||
{
|
||||
$sender = getData($senderResult)[0]; // Found sender data
|
||||
|
||||
$replySubject = self::REPLY_SUBJECT_PREFIX.$message->subject;
|
||||
$replyBody = $this->_getReplyBody($message->body, $sender->vorname, $sender->nachname, $message->sent);
|
||||
|
||||
return array (
|
||||
'receiver' => $sender->vorname.' '.$sender->nachname, // yep! the sender of the sent message is the receiver of the reply message
|
||||
'subject' => $replySubject,
|
||||
'body' => $replyBody,
|
||||
'receiver_id' => $message->sender_id,
|
||||
'relationmessage_id' => $message->message_id,
|
||||
'token' => $token
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Prepares data for the view system/messages/ajaxRead
|
||||
* If everything is fine returns a list of received messages (objects)
|
||||
*/
|
||||
public function replaceKeys($data)
|
||||
public function prepareAjaxReadReceived()
|
||||
{
|
||||
// Retrieves received messages for the logged user and its organisation units
|
||||
$receivedMessagesResult = $this->RecipientModel->getReceivedMessages(
|
||||
getAuthPersonId(),
|
||||
$this->config->item(MessageLib::CFG_OU_RECEIVERS)
|
||||
);
|
||||
// If an error occurred return it
|
||||
if (isError($receivedMessagesResult)) return $receivedMessagesResult;
|
||||
|
||||
// If data were found
|
||||
if (hasData($receivedMessagesResult))
|
||||
{
|
||||
$jsonArray = array(); // array that contains all the received messages
|
||||
|
||||
// Collect'em all in the array $jsonArray
|
||||
foreach (getData($receivedMessagesResult) as $receivedMessage)
|
||||
{
|
||||
$jsonRecord = new stdClass();
|
||||
$jsonRecord->message_id = $receivedMessage->message_id;
|
||||
$jsonRecord->subject = $receivedMessage->subject;
|
||||
$jsonRecord->body = $receivedMessage->body;
|
||||
$jsonRecord->from = $receivedMessage->vorname.' '.$receivedMessage->nachname;
|
||||
$sentDate = new DateTime($receivedMessage->sent);
|
||||
$jsonRecord->sent = $sentDate->format('d/m/Y H:i:s');
|
||||
$jsonRecord->status = $receivedMessage->status;
|
||||
$jsonRecord->statusPersonId = $receivedMessage->statuspersonid;
|
||||
$jsonRecord->token = $receivedMessage->token;
|
||||
|
||||
$jsonArray[] = $jsonRecord;
|
||||
}
|
||||
|
||||
return success(json_encode($jsonArray)); // return as an json encoded string
|
||||
}
|
||||
|
||||
return success('No messages were found'); // NOT a blocking error
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares data for the view system/messages/ajaxRead
|
||||
* If everything is fine returns a list of sent messages (objects)
|
||||
*/
|
||||
public function prepareAjaxReadSent()
|
||||
{
|
||||
// Retrieves sent messages from the logged user
|
||||
$sentMessagesResult = $this->RecipientModel->getSentMessages(getAuthPersonId());
|
||||
if (isError($sentMessagesResult)) return $sentMessagesResult; // If an error occurred return it
|
||||
|
||||
if (hasData($sentMessagesResult))
|
||||
{
|
||||
$jsonArray = array();// array that contains all the sent messages
|
||||
|
||||
// Collect'em all in the array $jsonArray
|
||||
foreach (getData($sentMessagesResult) as $sentMessage)
|
||||
{
|
||||
$jsonRecord = new stdClass();
|
||||
$jsonRecord->message_id = $sentMessage->message_id;
|
||||
$jsonRecord->subject = $sentMessage->subject;
|
||||
$jsonRecord->body = $sentMessage->body;
|
||||
$sentDate = new DateTime($sentMessage->sent);
|
||||
$jsonRecord->sent = $sentDate->format('d/m/Y H:i:s');
|
||||
$jsonRecord->status = $sentMessage->status;
|
||||
$jsonRecord->statusPersonId = $sentMessage->statuspersonid;
|
||||
$jsonRecord->token = $sentMessage->token;
|
||||
|
||||
if ($sentMessage->person_id == $this->config->item(MessageLib::CFG_SYSTEM_PERSON_ID))
|
||||
{
|
||||
$jsonRecord->to = $sentMessage->oe;
|
||||
}
|
||||
else
|
||||
{
|
||||
$jsonRecord->to = $sentMessage->vorname.' '.$sentMessage->nachname;
|
||||
}
|
||||
|
||||
$jsonArray[] = $jsonRecord;
|
||||
}
|
||||
|
||||
return success(json_encode($jsonArray)); // return as an json encoded string
|
||||
}
|
||||
|
||||
return success('No messages were found'); // NOT a blocking error
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares data for the view system/messages/htmlRead using a token that identifies a single message
|
||||
*/
|
||||
public function prepareHtmlRead($token)
|
||||
{
|
||||
if (isEmptyString($token)) show_error('The given token is not valid');
|
||||
|
||||
// Retrieves message using the given token
|
||||
$messageResult = $this->MessageTokenModel->getMessageByToken($token);
|
||||
if (isError($messageResult)) show_error(getError($messageResult));
|
||||
if (!hasData($messageResult)) show_error('No message found with the given token');
|
||||
|
||||
$message = getData($messageResult)[0]; // Found message data
|
||||
|
||||
// Set message as read
|
||||
$srmsbtResult = $this->MessageTokenModel->setReadMessageStatusByToken($token);
|
||||
if (isError($srmsbtResult)) show_error(getError($srmsbtResult));
|
||||
|
||||
// Retrieves message sender information
|
||||
$senderResult = $this->MessageTokenModel->getSenderData($message->sender_id);
|
||||
if (isError($senderResult)) show_error(getError($senderResult));
|
||||
if (!hasData($senderResult)) show_error('No sender information found');
|
||||
|
||||
$sender = getData($senderResult)[0]; // Found sender data
|
||||
|
||||
// Check if the receiver is an employee
|
||||
$isEmployee = false; // not by default
|
||||
$isEmployeeResult = $this->MessageTokenModel->isEmployee($message->receiver_id);
|
||||
if (isError($isEmployeeResult)) show_error(getError($isEmployeeResult));
|
||||
if (hasData($isEmployeeResult)) $isEmployee = true;
|
||||
|
||||
// If the sender is not an employee and are present configurations to reply
|
||||
$hrefReply = '';
|
||||
if (!$isEmployee && !isEmptyString($this->config->item(MessageLib::CFG_REDIRECT_VIEW_MESSAGE_URL)))
|
||||
{
|
||||
$hrefReply = $this->config->item(MessageLib::CFG_MESSAGE_SERVER).
|
||||
$this->config->item(MessageLib::CFG_REDIRECT_VIEW_MESSAGE_URL).
|
||||
$token;
|
||||
}
|
||||
|
||||
return array (
|
||||
'sender' => $sender,
|
||||
'message' => $message,
|
||||
'hrefReply' => $hrefReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares data for the view system/messages/htmlWriteReply using a token that identifies a single message
|
||||
*/
|
||||
public function prepareHtmlWriteReply($token)
|
||||
{
|
||||
if (isEmptyString($token)) show_error('The given token is not valid');
|
||||
|
||||
// Retrieves message using the given token
|
||||
$messageResult = $this->MessageTokenModel->getMessageByToken($token);
|
||||
if (isError($messageResult)) show_error(getError($messageResult));
|
||||
if (!hasData($messageResult)) show_error('No message found with the given token');
|
||||
|
||||
$message = getData($messageResult)[0]; // Found message data
|
||||
|
||||
// Retrieves message sender information
|
||||
$senderResult = $this->MessageTokenModel->getSenderData($message->sender_id);
|
||||
if (isError($senderResult)) show_error(getError($senderResult));
|
||||
if (!hasData($senderResult)) show_error('No sender information found');
|
||||
|
||||
$sender = getData($senderResult)[0]; // Found sender data
|
||||
|
||||
$replySubject = self::REPLY_SUBJECT_PREFIX.$message->subject;
|
||||
$replyBody = $this->_getReplyBody($message->body, $sender->vorname, $sender->nachname, $message->sent);
|
||||
|
||||
return array (
|
||||
'receiver' => $sender->vorname.' '.$sender->nachname, // yep! the sender of the sent message is the receiver of the reply message
|
||||
'subject' => $replySubject,
|
||||
'body' => $replyBody,
|
||||
'receiver_id' => $message->sender_id,
|
||||
'relationmessage_id' => $message->message_id,
|
||||
'token' => $token
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares data for the view system/messages/htmlWriteTemplate using person ids as main parameter
|
||||
* Wrap method to _prepareHtmlWriteTemplate
|
||||
*/
|
||||
public function prepareHtmlWriteTemplatePersons($persons, $message_id = null, $recipient_id = null)
|
||||
{
|
||||
// Retrieves persons information
|
||||
$msgVarsData = $this->MessageModel->getMsgVarsDataByPersonId($persons);
|
||||
|
||||
return $this->_prepareHtmlWriteTemplate($msgVarsData, $message_id, $recipient_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares data for the view system/messages/htmlWriteTemplate using prestudent ids as main parameter
|
||||
* Wrap method to _prepareHtmlWriteTemplate
|
||||
*/
|
||||
public function prepareHtmlWriteTemplatePrestudents($prestudents, $message_id = null, $recipient_id = null)
|
||||
{
|
||||
// Retrieves prestudents information
|
||||
$msgVarsData = $this->MessageModel->getMsgVarsDataByPrestudentId($prestudents);
|
||||
|
||||
return $this->_prepareHtmlWriteTemplate($msgVarsData, $message_id, $recipient_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a new message or a reply to a message (if $relationmessage_id is given)
|
||||
* using the template stored in the subject and body
|
||||
*/
|
||||
public function sendImplicitTemplate($type, $recipients_ids, $subject, $body, $relationmessage_id = null)
|
||||
{
|
||||
// Retrieves the sender id
|
||||
$sender_id = getAuthPersonId();
|
||||
if (!is_numeric($sender_id)) show_error('The current logged user person_id is not defined');
|
||||
|
||||
$msgVarsData = error('No persons nor prestudents were provided');
|
||||
// Retrieves message vars data for the given user/s
|
||||
if ($type == self::TYPE_PERSONS) // if persons were given
|
||||
{
|
||||
$msgVarsData = $this->MessageModel->getMsgVarsDataByPersonId($recipients_ids);
|
||||
}
|
||||
elseif ($type == self::TYPE_PRESTUDENTS) // otherwise prestudents were given
|
||||
{
|
||||
$msgVarsData = $this->MessageModel->getMsgVarsDataByPrestudentId($recipients_ids);
|
||||
|
||||
// Retrieve organisation unit for the recipients
|
||||
$organisationUnitsResult = $this->PrestudentModel->getOrganisationunits($recipients_ids);
|
||||
if (isError($organisationUnitsResult)) return $organisationUnitsResult;
|
||||
if (hasData($organisationUnitsResult)) $senderOUArray = getData($organisationUnitsResult);
|
||||
}
|
||||
if (isError($msgVarsData)) show_error(getError($msgVarsData));
|
||||
if (!hasData($msgVarsData)) show_error('No recipients were given');
|
||||
|
||||
$senderOU = null; // sender organisation unit only for presetudents
|
||||
$receiversCounter = 0; // a counter
|
||||
|
||||
// Looping on receivers data
|
||||
foreach (getData($msgVarsData) as $receiver)
|
||||
{
|
||||
$msgVarsDataArray = $this->_lowerReplaceSpaceArrayKeys((array)$receiver); // replaces array keys
|
||||
$parsedSubject = parseText($subject, $msgVarsDataArray);
|
||||
$parsedBody = parseText($body, $msgVarsDataArray);
|
||||
|
||||
// If exist an organisation unit for this prestudent and it is valid
|
||||
if (isset($senderOUArray[$receiversCounter])
|
||||
&& isset($senderOUArray[$receiversCounter]->oe_kurzbz)
|
||||
&& !isEmptyString($senderOUArray[$receiversCounter]->oe_kurzbz))
|
||||
{
|
||||
$senderOU = $senderOUArray[$receiversCounter]->oe_kurzbz;
|
||||
}
|
||||
else
|
||||
{
|
||||
$senderOU = null;
|
||||
}
|
||||
|
||||
$message = $this->messagelib->sendMessageUser(
|
||||
$msgVarsDataArray['person_id'], // receiverPersonId
|
||||
$parsedSubject, // subject
|
||||
$parsedBody, // body
|
||||
$sender_id, // sender_id
|
||||
$senderOU, // senderOU
|
||||
$relationmessage_id, // relationmessage_id
|
||||
MSG_PRIORITY_NORMAL // priority
|
||||
);
|
||||
|
||||
if (isError($message)) return $message;
|
||||
if (!hasData($message)) return error('No messages were saved in database');
|
||||
|
||||
// Write log entry only if persons were given
|
||||
if ($type == self::TYPE_PERSONS)
|
||||
{
|
||||
$personLog = $this->_personLog($sender_id, $msgVarsDataArray['person_id'], getData($message)[0]);
|
||||
if (isError($personLog)) return $personLog;
|
||||
}
|
||||
|
||||
$receiversCounter++; // increment the counter
|
||||
}
|
||||
|
||||
return success('Messages sent successfully');
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a new message using the given template and information present in parameter prestudents
|
||||
* Extra variables can be added using parameter $msgVars
|
||||
*/
|
||||
public function sendExplicitTemplate($prestudents, $oe_kurzbz, $vorlage_kurzbz, $msgVars)
|
||||
{
|
||||
// Retrieves the sender id
|
||||
$sender_id = getAuthPersonId();
|
||||
if (!is_numeric($sender_id)) show_error('The current logged user person_id is not defined');
|
||||
|
||||
// Retrieves message vars data for the given user/s
|
||||
$msgVarsData = $this->MessageModel->getMsgVarsDataByPrestudentId($prestudents);
|
||||
if (isError($msgVarsData)) show_error(getError($msgVarsData));
|
||||
if (!hasData($msgVarsData)) show_error('No recipients were given');
|
||||
|
||||
$prestudentsData = $this->PrestudentModel->getOrganisationunits($prestudents);
|
||||
|
||||
// Adds the organisation unit to each prestudent
|
||||
if (isEmptyString($oe_kurzbz) && hasData($msgVarsData) && hasData($prestudentsData))
|
||||
{
|
||||
$this->CLMessagesModel->_addOeToPrestudents($msgVarsData, $prestudentsData);
|
||||
}
|
||||
|
||||
foreach (getData($msgVarsData) as $receiver)
|
||||
{
|
||||
$msgVarsDataArray = $this->_lowerReplaceSpaceArrayKeys((array)$receiver); // replaces array keys
|
||||
|
||||
// Additional message variables
|
||||
if (is_array($msgVars)) $msgVarsDataArray = array_merge($msgVarsDataArray, $msgVars);
|
||||
|
||||
$message = $this->messagelib->sendMessageUserTemplate(
|
||||
$msgVarsDataArray['person_id'], // receiversPersonId
|
||||
$vorlage_kurzbz, // vorlage
|
||||
$msgVarsDataArray, // parseData
|
||||
null, // orgform
|
||||
$sender_id, // sender_id
|
||||
$oe_kurzbz // senderOU
|
||||
);
|
||||
|
||||
if (isError($message)) return $message;
|
||||
|
||||
// Write log entry
|
||||
$personLog = $this->_personLog($sender_id, $msgVarsDataArray['person_id'], getData($message)[0]);
|
||||
if (isError($personLog)) return $personLog;
|
||||
}
|
||||
|
||||
return success('Messages sent successfully');
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a reply to a single recipient for a message identified by a token (no templates are used)
|
||||
* NOTE: this method could be also called from not authenticated controllers
|
||||
*/
|
||||
public function sendReply($receiver_id, $subject, $body, $relationmessage_id, $token)
|
||||
{
|
||||
// Retrieves message sender information
|
||||
$senderResult = $this->MessageTokenModel->getSenderData($receiver_id);
|
||||
if (isError($senderResult)) show_error(getError($senderResult));
|
||||
if (!hasData($senderResult)) show_error('No sender information found');
|
||||
|
||||
$sender = getData($senderResult)[0]; // Found sender data
|
||||
|
||||
$messageResult = $this->MessageTokenModel->getMessageByToken($token);
|
||||
if (isError($messageResult)) show_error(getError($messageResult));
|
||||
// Security check! It is possible to reply only to a received message!!
|
||||
if (!hasData($messageResult) || $relationmessage_id != getData($messageResult)[0]->message_id)
|
||||
{
|
||||
show_error('An error occurred while sending your message, please contact the site administrator');
|
||||
}
|
||||
|
||||
// If the user is logged then use its person id as sender id, otherwise get the receiver id of the previous message
|
||||
$sender_id = isLogged() ? getAuthPersonId() : getData($messageResult)[0]->receiver_id;
|
||||
if (!is_numeric($sender_id)) return error('The sender id is not valid');
|
||||
|
||||
$message = $this->messagelib->sendMessageUser(
|
||||
$receiver_id, // receiverPersonId
|
||||
$subject, // subject
|
||||
$body, // body
|
||||
$sender_id, // sender_id, the receiver of the previous message is the sender of the current one
|
||||
null, // senderOU
|
||||
$relationmessage_id, // relationmessage_id
|
||||
MSG_PRIORITY_NORMAL // priority
|
||||
);
|
||||
|
||||
if (isError($message)) return $message;
|
||||
if (!hasData($message)) return error('No messages were saved in database');
|
||||
|
||||
// Write log entry
|
||||
// NOTE: $receiver_id and $sender_id are switched!!! Currently this is a workaround
|
||||
$personLog = $this->_personLog($receiver_id, $sender_id, getData($message)[0]);
|
||||
if (isError($personLog)) return $personLog;
|
||||
|
||||
return success('Messages sent successfully');
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a message to an organisation unit
|
||||
*/
|
||||
public function sendToOrganisationUnit($receiverOU, $subject, $body)
|
||||
{
|
||||
if (isEmptyString($receiverOU)) return error('Not a valid organisation unit');
|
||||
if (isEmptyString($subject)) return error('Subject is an empty string');
|
||||
if (isEmptyString($body)) return error('Body is an empty string');
|
||||
|
||||
$sender_id = getAuthPersonId();
|
||||
if (!is_numeric($sender_id)) return error('The current logged user person_id is not defined');
|
||||
|
||||
$message = $this->messagelib->sendMessageOU(
|
||||
$receiverOU, // receiverPersonId
|
||||
$subject, // subject
|
||||
$body, // body
|
||||
$sender_id // sender_id
|
||||
);
|
||||
|
||||
if (isError($message)) return $message;
|
||||
if (!hasData($message)) return error('No messages were saved in database');
|
||||
|
||||
// Write log entry
|
||||
$personLog = $this->_personLog($sender_id, $this->config->item(MessageLib::CFG_SYSTEM_PERSON_ID), getData($message)[0], $receiverOU);
|
||||
if (isError($personLog)) return $personLog;
|
||||
|
||||
return success('Messages sent successfully');
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods called by controller system/messages/Messages
|
||||
|
||||
/**
|
||||
* Returns an object that represent a template store in database
|
||||
* If no templates are found with the given parameter or the given parameter is an empty string,
|
||||
* then an error is returned
|
||||
*/
|
||||
public function getVorlage($vorlage_kurzbz)
|
||||
{
|
||||
$getVorlage = error('The given vorlage_kurzbz is not valid');
|
||||
|
||||
if (!isEmptyString($vorlage_kurzbz))
|
||||
{
|
||||
$this->load->model('system/Vorlagestudiengang_model', 'VorlagestudiengangModel');
|
||||
$this->VorlagestudiengangModel->addOrder('version','DESC');
|
||||
|
||||
$getVorlage = $this->VorlagestudiengangModel->loadWhere(array('vorlage_kurzbz' => $vorlage_kurzbz));
|
||||
}
|
||||
|
||||
return $getVorlage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse the given given text using data from the given user
|
||||
* Use the CI parser which performs simple text substitution for pseudo-variable
|
||||
*/
|
||||
public function parseMessageTextPerson($person_id, $text)
|
||||
{
|
||||
$parseMessageText = error('The given person_id is not a valid number');
|
||||
|
||||
if (is_numeric($person_id)) $parseMessageText = $this->MessageModel->getMsgVarsDataByPersonId($person_id);
|
||||
|
||||
if (hasData($parseMessageText))
|
||||
{
|
||||
$parseMessageText = success(
|
||||
parseText(
|
||||
$text,
|
||||
$this->_lowerReplaceSpaceArrayKeys((array)getData($parseMessageText)[0])
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return $parseMessageText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse the given given text using data from the given user
|
||||
* Use the CI parser which performs simple text substitution for pseudo-variable
|
||||
*/
|
||||
public function parseMessageTextPrestudent($prestudent_id, $text)
|
||||
{
|
||||
$parseMessageText = error('The given prestudent_id is not a valid number');
|
||||
|
||||
if (is_numeric($prestudent_id)) $parseMessageText = $this->MessageModel->getMsgVarsDataByPrestudentId($prestudent_id);
|
||||
|
||||
if (hasData($parseMessageText))
|
||||
{
|
||||
$parseMessageText = success(
|
||||
parseText(
|
||||
$text,
|
||||
$this->_lowerReplaceSpaceArrayKeys((array)getData($parseMessageText)[0])
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return $parseMessageText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs message data for a message (identified my msg id and receiver id) in JSON format
|
||||
*/
|
||||
public function getMessageFromIds($message_id, $receiver_id)
|
||||
{
|
||||
$getMessageFromIds = error('The given message id or receiver id are not valid');
|
||||
|
||||
if (is_numeric($message_id) && is_numeric($receiver_id))
|
||||
{
|
||||
$getMessageFromIds = $this->messagelib->getMessage($message_id, $receiver_id);
|
||||
}
|
||||
|
||||
if (isError($getMessageFromIds) || !hasData($getMessageFromIds))
|
||||
{
|
||||
return array();
|
||||
}
|
||||
else
|
||||
{
|
||||
return array(getData($getMessageFromIds)[0]);
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
/**
|
||||
* Replaces data array keys to a lowercase string with underscores instead of spaces
|
||||
*/
|
||||
private function _lowerReplaceSpaceArrayKeys($data)
|
||||
{
|
||||
$tmpData = array();
|
||||
|
||||
// Replaces data array keys to a lowercase without spaces string
|
||||
foreach ($data as $key => $val)
|
||||
{
|
||||
$tmpData[str_replace(' ', '_', strtolower($key))] = $val;
|
||||
@@ -176,9 +657,9 @@ class Messages_model extends CI_Model
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Add organisation unit to an array of prestudents (objects)
|
||||
*/
|
||||
public function addOeToPrestudents(&$msgVarsData, $prestudentsData)
|
||||
private function _addOeToPrestudents(&$msgVarsData, $prestudentsData)
|
||||
{
|
||||
for ($i = 0; $i < count(getData($msgVarsData)); $i++)
|
||||
{
|
||||
@@ -192,4 +673,171 @@ class Messages_model extends CI_Model
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a person log after a message is sent
|
||||
*/
|
||||
private function _personLog($sender_id, $receiver_id, $message_id, $receiverOU = null)
|
||||
{
|
||||
// In case the message is accessed via ViewMessage controller -> no authentication
|
||||
// If no authentication is performed then use a hard coded uid
|
||||
$loggedUserUID = isLogged() ? getAuthUID() : self::NO_AUTH_UID;
|
||||
|
||||
$message = 'Message sent from person '.$sender_id.' to '.$receiver_id.', message id: '.$message_id;
|
||||
if (!isEmptyString($receiverOU)) $message .= ', receiverOU: '.$receiverOU;
|
||||
|
||||
return $this->personloglib->log(
|
||||
$receiver_id,
|
||||
'Action',
|
||||
array(
|
||||
'name' => 'Message sent',
|
||||
'message' => $message,
|
||||
'success' => 'true'
|
||||
),
|
||||
'kommunikation',
|
||||
'core',
|
||||
null,
|
||||
$loggedUserUID
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Quotes the previous message body
|
||||
*/
|
||||
private function _getReplyBody($body, $receiverName, $receiverSurname, $sentDate)
|
||||
{
|
||||
return sprintf(
|
||||
self::REPLY_BODY_FORMAT,
|
||||
date_format(date_create($sentDate), 'd.m.Y H:i'), $receiverName, $receiverSurname, $body
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares data for the view system/messages/htmlWriteTemplate using the given parameters
|
||||
*/
|
||||
private function _prepareHtmlWriteTemplate($info, $message_id, $recipient_id)
|
||||
{
|
||||
// Checks that info parameter is valid
|
||||
if (isError($info)) show_error(getError($info));
|
||||
if (!hasData($info)) show_error('No recipients were given');
|
||||
|
||||
// If the message id and recipient id are given, then both they must be valid numbers
|
||||
if ((is_numeric($message_id) && !is_numeric($recipient_id))
|
||||
|| (!is_numeric($message_id) && is_numeric($recipient_id)))
|
||||
{
|
||||
show_error('If given, message id and recipient id both must be valid numbers');
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// Retrieves the recipients information and builds:
|
||||
// - recipientsArray: an array that contains objects with id (person_id) and description (Vorname + Nachname) of recipient
|
||||
// - recipientsList: a string that contains all the recipients descriptions (Vorname + Nachname) separated by ;
|
||||
// - persons: a string that contains HTML input hidden with alla the receivers id (person_id)
|
||||
$recipientsArray = array();
|
||||
$recipientsList = '';
|
||||
$recipients_ids = '';
|
||||
|
||||
foreach (getData($info) as $receiver)
|
||||
{
|
||||
$id = 0;
|
||||
$recipient = new stdClass();
|
||||
$recipient->description = $receiver->Vorname.' '.$receiver->Nachname;
|
||||
$recipientsList .= $receiver->Vorname.' '.$receiver->Nachname.'; ';
|
||||
|
||||
// If it is a prestudent then
|
||||
if (isset($receiver->prestudent_id) && is_numeric($receiver->prestudent_id))
|
||||
{
|
||||
$recipient->id = $receiver->prestudent_id;
|
||||
$id = $receiver->prestudent_id;
|
||||
}
|
||||
else // otherwise it is a person
|
||||
{
|
||||
$recipient->id = $receiver->person_id;
|
||||
$id = $receiver->person_id;
|
||||
}
|
||||
|
||||
$recipients_ids .= '<input type="hidden" name="recipients_ids[]" value="'.$id.'">'."\n";
|
||||
|
||||
$recipientsArray[] = $recipient;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// Retrieves the message to reply to, if it is specified by parameters $message_id and $recipient_id
|
||||
$replySubject = ''; // message reply subject
|
||||
$replyBody = ''; // message reply body
|
||||
$relationmessage = ''; // input hidden that contains the message id to be replied to
|
||||
// If both are given and they are valid
|
||||
if (is_numeric($message_id) && is_numeric($recipient_id))
|
||||
{
|
||||
// Retrieves a received message from tbl_msg_recipient
|
||||
$messageResult = $this->messagelib->getMessage($message_id, $recipient_id);
|
||||
if (isError($messageResult)) show_error(getError($messageResult));
|
||||
if (!hasData($messageResult)) show_error('The selected message does not exist');
|
||||
|
||||
$message = getData($messageResult)[0];
|
||||
|
||||
$replySubject = self::REPLY_SUBJECT_PREFIX.$message->subject;
|
||||
$replyBody = $this->_getReplyBody($message->body, $receiver->Vorname, $receiver->Nachname, $message->sent);
|
||||
$relationmessage = '<input type="hidden" name="relationmessage_id" value="'.$message_id.'">';
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// Retrieves message vars from database view vw_msg_vars/vw_msg_vars_person
|
||||
$variablesResult = null;
|
||||
$type = '';
|
||||
|
||||
// If data contains a prestudent id
|
||||
// NOTE:
|
||||
// - info is checked at the beginning of this method so it is safe to use getData($info)[0]
|
||||
// - the provided data inside info are all persons or all prestudents, so it is safe to check only the first one
|
||||
if (isset(getData($info)[0]->prestudent_id) && is_numeric(getData($info)[0]->prestudent_id))
|
||||
{
|
||||
$variablesResult = $this->messagelib->getMessageVarsPrestudent();
|
||||
$type = '<input type="hidden" id="type" name="type" value="'.self::TYPE_PRESTUDENTS.'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
$variablesResult = $this->messagelib->getMessageVarsPerson();
|
||||
$type = '<input type="hidden" id="type" name="type" value="'.self::TYPE_PERSONS.'">';
|
||||
}
|
||||
if (isError($variablesResult)) show_error(getError($variablesResult));
|
||||
|
||||
// Then builds an array that contains objects with id (person_id) and description (Vorname + Nachname) of recipient
|
||||
$variables = array();
|
||||
foreach (getData($variablesResult) as $id => $description)
|
||||
{
|
||||
$tmpVar = new stdClass();
|
||||
$tmpVar->id = $id;
|
||||
$tmpVar->description = $description;
|
||||
|
||||
$variables[] = $tmpVar;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// Retrieves the sender id
|
||||
$sender_id = getAuthPersonId();
|
||||
if (!is_numeric($sender_id)) show_error('The current logged user person_id is not defined');
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// Organisation units and a boolean (true if the sender is administrator) are used to get the templates
|
||||
$organisationUnits = $this->messagelib->getOeKurzbz($sender_id);
|
||||
if (isError($organisationUnits)) show_error(getError($organisationUnits));
|
||||
$senderIsAdmin = $this->BenutzerrolleModel->isAdminByPersonId($sender_id);
|
||||
if (isError($senderIsAdmin)) show_error(getError($senderIsAdmin));
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// Returns data as an array
|
||||
return array (
|
||||
'recipientsList' => $recipientsList,
|
||||
'subject' => $replySubject,
|
||||
'body' => $replyBody,
|
||||
'variables' => $variables,
|
||||
'organisationUnits' => getData($organisationUnits),
|
||||
'senderIsAdmin' => getData($senderIsAdmin),
|
||||
'recipientsArray' => $recipientsArray,
|
||||
'recipients_ids' => $recipients_ids,
|
||||
'relationmessage_id' => $relationmessage,
|
||||
'type' => $type
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -521,4 +521,35 @@ class Prestudent_model extends DB_Model
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get organisation units for all the prestudents of a person
|
||||
*/
|
||||
public function getOrganisationunitsByPersonId($person_id)
|
||||
{
|
||||
$query = 'SELECT o.oe_kurzbz,
|
||||
o.bezeichnung,
|
||||
(CASE
|
||||
WHEN sg.typ = \'b\' THEN ps.prestudent_id
|
||||
WHEN sg.typ = \'m\' THEN p.prestudent_id
|
||||
ELSE NULL
|
||||
END) AS prestudent_id
|
||||
FROM public.tbl_prestudent p
|
||||
JOIN public.tbl_studiengang sg USING(studiengang_kz)
|
||||
JOIN public.tbl_organisationseinheit o USING(oe_kurzbz)
|
||||
LEFT JOIN (
|
||||
SELECT prestudent_id
|
||||
FROM public.tbl_prestudentstatus
|
||||
WHERE status_kurzbz = \'Bewerber\'
|
||||
) ps USING(prestudent_id)
|
||||
WHERE p.person_id = ?
|
||||
GROUP BY o.oe_kurzbz,
|
||||
o.bezeichnung,
|
||||
sg.typ,
|
||||
ps.prestudent_id,
|
||||
p.prestudent_id
|
||||
ORDER BY o.bezeichnung';
|
||||
|
||||
return $this->execQuery($query, array($person_id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,4 +18,19 @@ class Benutzer_model extends DB_Model
|
||||
return $this->loadWhere(array('person_id' => $person_id, 'aktiv' => true));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function getActiveUserByPersonIdAndOrganisationUnit($person_id, $oe_kurzbz)
|
||||
{
|
||||
$sql = 'SELECT b.uid
|
||||
FROM public.tbl_benutzer b
|
||||
JOIN public.tbl_prestudent ps USING (person_id)
|
||||
JOIN public.tbl_studiengang sg USING (studiengang_kz)
|
||||
WHERE ps.person_id = ?
|
||||
AND sg.oe_kurzbz = ?
|
||||
AND b.aktiv = TRUE';
|
||||
|
||||
return $this->execQuery($sql, array($person_id, $oe_kurzbz));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,16 +11,20 @@ class Benutzerfunktion_model extends DB_Model
|
||||
$this->dbTable = 'public.tbl_benutzerfunktion';
|
||||
$this->pk = 'benutzerfunktion_id';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the Benutzerfunktion using the person_id
|
||||
*/
|
||||
public function getByPersonId($person_id)
|
||||
public function getActiveFunctionsByPersonId($person_id)
|
||||
{
|
||||
// Join with the table
|
||||
$this->addJoin('public.tbl_benutzer', 'uid');
|
||||
|
||||
return $this->loadWhere(array('person_id' => $person_id));
|
||||
$query = 'SELECT bf.*
|
||||
FROM public.tbl_benutzerfunktion bf
|
||||
JOIN public.tbl_benutzer b USING (uid)
|
||||
WHERE b.person_id = ?
|
||||
AND (bf.datum_von IS NULL OR bf.datum_von <= now())
|
||||
AND (bf.datum_bis IS NULL OR bf.datum_bis >= now())';
|
||||
|
||||
return $this->execQuery($query, array($person_id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,17 +8,17 @@ class Kontakt_model extends DB_Model
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = "public.tbl_kontakt";
|
||||
$this->pk = "kontakt_id";
|
||||
$this->dbTable = 'public.tbl_kontakt';
|
||||
$this->pk = 'kontakt_id';
|
||||
}
|
||||
|
||||
|
||||
public function getWholeKontakt($kontakt_id, $person_id = null, $kontakttyp = null)
|
||||
{
|
||||
$result = null;
|
||||
|
||||
$this->addJoin("public.tbl_standort", "standort_id", "LEFT");
|
||||
$this->addJoin("public.tbl_firma", "firma_id", "LEFT");
|
||||
|
||||
|
||||
$this->addJoin('public.tbl_standort', 'standort_id', 'LEFT');
|
||||
$this->addJoin('public.tbl_firma', 'firma_id', 'LEFT');
|
||||
|
||||
if (isset($kontakt_id))
|
||||
{
|
||||
$result = $this->load($kontakt_id);
|
||||
@@ -26,22 +26,37 @@ class Kontakt_model extends DB_Model
|
||||
else
|
||||
{
|
||||
$parametersArray = array();
|
||||
|
||||
|
||||
if (!is_null($person_id))
|
||||
{
|
||||
$parametersArray["person_id"] = $person_id;
|
||||
$parametersArray['person_id'] = $person_id;
|
||||
}
|
||||
if (!is_null($kontakttyp))
|
||||
{
|
||||
$parametersArray["kontakttyp"] = $kontakttyp;
|
||||
$parametersArray['kontakttyp'] = $kontakttyp;
|
||||
}
|
||||
|
||||
|
||||
if (count($parametersArray) > 0)
|
||||
{
|
||||
$result = $this->loadWhere($parametersArray);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function getContactByPersonId($person_id, $kontakttyp)
|
||||
{
|
||||
$sql = 'SELECT kontakt
|
||||
FROM public.tbl_kontakt
|
||||
WHERE zustellung = TRUE
|
||||
AND person_id = ?
|
||||
AND kontakttyp = ?
|
||||
ORDER BY updateamum, insertamum';
|
||||
|
||||
return $this->execQuery($sql, array($person_id, $kontakttyp));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,4 +213,39 @@ class Person_model extends DB_Model
|
||||
|
||||
return $this->loadWhere(array('uid' => $uid, 'content' => true));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a person has a Bewerberstatus and reihungstestangetreten = true
|
||||
* @param $person_id
|
||||
* @param $studiensemester_kurzbz
|
||||
* @return array
|
||||
*/
|
||||
public function hasBewerber($person_id, $studiensemester_kurzbz, $studiengangtyp = null)
|
||||
{
|
||||
$parametersArray = array($person_id, $studiensemester_kurzbz);
|
||||
|
||||
$qry = "SELECT count(*) AS anzahl_bewerber FROM public.tbl_person
|
||||
JOIN public.tbl_prestudent USING (person_id)
|
||||
JOIN public.tbl_prestudentstatus ON tbl_prestudentstatus.prestudent_id = tbl_prestudent.prestudent_id";
|
||||
|
||||
if (isset($studiengangtyp))
|
||||
{
|
||||
$qry .= " JOIN lehre.tbl_studienplan USING(studienplan_id)
|
||||
JOIN lehre.tbl_studienordnung USING(studienordnung_id)
|
||||
JOIN public.tbl_studiengang ON tbl_studienordnung.studiengang_kz = tbl_studiengang.studiengang_kz";
|
||||
}
|
||||
|
||||
$qry .= " WHERE person_id = ?
|
||||
AND studiensemester_kurzbz = ?
|
||||
AND tbl_prestudentstatus.status_kurzbz = 'Bewerber'
|
||||
AND reihungstestangetreten";
|
||||
|
||||
if (isset($studiengangtyp))
|
||||
{
|
||||
$parametersArray[] = $studiengangtyp;
|
||||
$qry .= " AND tbl_studiengang.typ = ?";
|
||||
}
|
||||
|
||||
return $this->execQuery($qry, $parametersArray);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,24 +136,6 @@ class MessageToken_model extends DB_Model
|
||||
return $this->execQuery($sql, array($person_id));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get data of a person
|
||||
*/
|
||||
public function getPersonData($person_id)
|
||||
{
|
||||
$sql = 'SELECT person_id,
|
||||
vorname as "Vorname",
|
||||
nachname as "Nachname",
|
||||
anrede as "Anrede",
|
||||
titelpost as "TitelPost",
|
||||
titelpre as "TitelPre",
|
||||
vornamen as "Vornamen"
|
||||
FROM public.tbl_person
|
||||
WHERE person_id %s ?';
|
||||
|
||||
return $this->execQuery(sprintf($sql, is_array($person_id) ? 'IN' : '='), array($person_id));
|
||||
}
|
||||
|
||||
/**
|
||||
* Searchs for a person by its person_id and checks if it is an employee
|
||||
*/
|
||||
|
||||
@@ -25,7 +25,8 @@ class Recipient_model extends DB_Model
|
||||
ks.kontakt,
|
||||
p.nachname,
|
||||
p.vorname,
|
||||
b.uid
|
||||
b.uid,
|
||||
mr.sent
|
||||
FROM public.tbl_msg_recipient mr INNER JOIN public.tbl_msg_message mm USING (message_id)
|
||||
INNER JOIN public.tbl_person p ON (mm.person_id = p.person_id)
|
||||
LEFT JOIN public.tbl_benutzer b ON (mr.person_id = b.person_id)
|
||||
@@ -56,11 +57,13 @@ class Recipient_model extends DB_Model
|
||||
m.oe_kurzbz,
|
||||
s.status,
|
||||
s.statusinfo,
|
||||
s.insertamum as statusamum
|
||||
s.insertamum as statusamum,
|
||||
b.uid
|
||||
FROM public.tbl_msg_recipient r JOIN public.tbl_msg_message m USING (message_id)
|
||||
JOIN (
|
||||
SELECT * FROM public.tbl_msg_status WHERE status < ? ORDER BY insertamum DESC, status DESC
|
||||
) s ON (r.message_id = s.message_id AND r.person_id = s.person_id)
|
||||
) s ON (r.message_id = s.message_id AND r.person_id = s.person_id),
|
||||
LEFT JOIN public.tbl_benutzer b USING(person_id)
|
||||
WHERE r.token = ?
|
||||
LIMIT 1';
|
||||
|
||||
@@ -196,74 +199,24 @@ class Recipient_model extends DB_Model
|
||||
}
|
||||
|
||||
/**
|
||||
* getMessages
|
||||
* Gets all messages for which notice emails are still not sent
|
||||
*
|
||||
* Gets all the messages to be sent
|
||||
*
|
||||
* @param kontaktType specifies the type of the kontakt to get
|
||||
* @param sent specifies the status of the messages to get (NULL never sent, otherwise the shipping date)
|
||||
* @param limit specifies the number of messages to get
|
||||
* @param message_id specifies a single message
|
||||
* @param kontaktType specifies the type of the kontakt to get (email,...)
|
||||
* @param limit specifies the max number of messages to get
|
||||
* @param since specifies from which date messages have to be retrieved
|
||||
*/
|
||||
public function getMessages($kontaktType, $sent, $limit = null, $message_id = null)
|
||||
public function getNotSentMessages($limit, $since)
|
||||
{
|
||||
$query = 'SELECT mm.message_id,
|
||||
ks.kontakt as sender,
|
||||
kr.kontakt as receiver,
|
||||
mu.mitarbeiter_uid as employeeContact,
|
||||
ms.mitarbeiter_uid as senderemployeeContact,
|
||||
mr.person_id as receiver_id,
|
||||
mr.token,
|
||||
mm.subject,
|
||||
mm.body,
|
||||
mr.sentinfo
|
||||
FROM public.tbl_msg_recipient mr INNER JOIN public.tbl_msg_message mm USING (message_id)
|
||||
LEFT JOIN (
|
||||
SELECT person_id, kontakt FROM public.tbl_kontakt WHERE kontakttyp = ?
|
||||
) ks ON (ks.person_id = mm.person_id)
|
||||
LEFT JOIN (
|
||||
SELECT person_id, kontakt FROM public.tbl_kontakt WHERE kontakttyp = ?
|
||||
) kr ON (kr.person_id = mr.person_id)
|
||||
LEFT JOIN (
|
||||
SELECT b.person_id,
|
||||
m.mitarbeiter_uid
|
||||
FROM public.tbl_benutzer b INNER JOIN public.tbl_mitarbeiter m ON(b.uid = m.mitarbeiter_uid)
|
||||
WHERE b.aktiv = TRUE
|
||||
) mu ON (mu.person_id = mr.person_id)
|
||||
LEFT JOIN (
|
||||
SELECT b.person_id,
|
||||
m.mitarbeiter_uid
|
||||
FROM public.tbl_benutzer b INNER JOIN public.tbl_mitarbeiter m ON(b.uid = m.mitarbeiter_uid)
|
||||
WHERE b.aktiv = TRUE
|
||||
) ms ON (ms.person_id = mm.person_id)';
|
||||
$query = 'SELECT mm.message_id
|
||||
FROM public.tbl_msg_recipient mr
|
||||
JOIN public.tbl_msg_message mm USING (message_id)
|
||||
WHERE mr.sent IS NULL
|
||||
AND mr.sentinfo IS NULL
|
||||
AND mm.insertamum > ?
|
||||
ORDER BY mr.insertamum ASC
|
||||
LIMIT ?';
|
||||
|
||||
$parametersArray = array($kontaktType, $kontaktType);
|
||||
|
||||
if (is_null($sent) || $sent == '')
|
||||
{
|
||||
$query .= ' WHERE mr.sent IS NULL';
|
||||
}
|
||||
else
|
||||
{
|
||||
array_push($parametersArray, $sent);
|
||||
$query .= ' WHERE mr.sent = ?';
|
||||
}
|
||||
|
||||
if (!is_null($message_id))
|
||||
{
|
||||
array_push($parametersArray, $message_id);
|
||||
$query .= ' AND mm.message_id = ?';
|
||||
}
|
||||
|
||||
$query .= ' ORDER BY mr.insertamum ASC';
|
||||
|
||||
if (!is_null($limit))
|
||||
{
|
||||
$query .= ' LIMIT ?';
|
||||
array_push($parametersArray, $limit);
|
||||
}
|
||||
|
||||
return $this->execQuery($query, $parametersArray);
|
||||
return $this->execQuery($query, array($since, $limit));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -307,4 +260,137 @@ class Recipient_model extends DB_Model
|
||||
|
||||
return $this->execQuery($sql, $parametersArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* - Gets the directly recieved messages using the given person id
|
||||
* - Gets the recieved messages from an organisation unit where this person plays a role given by the parameter functions
|
||||
*/
|
||||
public function getReceivedMessages($person_id, $functions)
|
||||
{
|
||||
$sql = '-- Messages sent directly to the person
|
||||
SELECT mr.message_id,
|
||||
mm.relationmessage_id,
|
||||
mm.subject,
|
||||
mm.body,
|
||||
mm.insertamum AS sent,
|
||||
p.vorname,
|
||||
p.nachname,
|
||||
MAX(ms.status) AS status,
|
||||
ms.person_id AS statusPersonId,
|
||||
mr.token
|
||||
FROM public.tbl_msg_recipient mr
|
||||
JOIN public.tbl_msg_message mm ON (mm.message_id = mr.message_id)
|
||||
JOIN public.tbl_msg_status ms ON (ms.message_id = mr.message_id AND ms.person_id = mr.person_id)
|
||||
JOIN public.tbl_person p ON (p.person_id = mm.person_id)
|
||||
WHERE mr.person_id = ?
|
||||
GROUP BY mr.message_id,
|
||||
mm.relationmessage_id,
|
||||
mm.subject,
|
||||
mm.body,
|
||||
mm.insertamum,
|
||||
p.vorname,
|
||||
p.nachname,
|
||||
ms.person_id,
|
||||
mr.token
|
||||
UNION
|
||||
-- Messages sent to a person that belongs to the recipient organisation unit
|
||||
SELECT mrou.message_id,
|
||||
mm.relationmessage_id,
|
||||
mm.subject,
|
||||
mm.body,
|
||||
mm.insertamum AS sent,
|
||||
pr.vorname,
|
||||
pr.nachname,
|
||||
MAX(ms.status) AS status,
|
||||
ms.person_id AS statusPersonId,
|
||||
mrou.token
|
||||
FROM public.tbl_person p
|
||||
JOIN public.tbl_benutzer b ON (b.person_id = p.person_id)
|
||||
JOIN (
|
||||
SELECT uid, oe_kurzbz
|
||||
FROM public.tbl_benutzerfunktion
|
||||
WHERE (datum_von IS NULL OR datum_von <= NOW())
|
||||
AND (datum_bis IS NULL OR datum_bis >= NOW())
|
||||
AND funktion_kurzbz IN ?
|
||||
) bf ON (bf.uid = b.uid)
|
||||
JOIN public.tbl_msg_recipient mrou ON (mrou.oe_kurzbz = bf.oe_kurzbz)
|
||||
JOIN public.tbl_msg_message mm ON (mm.message_id = mrou.message_id)
|
||||
JOIN public.tbl_msg_status ms ON (ms.message_id = mrou.message_id AND ms.person_id = mrou.person_id)
|
||||
JOIN public.tbl_person pr ON (pr.person_id = mm.person_id)
|
||||
WHERE p.person_id = ?
|
||||
GROUP BY mrou.message_id,
|
||||
mm.relationmessage_id,
|
||||
mm.subject,
|
||||
mm.body,
|
||||
mm.insertamum,
|
||||
pr.vorname,
|
||||
pr.nachname,
|
||||
ms.person_id,
|
||||
mrou.token
|
||||
ORDER BY sent DESC';
|
||||
|
||||
return $this->execQuery($sql, array($person_id, $functions, $person_id));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all the sent message by the given person
|
||||
*/
|
||||
public function getSentMessages($person_id)
|
||||
{
|
||||
$sql = 'SELECT mm.message_id,
|
||||
mm.relationmessage_id,
|
||||
mm.subject,
|
||||
mm.body,
|
||||
mm.insertamum AS sent,
|
||||
p.person_id,
|
||||
p.vorname,
|
||||
p.nachname,
|
||||
MAX(ms.status) AS status,
|
||||
ms.person_id AS statusPersonId,
|
||||
oe.bezeichnung AS oe,
|
||||
mr.token
|
||||
FROM public.tbl_msg_message mm
|
||||
JOIN public.tbl_msg_recipient mr ON (mr.message_id = mm.message_id)
|
||||
JOIN public.tbl_msg_status ms ON (ms.message_id = mm.message_id AND ms.person_id = mr.person_id)
|
||||
JOIN public.tbl_person p ON (p.person_id = mr.person_id)
|
||||
LEFT JOIN public.tbl_organisationseinheit oe ON (oe.oe_kurzbz = mr.oe_kurzbz)
|
||||
WHERE mm.person_id = ?
|
||||
GROUP BY mm.message_id,
|
||||
mm.relationmessage_id,
|
||||
mm.subject,
|
||||
mm.body,
|
||||
mm.insertamum,
|
||||
p.person_id,
|
||||
p.vorname,
|
||||
p.nachname,
|
||||
ms.person_id,
|
||||
oe.bezeichnung,
|
||||
mr.token
|
||||
ORDER BY sent DESC';
|
||||
|
||||
return $this->execQuery($sql, array($person_id));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function getMessagesById($messageIds)
|
||||
{
|
||||
$sql = 'SELECT mm.message_id,
|
||||
mm.person_id AS sender_id,
|
||||
mm.subject,
|
||||
mm.body,
|
||||
mm.relationmessage_id,
|
||||
mm.oe_kurzbz AS sender_ou,
|
||||
mr.person_id AS receiver_id,
|
||||
mr.token,
|
||||
mr.sent,
|
||||
mr.sentinfo,
|
||||
mr.oe_kurzbz AS receiver_ou
|
||||
FROM public.tbl_msg_message mm
|
||||
JOIN public.tbl_msg_recipient mr ON (mr.message_id = mm.message_id)
|
||||
WHERE mm.message_id IN ?';
|
||||
|
||||
return $this->execQuery($sql, array($messageIds));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'StatusEdit'));
|
||||
|
||||
$s = $status;
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Status: <?php echo $s->status_kurzbz; ?></h2>
|
||||
<form method="post" action="../saveStatus">
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
beschreibung:<br/><br/>
|
||||
<input type="text" name="beschreibung" value="<?php echo $s->beschreibung; ?>" /><br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Anmerkung:<br/><br/>
|
||||
<textarea name="anmerkung"><?php echo $s->anmerkung; ?></textarea><br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Bezeichnung mehrsprachig:<br/><br/>
|
||||
|
||||
<?php
|
||||
$val = '';
|
||||
$i = 0;
|
||||
?>
|
||||
|
||||
<?php foreach ($sprache as $sp): ?>
|
||||
<?php echo $sp->sprache; ?>:<br/>
|
||||
<?php
|
||||
if (!isset($s->bezeichnung_mehrsprachig[$i]))
|
||||
{
|
||||
$val = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$val = $s->bezeichnung_mehrsprachig[$i];
|
||||
}
|
||||
$i++;
|
||||
?>
|
||||
<input type="text" name="bezeichnung_mehrsprachig[]" value="<?php echo $val; ?>" /><br/>
|
||||
<?php endforeach ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<button type="submit">Save</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="status_kurzbz" value="<?php echo $s->status_kurzbz; ?>" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<?php
|
||||
if (!is_null($update))
|
||||
{
|
||||
?>
|
||||
<script>
|
||||
parent.document.getElementById("StatusgrundLeft").contentWindow.location.reload(true);
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</html>
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'StatusEdit'));
|
||||
|
||||
$s = $status;
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Status: <?php echo $s->status_kurzbz; ?></h2>
|
||||
<form method="post" action="../saveStatus">
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
beschreibung:<br/><br/>
|
||||
<input type="text" name="beschreibung" value="<?php echo $s->beschreibung; ?>" /><br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Anmerkung:<br/><br/>
|
||||
<textarea name="anmerkung"><?php echo $s->anmerkung; ?></textarea><br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Bezeichnung mehrsprachig:<br/><br/>
|
||||
|
||||
<?php
|
||||
$val = '';
|
||||
$i = 0;
|
||||
?>
|
||||
|
||||
<?php foreach ($sprache as $sp): ?>
|
||||
<?php echo $sp->sprache; ?>:<br/>
|
||||
<?php
|
||||
if (!isset($s->bezeichnung_mehrsprachig[$i]))
|
||||
{
|
||||
$val = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$val = $s->bezeichnung_mehrsprachig[$i];
|
||||
}
|
||||
$i++;
|
||||
?>
|
||||
<input type="text" name="bezeichnung_mehrsprachig[]" value="<?php echo $val; ?>" /><br/>
|
||||
<?php endforeach ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<button type="submit">Save</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="status_kurzbz" value="<?php echo $s->status_kurzbz; ?>" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<?php
|
||||
if (!is_null($update))
|
||||
{
|
||||
?>
|
||||
<script>
|
||||
parent.document.getElementById("StatusgrundLeft").contentWindow.location.reload(true);
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
|
||||
<html lang="de_AT">
|
||||
|
||||
<head>
|
||||
<title>VileSci - Statusgrund</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
</head>
|
||||
|
||||
<frameset cols="30%, *">
|
||||
<frame src="Statusgrund/listStatus" id="StatusgrundLeft" name="StatusgrundLeft" frameborder="1" />
|
||||
<noframes>
|
||||
<body bgcolor="#FFFFFF">
|
||||
This application works only with a frames-enabled browser.<br />
|
||||
</body>
|
||||
</noframes>
|
||||
<frameset rows="30%, *">
|
||||
<frame src="" id="StatusgrundTop" name="StatusgrundTop" frameborder="1" />
|
||||
<noframes>
|
||||
<body bgcolor="#FFFFFF">
|
||||
This application works only with a frames-enabled browser.<br />
|
||||
</body>
|
||||
</noframes>
|
||||
<frame src="" id="StatusgrundBottom" name="StatusgrundBottom" frameborder="1" />
|
||||
<noframes>
|
||||
<body bgcolor="#FFFFFF">
|
||||
This application works only with a frames-enabled browser.<br />
|
||||
</body>
|
||||
</noframes>
|
||||
</frameset>
|
||||
</frameset>
|
||||
|
||||
</html>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
|
||||
<html lang="de_AT">
|
||||
|
||||
<head>
|
||||
<title>VileSci - Statusgrund</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
</head>
|
||||
|
||||
<frameset cols="30%, *">
|
||||
<frame src="Statusgrund/listStatus" id="StatusgrundLeft" name="StatusgrundLeft" frameborder="1" />
|
||||
<noframes>
|
||||
<body bgcolor="#FFFFFF">
|
||||
This application works only with a frames-enabled browser.<br />
|
||||
</body>
|
||||
</noframes>
|
||||
<frameset rows="30%, *">
|
||||
<frame src="" id="StatusgrundTop" name="StatusgrundTop" frameborder="1" />
|
||||
<noframes>
|
||||
<body bgcolor="#FFFFFF">
|
||||
This application works only with a frames-enabled browser.<br />
|
||||
</body>
|
||||
</noframes>
|
||||
<frame src="" id="StatusgrundBottom" name="StatusgrundBottom" frameborder="1" />
|
||||
<noframes>
|
||||
<body bgcolor="#FFFFFF">
|
||||
This application works only with a frames-enabled browser.<br />
|
||||
</body>
|
||||
</noframes>
|
||||
</frameset>
|
||||
</frameset>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,107 +1,107 @@
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'StatusgrundEdit'));
|
||||
|
||||
$sg = $statusgrund;
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Statusgrund: <?php echo $sg->status_kurzbz; ?></h2>
|
||||
<form method="post" action="<?php echo site_url("crm/Statusgrund/saveGrund"); ?>">
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Bezeichnung mehrsprachig:<br/><br/>
|
||||
<?php
|
||||
$i = 0;
|
||||
$val = "";
|
||||
?>
|
||||
<?php foreach ($sprache as $s): ?>
|
||||
<?php echo $s->sprache; ?>:<br/>
|
||||
<?php
|
||||
if (!isset($sg->bezeichnung_mehrsprachig[$i]))
|
||||
{
|
||||
$val = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
$val = $sg->bezeichnung_mehrsprachig[$i];
|
||||
}
|
||||
$i++;
|
||||
?>
|
||||
<input type="text" name="bezeichnung_mehrsprachig[]" value="<?php echo $val; ?>" /><br/>
|
||||
<?php endforeach ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Beschreibung:<br/><br/>
|
||||
<?php
|
||||
$i = 0;
|
||||
$val = "";
|
||||
?>
|
||||
<?php foreach ($sprache as $s): ?>
|
||||
<?php echo $s->sprache; ?>:<br/>
|
||||
<?php
|
||||
if (!isset($sg->beschreibung[$i]))
|
||||
{
|
||||
$val = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
$val = $sg->beschreibung[$i];
|
||||
}
|
||||
$i++;
|
||||
?>
|
||||
<textarea name="beschreibung[]"><?php echo $val; ?></textarea><br/>
|
||||
<?php endforeach ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Aktiv:
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="aktiv" <?php echo isset($sg->aktiv) && $sg->aktiv === true ? "checked" : ""; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<button type="submit">Save</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="statusgrund_id" value="<?php echo isset($sg->statusgrund_id) ? $sg->statusgrund_id : ""; ?>" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<?php
|
||||
if (!is_null($update))
|
||||
{
|
||||
?>
|
||||
<script>
|
||||
parent.document.getElementById("StatusgrundTop").contentWindow.location.reload(true);
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</html>
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'StatusgrundEdit'));
|
||||
|
||||
$sg = $statusgrund;
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Statusgrund: <?php echo $sg->status_kurzbz; ?></h2>
|
||||
<form method="post" action="<?php echo site_url("crm/Statusgrund/saveGrund"); ?>">
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Bezeichnung mehrsprachig:<br/><br/>
|
||||
<?php
|
||||
$i = 0;
|
||||
$val = "";
|
||||
?>
|
||||
<?php foreach ($sprache as $s): ?>
|
||||
<?php echo $s->sprache; ?>:<br/>
|
||||
<?php
|
||||
if (!isset($sg->bezeichnung_mehrsprachig[$i]))
|
||||
{
|
||||
$val = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
$val = $sg->bezeichnung_mehrsprachig[$i];
|
||||
}
|
||||
$i++;
|
||||
?>
|
||||
<input type="text" name="bezeichnung_mehrsprachig[]" value="<?php echo $val; ?>" /><br/>
|
||||
<?php endforeach ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Beschreibung:<br/><br/>
|
||||
<?php
|
||||
$i = 0;
|
||||
$val = "";
|
||||
?>
|
||||
<?php foreach ($sprache as $s): ?>
|
||||
<?php echo $s->sprache; ?>:<br/>
|
||||
<?php
|
||||
if (!isset($sg->beschreibung[$i]))
|
||||
{
|
||||
$val = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
$val = $sg->beschreibung[$i];
|
||||
}
|
||||
$i++;
|
||||
?>
|
||||
<textarea name="beschreibung[]"><?php echo $val; ?></textarea><br/>
|
||||
<?php endforeach ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Aktiv:
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="aktiv" <?php echo isset($sg->aktiv) && $sg->aktiv === true ? "checked" : ""; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<button type="submit">Save</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="statusgrund_id" value="<?php echo isset($sg->statusgrund_id) ? $sg->statusgrund_id : ""; ?>" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<?php
|
||||
if (!is_null($update))
|
||||
{
|
||||
?>
|
||||
<script>
|
||||
parent.document.getElementById("StatusgrundTop").contentWindow.location.reload(true);
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,66 +1,66 @@
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'StatusgrundNew'));
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Neuer Statusgrund</h2>
|
||||
<form method="post" action="<?php echo site_url("crm/Statusgrund/insGrund"); ?>">
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Bezeichnung mehrsprachig:<br/><br/>
|
||||
|
||||
<?php foreach ($sprache as $s): ?>
|
||||
<?php echo $s->sprache; ?>:<br/>
|
||||
<input type="text" name="bezeichnung_mehrsprachig[]" value="" /><br/>
|
||||
<?php endforeach ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Beschreibung:<br/><br/>
|
||||
|
||||
<?php foreach ($sprache as $s): ?>
|
||||
<?php echo $s->sprache; ?>:<br/>
|
||||
<textarea name="beschreibung[]"></textarea><br/>
|
||||
<?php endforeach ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Aktiv:
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="aktiv" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<button type="submit">Save</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="status_kurzbz" value="<?php echo $status_kurzbz; ?>" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'StatusgrundNew'));
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Neuer Statusgrund</h2>
|
||||
<form method="post" action="<?php echo site_url("crm/Statusgrund/insGrund"); ?>">
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Bezeichnung mehrsprachig:<br/><br/>
|
||||
|
||||
<?php foreach ($sprache as $s): ?>
|
||||
<?php echo $s->sprache; ?>:<br/>
|
||||
<input type="text" name="bezeichnung_mehrsprachig[]" value="" /><br/>
|
||||
<?php endforeach ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Beschreibung:<br/><br/>
|
||||
|
||||
<?php foreach ($sprache as $s): ?>
|
||||
<?php echo $s->sprache; ?>:<br/>
|
||||
<textarea name="beschreibung[]"></textarea><br/>
|
||||
<?php endforeach ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Aktiv:
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="aktiv" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<button type="submit">Save</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="status_kurzbz" value="<?php echo $status_kurzbz; ?>" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -166,12 +166,13 @@ $this->load->view(
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-offset-2 col-md-4 col-xs-6">
|
||||
<div class="input-group">
|
||||
<input id="password" type="password" class="form-control" placeholder="CIS-Passwort">
|
||||
<span class="input-group-btn">
|
||||
<button id="accept-lehrauftraege" class="btn btn-primary pull-right">Lehrauftrag annehmen</button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input id="username" type="hidden" value=""><!-- this is to prevent Chrome autofilling a random input field with the username-->
|
||||
<input id="password" type="password" autocomplete="new-password" class="form-control" placeholder="CIS-Passwort">
|
||||
<span class="input-group-btn">
|
||||
<button id="accept-lehrauftraege" class="btn btn-primary pull-right">Lehrauftrag annehmen</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
@@ -1,150 +1,150 @@
|
||||
<?php $this->load->view("templates/header", array("title" => "UDF", "widgetsCSS" => true)); ?>
|
||||
|
||||
<body style="background-color: #eff0f1;">
|
||||
|
||||
<?php
|
||||
if ($result != null)
|
||||
{
|
||||
if (isSuccess($result))
|
||||
{
|
||||
?>
|
||||
<div style="color: black;">
|
||||
Saved!
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<div style="color: red;">
|
||||
Error while saving!
|
||||
</div>
|
||||
<br>
|
||||
<div style="color: red;">
|
||||
<?php
|
||||
$errors = $result->retval;
|
||||
if(is_array($errors))
|
||||
{
|
||||
foreach ($errors as $error)
|
||||
{
|
||||
foreach ($error as $fieldError)
|
||||
{
|
||||
echo $fieldError->code . ': ' . $fieldError->retval . '<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
echo $result->retval;
|
||||
?>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<form action="<?php echo site_url('system/FAS_UDF/saveUDF'); ?>" method="POST">
|
||||
|
||||
<div class="div-table">
|
||||
<div class="div-row">
|
||||
<div class="div-cell" style="font-size: 20px; font-weight: bold;">
|
||||
Zusatzfelder
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-row">
|
||||
<div class="div-cell">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-row">
|
||||
<?php
|
||||
if (isset($personUdfs))
|
||||
{
|
||||
?>
|
||||
<div class="div-cell">
|
||||
<?php
|
||||
echo $this->udflib->UDFWidget(
|
||||
array(
|
||||
UDFLib::SCHEMA_ARG_NAME => 'public',
|
||||
UDFLib::TABLE_ARG_NAME => 'tbl_person',
|
||||
UDFLib::UDFS_ARG_NAME => $personUdfs
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div class="div-cell" style="width: 40px;">
|
||||
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (isset($prestudentUdfs))
|
||||
{
|
||||
?>
|
||||
<div class="div-cell">
|
||||
<?php
|
||||
echo $this->udflib->UDFWidget(
|
||||
array(
|
||||
UDFLib::SCHEMA_ARG_NAME => 'public',
|
||||
UDFLib::TABLE_ARG_NAME => 'tbl_prestudent',
|
||||
UDFLib::UDFS_ARG_NAME => $prestudentUdfs
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="div-row">
|
||||
<div class="div-cell">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-row halign-right">
|
||||
<?php
|
||||
if (isset($personUdfs) && isset($prestudentUdfs))
|
||||
{
|
||||
?>
|
||||
<div class="div-cell">
|
||||
|
||||
</div>
|
||||
<div class="div-cell">
|
||||
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="div-cell halign-right">
|
||||
<input type="submit" value=" Speichern ">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (isset($personUdfs))
|
||||
{
|
||||
?>
|
||||
<input type="hidden" name="person_id" value="<?php echo $personUdfs['person_id']; ?>">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (isset($prestudentUdfs))
|
||||
{
|
||||
?>
|
||||
<input type="hidden" name="prestudent_id" value="<?php echo $prestudentUdfs['prestudent_id']; ?>">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
|
||||
<?php $this->load->view("templates/footer"); ?>
|
||||
<?php $this->load->view("templates/header", array("title" => "UDF", "widgetsCSS" => true)); ?>
|
||||
|
||||
<body style="background-color: #eff0f1;">
|
||||
|
||||
<?php
|
||||
if ($result != null)
|
||||
{
|
||||
if (isSuccess($result))
|
||||
{
|
||||
?>
|
||||
<div style="color: black;">
|
||||
Saved!
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<div style="color: red;">
|
||||
Error while saving!
|
||||
</div>
|
||||
<br>
|
||||
<div style="color: red;">
|
||||
<?php
|
||||
$errors = $result->retval;
|
||||
if(is_array($errors))
|
||||
{
|
||||
foreach ($errors as $error)
|
||||
{
|
||||
foreach ($error as $fieldError)
|
||||
{
|
||||
echo $fieldError->code . ': ' . $fieldError->retval . '<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
echo $result->retval;
|
||||
?>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<form action="<?php echo site_url('system/FAS_UDF/saveUDF'); ?>" method="POST">
|
||||
|
||||
<div class="div-table">
|
||||
<div class="div-row">
|
||||
<div class="div-cell" style="font-size: 20px; font-weight: bold;">
|
||||
Zusatzfelder
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-row">
|
||||
<div class="div-cell">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-row">
|
||||
<?php
|
||||
if (isset($personUdfs))
|
||||
{
|
||||
?>
|
||||
<div class="div-cell">
|
||||
<?php
|
||||
echo $this->udflib->UDFWidget(
|
||||
array(
|
||||
UDFLib::SCHEMA_ARG_NAME => 'public',
|
||||
UDFLib::TABLE_ARG_NAME => 'tbl_person',
|
||||
UDFLib::UDFS_ARG_NAME => $personUdfs
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div class="div-cell" style="width: 40px;">
|
||||
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (isset($prestudentUdfs))
|
||||
{
|
||||
?>
|
||||
<div class="div-cell">
|
||||
<?php
|
||||
echo $this->udflib->UDFWidget(
|
||||
array(
|
||||
UDFLib::SCHEMA_ARG_NAME => 'public',
|
||||
UDFLib::TABLE_ARG_NAME => 'tbl_prestudent',
|
||||
UDFLib::UDFS_ARG_NAME => $prestudentUdfs
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="div-row">
|
||||
<div class="div-cell">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-row halign-right">
|
||||
<?php
|
||||
if (isset($personUdfs) && isset($prestudentUdfs))
|
||||
{
|
||||
?>
|
||||
<div class="div-cell">
|
||||
|
||||
</div>
|
||||
<div class="div-cell">
|
||||
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="div-cell halign-right">
|
||||
<input type="submit" value=" Speichern ">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (isset($personUdfs))
|
||||
{
|
||||
?>
|
||||
<input type="hidden" name="person_id" value="<?php echo $personUdfs['person_id']; ?>">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (isset($prestudentUdfs))
|
||||
{
|
||||
?>
|
||||
<input type="hidden" name="prestudent_id" value="<?php echo $prestudentUdfs['prestudent_id']; ?>">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
|
||||
<?php $this->load->view("templates/footer"); ?>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
'customJSs' => array(
|
||||
'public/js/bootstrapper.js',
|
||||
'public/js/tablesort/tablesort.js',
|
||||
'public/js/messaging/messageList.js',
|
||||
'public/js/infocenter/messageList.js',
|
||||
'public/js/infocenter/infocenterDetails.js'
|
||||
),
|
||||
'phrases' => array(
|
||||
@@ -154,7 +154,7 @@
|
||||
<div class="panel-body">
|
||||
<div class="row" id="messagelist">
|
||||
<?php
|
||||
$this->load->view('system/messages/messageList.php', $messages);
|
||||
$this->load->view('system/infocenter/messageList.php', $messages);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<table id="logtable" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo ucfirst($this->p->t('global', 'datum')) ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('global', 'aktivitaet')) ?></th>
|
||||
<th>User</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($logs as $log): ?>
|
||||
<tr data-toggle="tooltip"
|
||||
title="<?php echo isset($log->logdata->message) ? $log->logdata->message : '' ?>">
|
||||
<td><?php echo date_format(date_create($log->zeitpunkt), 'd.m.Y H:i:s') ?></td>
|
||||
<td><?php echo isset($log->logdata->name) ? $log->logdata->name : '' ?></td>
|
||||
<td><?php echo $log->insertvon ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
<table id="logtable" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo ucfirst($this->p->t('global', 'datum')) ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('global', 'aktivitaet')) ?></th>
|
||||
<th>User</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($logs as $log): ?>
|
||||
<tr data-toggle="tooltip"
|
||||
title="<?php echo isset($log->logdata->message) ? $log->logdata->message : '' ?>">
|
||||
<td><?php echo date_format(date_create($log->zeitpunkt), 'd.m.Y H:i:s') ?></td>
|
||||
<td><?php echo isset($log->logdata->name) ? $log->logdata->name : '' ?></td>
|
||||
<td><?php echo $log->insertvon ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
+37
-37
@@ -1,37 +1,37 @@
|
||||
<?php
|
||||
$msgExists = count($messages) > 0;
|
||||
$widthColumn = $msgExists === true ? 8 : 12;
|
||||
?>
|
||||
<div class="col-lg-<?php echo $widthColumn ?>">
|
||||
<table id="msgtable" class="table table-bordered table-condensed tablesort-hover tablesort-active">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo ucfirst($this->p->t('global','gesendetAm')) ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('global','sender')) ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('global','empfaenger')) ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('global','betreff')) ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('global','gelesenAm')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($messages as $message): ?>
|
||||
<tr id="<?php echo $message->message_id.'_'.$message->repersonid ?>" style="cursor: pointer">
|
||||
<td><?php echo isset($message->insertamum) ? date_format(date_create($message->insertamum), 'd.m.Y H:i:s') : '' ?></td>
|
||||
<td><?php echo $message->sevorname.' '.$message->senachname ?></td>
|
||||
<td><?php echo $message->revorname.' '.$message->renachname ?></td>
|
||||
<td><?php echo $message->subject ?></td>
|
||||
<td><?php echo isset($message->statusamum) ? date_format(date_create($message->statusamum), 'd.m.Y H:i:s') : '' ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php if ($msgExists === true): ?>
|
||||
<div class="col-lg-4">
|
||||
<br>
|
||||
<div class="text-center"><label for="msgbody" id="msgsubject"></label></div>
|
||||
<div>
|
||||
<textarea id="msgbody"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
$msgExists = count($messages) > 0;
|
||||
$widthColumn = $msgExists === true ? 8 : 12;
|
||||
?>
|
||||
<div class="col-lg-<?php echo $widthColumn ?>">
|
||||
<table id="msgtable" class="table table-bordered table-condensed tablesort-hover tablesort-active">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo ucfirst($this->p->t('global','gesendetAm')) ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('global','sender')) ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('global','empfaenger')) ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('global','betreff')) ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('global','gelesenAm')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($messages as $message): ?>
|
||||
<tr id="<?php echo $message->message_id.'_'.$message->repersonid ?>" style="cursor: pointer">
|
||||
<td><?php echo isset($message->insertamum) ? date_format(date_create($message->insertamum), 'd.m.Y H:i:s') : '' ?></td>
|
||||
<td><?php echo $message->sevorname.' '.$message->senachname ?></td>
|
||||
<td><?php echo $message->revorname.' '.$message->renachname ?></td>
|
||||
<td><?php echo $message->subject ?></td>
|
||||
<td><?php echo isset($message->statusamum) ? date_format(date_create($message->statusamum), 'd.m.Y H:i:s') : '' ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php if ($msgExists === true): ?>
|
||||
<div class="col-lg-4">
|
||||
<br>
|
||||
<div class="text-center"><label for="msgbody" id="msgsubject"></label></div>
|
||||
<div>
|
||||
<textarea id="msgbody"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -1,20 +1,20 @@
|
||||
<table id="notiztable" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo ucfirst($this->p->t('global', 'datum')) ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('global', 'notiz')) ?></th>
|
||||
<th>User</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($notizen as $notiz): ?>
|
||||
<tr data-toggle="tooltip"
|
||||
title="<?php echo isset($notiz->text) ? html_escape($notiz->text) : '' ?>" style="cursor: pointer">
|
||||
<td><?php echo date_format(date_create($notiz->insertamum), 'd.m.Y H:i:s') ?></td>
|
||||
<td><?php echo html_escape($notiz->titel) ?></td>
|
||||
<td><?php echo $notiz->verfasser_uid ?></td>
|
||||
<td style="display: none" class="hiddennotizid"><?php echo $notiz->notiz_id ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
<table id="notiztable" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo ucfirst($this->p->t('global', 'datum')) ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('global', 'notiz')) ?></th>
|
||||
<th>User</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($notizen as $notiz): ?>
|
||||
<tr data-toggle="tooltip"
|
||||
title="<?php echo isset($notiz->text) ? html_escape($notiz->text) : '' ?>" style="cursor: pointer">
|
||||
<td><?php echo date_format(date_create($notiz->insertamum), 'd.m.Y H:i:s') ?></td>
|
||||
<td><?php echo html_escape($notiz->titel) ?></td>
|
||||
<td><?php echo $notiz->verfasser_uid ?></td>
|
||||
<td style="display: none" class="hiddennotizid"><?php echo $notiz->notiz_id ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -113,7 +113,7 @@
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<form id="sendmsgform" method="post" action="<?php echo site_url('/system/Messages/write'); ?>" target="_blank">
|
||||
<form id="sendmsgform" method="post" action="<?php echo site_url('/system/messages/Messages/writeTemplate'); ?>" target="_blank">
|
||||
<input type="hidden" name="person_id" value="<?php echo $stammdaten->person_id ?>">
|
||||
<a id="sendmsglink" href="javascript:void(0);">
|
||||
<i class="fa fa-envelope"></i> <?php echo $this->p->t('ui','nachrichtSenden'); ?>
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
array(
|
||||
'title' => 'Read personal messages',
|
||||
'jquery' => true,
|
||||
'jqueryui' => true,
|
||||
'bootstrap' => true,
|
||||
'fontawesome' => true,
|
||||
'sbadmintemplate' => true,
|
||||
'momentjs' => true,
|
||||
'tabulator' => true,
|
||||
'ajaxlib' => true,
|
||||
'dialoglib' => true,
|
||||
'tinymce' => true,
|
||||
'phrases' => array('global', 'ui'),
|
||||
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'),
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/read.js')
|
||||
)
|
||||
);
|
||||
?>
|
||||
<body>
|
||||
|
||||
<fieldset>
|
||||
|
||||
<span id="toggleMessages" class="toggle">
|
||||
|
||||
<input type="radio" name="toggleMessages" id="received" checked>
|
||||
<label for="received">
|
||||
|
||||
<?php echo $this->p->t('global', 'received'); ?>
|
||||
|
||||
</label>
|
||||
|
||||
<input type="radio" name="toggleMessages" id="sent">
|
||||
<label for="sent">
|
||||
|
||||
<?php echo ucfirst($this->p->t('global', 'gesendet')); ?>
|
||||
|
||||
</label>
|
||||
|
||||
</span>
|
||||
|
||||
<span class="buttonsSpacer"></span>
|
||||
|
||||
<span>
|
||||
<input id="writeMessage" type="button" value="<?php echo $this->p->t('ui', 'nachrichtSenden'); ?>">
|
||||
|
||||
<input id="replyMessage" type="button" value="<?php echo $this->p->t('global', 'reply'); ?>">
|
||||
</span>
|
||||
|
||||
</fieldset>
|
||||
|
||||
|
||||
<div id="lstMessagesPanel"></div>
|
||||
|
||||
<div id="readMessagePanel"></div>
|
||||
|
||||
</body>
|
||||
|
||||
<?php $this->load->view("templates/FHC-Footer"); ?>
|
||||
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
array(
|
||||
'title' => 'Write a new message',
|
||||
'jquery' => true,
|
||||
'jqueryui' => true,
|
||||
'bootstrap' => true,
|
||||
'fontawesome' => true,
|
||||
'sbadmintemplate' => true,
|
||||
'ajaxlib' => true,
|
||||
'dialoglib' => true,
|
||||
'tinymce' => true,
|
||||
'phrases' => array('global', 'ui'),
|
||||
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'),
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/write.js')
|
||||
)
|
||||
);
|
||||
?>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header">
|
||||
|
||||
<?php echo $this->p->t('ui', 'nachrichtSenden'); ?>
|
||||
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-1 msgfieldcol-left">
|
||||
<label>
|
||||
|
||||
<?php echo $this->p->t('global', 'empfaenger'); ?>:
|
||||
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-lg-11 msgfieldcol-right">
|
||||
<select id="organisationUnit">
|
||||
|
||||
<?php echo $organisationUnitOptions; ?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-1 msgfield msgfieldcol-left">
|
||||
<label>
|
||||
|
||||
<?php echo $this->p->t('global', 'betreff'); ?>:
|
||||
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-7">
|
||||
<input id="subject" class="form-control" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<label>
|
||||
|
||||
<?php echo $this->p->t('global', 'nachricht'); ?>:
|
||||
|
||||
</label>
|
||||
<textarea id="body"></textarea>
|
||||
|
||||
<br>
|
||||
|
||||
<div>
|
||||
|
||||
<?php echo $this->p->t('ui', 'altRecipientNote'); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 text-right">
|
||||
<button id="sendButton" class="btn btn-default" type="button">
|
||||
|
||||
<?php echo $this->p->t('ui', 'senden'); ?>
|
||||
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<?php $this->load->view("templates/FHC-Footer"); ?>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
array(
|
||||
'title' => 'Reply to a message',
|
||||
'jquery' => true,
|
||||
'jqueryui' => true,
|
||||
'bootstrap' => true,
|
||||
'fontawesome' => true,
|
||||
'sbadmintemplate' => true,
|
||||
'ajaxlib' => true,
|
||||
'dialoglib' => true,
|
||||
'tinymce' => true,
|
||||
'phrases' => array('global', 'ui'),
|
||||
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'),
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/writeReply.js')
|
||||
)
|
||||
);
|
||||
?>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header">
|
||||
|
||||
<?php echo $this->p->t('ui', 'nachrichtSenden'); ?>
|
||||
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-1 msgfieldcol-left">
|
||||
<label>
|
||||
|
||||
<?php echo ucfirst($this->p->t('global', 'empfaenger')); ?>:
|
||||
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-lg-11 msgfieldcol-right">
|
||||
|
||||
<?php echo $receiver; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-1 msgfield msgfieldcol-left">
|
||||
<label>
|
||||
|
||||
<?php echo ucfirst($this->p->t('global', 'betreff')); ?>:
|
||||
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-7">
|
||||
|
||||
<input id="subject" name="subject" type="text" value="<?php echo $subject; ?>">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<label>
|
||||
|
||||
<?php echo ucfirst($this->p->t('global', 'nachricht')); ?>:
|
||||
|
||||
</label>
|
||||
<textarea id="body">
|
||||
|
||||
<?php echo $body; ?>
|
||||
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 text-right">
|
||||
|
||||
<input id="receiver_id" type="hidden" value="<?php echo $receiver_id; ?>">
|
||||
<input id="relationmessage_id" type="hidden" value="<?php echo $relationmessage_id; ?>">
|
||||
<input id="token" type="hidden" value="<?php echo $token; ?>">
|
||||
|
||||
<button id="sendButton" class="btn btn-default" type="button">
|
||||
|
||||
<?php echo $this->p->t('ui', 'senden'); ?>
|
||||
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<?php $this->load->view("templates/FHC-Footer"); ?>
|
||||
+12
-33
@@ -2,12 +2,12 @@
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
array(
|
||||
'title' => 'MessageSent',
|
||||
'title' => 'Message sent failure - Fehler beim Senden der Nachricht',
|
||||
'jquery' => true,
|
||||
'bootstrap' => true,
|
||||
'fontawesome' => true,
|
||||
'sbadmintemplate' => true,
|
||||
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/messageSent.css')
|
||||
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css')
|
||||
)
|
||||
);
|
||||
?>
|
||||
@@ -20,47 +20,31 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xs-6">
|
||||
<h3 class="page-header text-right">Thank you for getting in touch!</h3>
|
||||
<h3 class="page-header text-right"></h3>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6">
|
||||
<h3 class="page-header">Danke für die Kontaktaufnahme!</h3>
|
||||
<h3 class="page-header"></h3>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="panel panel-success">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-right">
|
||||
Message sent successfully!
|
||||
An error occurred while sending your message, please try later.
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
Nachricht erfolgreich versandt!
|
||||
Beim Senden Ihrer Nachricht ist ein Fehler aufgetreten. Bitte versuchen Sie es später erneut.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-right">
|
||||
<span class="rwd-line">
|
||||
Thank you for your message.
|
||||
</span>
|
||||
<span class="rwd-line">
|
||||
We will get back to you shortly.
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<span class="rwd-line">
|
||||
Herzlichen Dank für Ihre Nachricht.
|
||||
</span>
|
||||
<span class="rwd-line">
|
||||
Wir werden uns schnellstmöglich um Ihr Anliegen kümmern.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
@@ -72,18 +56,12 @@
|
||||
Sie können dieses Fenster schließen.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-right">
|
||||
Your InfoCenter@FHTW Team
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
Ihr InfoCenter@FHTW Team
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-center">
|
||||
<p class="signatureblock">
|
||||
@@ -93,6 +71,7 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
+2
-12
@@ -2,12 +2,12 @@
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
array(
|
||||
'title' => 'MessageSent',
|
||||
'title' => 'Message sent successfully - Nachricht erfolgreich versandt!',
|
||||
'jquery' => true,
|
||||
'bootstrap' => true,
|
||||
'fontawesome' => true,
|
||||
'sbadmintemplate' => true,
|
||||
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/messageSent.css')
|
||||
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css')
|
||||
)
|
||||
);
|
||||
?>
|
||||
@@ -17,11 +17,6 @@
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
|
||||
<?php
|
||||
if ($success)
|
||||
{
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xs-6">
|
||||
@@ -79,11 +74,6 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
+104
-75
@@ -1,75 +1,104 @@
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
array(
|
||||
'title' => 'MessageSent',
|
||||
'jquery' => true,
|
||||
'bootstrap' => true,
|
||||
'fontawesome' => true,
|
||||
'sbadmintemplate' => true,
|
||||
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/messageReply.css')
|
||||
)
|
||||
);
|
||||
?>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h3 class="page-header text-center">You have a new message</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="panel panel-success">
|
||||
<div class="panel-heading text-center">
|
||||
<?php echo $message->subject; ?>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table class="table table-condensed table-bordered" id="msgtable" align="center">
|
||||
<tr>
|
||||
<td width="80px">
|
||||
<b>From:</b>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $sender->vorname.' '.$sender->nachname; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="80px">
|
||||
<b>Subject:</b>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $message->subject; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="80px">
|
||||
<b>Message:</b>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $message->body; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-center">
|
||||
<?php if ($isEmployee === false && $href != ''): ?>
|
||||
<button class="btn btn-default" id="replybutton" onclick="location.href='<?php echo $href; ?>';">
|
||||
<i class="fa fa-reply"></i> Reply
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<?php $this->load->view("templates/FHC-Footer"); ?>
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
array(
|
||||
'title' => 'Read message - Lies die Nachricht',
|
||||
'jquery' => true,
|
||||
'bootstrap' => true,
|
||||
'fontawesome' => true,
|
||||
'sbadmintemplate' => true,
|
||||
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css')
|
||||
)
|
||||
);
|
||||
?>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h3 class="page-header text-center">
|
||||
|
||||
<?php echo ucfirst($this->p->t('ui', 'newMessage')); ?>:
|
||||
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="panel panel-success">
|
||||
<div class="panel-heading text-center">
|
||||
|
||||
<?php echo $message->subject; ?>
|
||||
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table class="table table-condensed table-bordered" id="msgtable" align="center">
|
||||
<tr>
|
||||
<td width="80px">
|
||||
<b>
|
||||
|
||||
<?php echo ucfirst($this->p->t('ui', 'from')); ?>:
|
||||
|
||||
</b>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<?php echo $sender->vorname.' '.$sender->nachname; ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="80px">
|
||||
<b>
|
||||
|
||||
<?php echo ucfirst($this->p->t('global', 'betreff')); ?>:
|
||||
|
||||
</b>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<?php echo $message->subject; ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="80px">
|
||||
<b>
|
||||
|
||||
<?php echo ucfirst($this->p->t('global', 'nachricht')); ?>:
|
||||
|
||||
</b>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<?php echo $message->body; ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-center">
|
||||
|
||||
<?php if (!isEmptyString($hrefReply)): ?>
|
||||
|
||||
<button class="btn btn-default" id="replybutton" onclick="location.href='<?php echo $hrefReply; ?>';">
|
||||
<i class="fa fa-reply"></i> <?php echo ucfirst($this->p->t('global', 'reply')); ?>
|
||||
</button>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<?php $this->load->view("templates/FHC-Footer"); ?>
|
||||
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
array(
|
||||
'title' => 'Reply to a message',
|
||||
'jquery' => true,
|
||||
'bootstrap' => true,
|
||||
'fontawesome' => true,
|
||||
'tinymce' => true,
|
||||
'sbadmintemplate' => true,
|
||||
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'),
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/messageWriteReply.js')
|
||||
)
|
||||
);
|
||||
?>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header">
|
||||
|
||||
<?php echo ucfirst($this->p->t('ui', 'nachrichtSenden')); ?>
|
||||
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<form id="sendForm" method="post" action="<?php echo site_url('system/messages/ViewMessage/sendReply'); ?>">
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-1 msgfieldcol-left">
|
||||
<label>
|
||||
|
||||
<?php echo ucfirst($this->p->t('global', 'empfaenger')); ?>:
|
||||
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-lg-11 msgfieldcol-right">
|
||||
|
||||
<?php echo $receiver; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-1 msgfield msgfieldcol-left">
|
||||
<label>
|
||||
|
||||
<?php echo ucfirst($this->p->t('global', 'betreff')); ?>:
|
||||
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-7">
|
||||
<input id="subject" class="form-control" type="text" value="<?php echo $subject; ?>" name="subject">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<label>
|
||||
|
||||
<?php echo ucfirst($this->p->t('global', 'nachricht')); ?>:
|
||||
|
||||
</label>
|
||||
<textarea id="bodyTextArea" name="body"><?php echo $body; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 text-right">
|
||||
<button id="sendButton" class="btn btn-default" type="button">
|
||||
|
||||
<?php echo $this->p->t('ui', 'senden'); ?>
|
||||
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="receiver_id" value="<?php echo $receiver_id; ?>">
|
||||
<input type="hidden" name="relationmessage_id" value="<?php echo $relationmessage_id; ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<?php $this->load->view("templates/FHC-Footer"); ?>
|
||||
@@ -0,0 +1,170 @@
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
array(
|
||||
'title' => 'Write a new message or reply using templates',
|
||||
'jquery' => true,
|
||||
'jqueryui' => true,
|
||||
'bootstrap' => true,
|
||||
'ajaxlib' => true,
|
||||
'fontawesome' => true,
|
||||
'tinymce' => true,
|
||||
'sbadmintemplate' => true,
|
||||
'dialoglib' => true,
|
||||
'widgets' => true,
|
||||
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'),
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/messageWrite.js')
|
||||
)
|
||||
);
|
||||
?>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header">
|
||||
|
||||
<?php echo ucfirst($this->p->t('ui', 'nachrichtSenden')); ?>
|
||||
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<form id="sendForm" method="post" action="<?php echo site_url('/system/messages/Messages/sendImplicitTemplate'); ?>">
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-1 msgfieldcol-left">
|
||||
<label>
|
||||
|
||||
<?php echo ucfirst($this->p->t('global', 'empfaenger')); ?>:
|
||||
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-lg-11 msgfieldcol-right">
|
||||
<?php echo $recipientsList; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-1 msgfield msgfieldcol-left">
|
||||
<label>
|
||||
|
||||
<?php echo ucfirst($this->p->t('global', 'betreff')); ?>:
|
||||
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-7">
|
||||
<input id="subject" class="form-control" type="text" value="<?php echo $subject; ?>" name="subject">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-lg-9">
|
||||
<label>
|
||||
|
||||
<?php echo ucfirst($this->p->t('global', 'nachricht')); ?>:
|
||||
|
||||
</label>
|
||||
<textarea id="bodyTextArea" name="body">
|
||||
|
||||
<?php echo $body; ?>
|
||||
|
||||
</textarea>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<label>
|
||||
|
||||
<?php echo ucfirst($this->p->t('ui', 'felder')); ?>:
|
||||
|
||||
</label>
|
||||
|
||||
<?php
|
||||
echo $this->widgetlib->widget(
|
||||
'MultipleDropdown_widget',
|
||||
array('elements' => success($variables)),
|
||||
array(
|
||||
'name' => 'variables[]',
|
||||
'id' => 'variables',
|
||||
'size' => 27,
|
||||
'multiple' => true
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
|
||||
<?php
|
||||
echo $this->widgetlib->widget(
|
||||
'Vorlage_widget',
|
||||
array('oe_kurzbz' => $organisationUnits, 'isAdmin' => $senderIsAdmin),
|
||||
array('name' => 'vorlage', 'id' => 'vorlageDnD')
|
||||
);
|
||||
?>
|
||||
|
||||
</div>
|
||||
<div class="col-lg-7 col-xs-9 text-right">
|
||||
<button id="sendButton" class="btn btn-default" type="button">
|
||||
|
||||
<?php echo $this->p->t('ui', 'senden'); ?>
|
||||
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<label>
|
||||
|
||||
<?php echo ucfirst($this->p->t('global', 'vorschau')); ?>:
|
||||
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="well" id="templatePreviewDiv">
|
||||
<div class="row">
|
||||
<div class="col-sm-12" style="display: inline">
|
||||
<div class="form-group form-inline">
|
||||
<div class="input-group">
|
||||
<?php
|
||||
echo $this->widgetlib->widget(
|
||||
'Dropdown_widget',
|
||||
array('elements' => success($recipientsArray), 'emptyElement' => ucfirst($this->p->t('global', 'empfaenger')).'...'),
|
||||
array(
|
||||
'name' => 'recipients[]',
|
||||
'id' => 'recipients'
|
||||
)
|
||||
);
|
||||
?>
|
||||
<span class="input-group-btn">
|
||||
<a class="btn btn-default" href="#templatePreviewDiv" id="refresh">
|
||||
<?php echo ucfirst($this->p->t('ui', 'refresh')); ?>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<textarea id="tinymcePreview"></textarea>
|
||||
</div>
|
||||
|
||||
<?php echo $recipients_ids; ?>
|
||||
<?php echo $relationmessage_id; ?>
|
||||
<?php echo $type; ?>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<?php $this->load->view("templates/FHC-Footer"); ?>
|
||||
@@ -1,81 +0,0 @@
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-1 msgfieldcol-left">
|
||||
<label>Receiver:</label>
|
||||
</div>
|
||||
<div class="col-lg-11 msgfieldcol-right">
|
||||
<?php
|
||||
for ($i = 0; $i < count($receivers); $i++)
|
||||
{
|
||||
$receiver = $receivers[$i];
|
||||
// Every 10 recipients a new line
|
||||
if ($i > 1 && $i % 10 == 0)
|
||||
{
|
||||
echo '<br>';
|
||||
}
|
||||
echo $receiver->Vorname." ".$receiver->Nachname."; ";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-1 msgfield msgfieldcol-left">
|
||||
<label>Subject:</label>
|
||||
</div>
|
||||
<?php
|
||||
$subject = '';
|
||||
if (isset($message))
|
||||
{
|
||||
$subject = 'Re: '.$message->subject;
|
||||
}
|
||||
?>
|
||||
<div class="col-lg-7">
|
||||
<input id="subject" class="form-control" type="text" value="<?php echo $subject; ?>"
|
||||
name="subject">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-lg-<?php echo isset($variables) ? 10 : 12 ?>">
|
||||
<label>Message:</label>
|
||||
<?php
|
||||
$body = '';
|
||||
if (isset($message))
|
||||
{
|
||||
if (isset($receivers[0]))
|
||||
$body .= '<p></p><p></p><blockquote><i>On '.date_format(date_create($message->sent), 'd.m.Y H:i').' '.$receivers[0]->Vorname.' '.$receivers[0]->Nachname.' wrote:'.'</i></blockquote>';
|
||||
$body .= '<blockquote style="border-left:2px solid; padding-left: 8px">';
|
||||
$body .= $message->body.'</blockquote>';
|
||||
}
|
||||
?>
|
||||
<textarea id="bodyTextArea" name="body"><?php echo $body; ?></textarea>
|
||||
</div>
|
||||
<?php
|
||||
if (isset($variables)):
|
||||
?>
|
||||
<div class="col-lg-2">
|
||||
<div class="form-group">
|
||||
<label>Fields:</label>
|
||||
<select id="variables" class="form-control" size="14" multiple="multiple">
|
||||
<?php
|
||||
foreach ($variables as $key => $val)
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $key; ?>"><?php echo $val; ?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-lg-<?php echo isset($variables) ? 10 : 12 ?> text-right">
|
||||
<button id="sendButton" class="btn btn-default" type="button">Send</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,183 +0,0 @@
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
array(
|
||||
'title' => 'Write a message',
|
||||
'jquery' => true,
|
||||
'jqueryui' => true,
|
||||
'bootstrap' => true,
|
||||
'ajaxlib' => true,
|
||||
'fontawesome' => true,
|
||||
'tinymce' => true,
|
||||
'sbadmintemplate' => true,
|
||||
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/messageWrite.css'),
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/messageWrite.js')
|
||||
)
|
||||
);
|
||||
?>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header"><?php echo ucfirst($this->p->t('ui', 'nachrichtSenden')); ?></h3>
|
||||
</div>
|
||||
</div>
|
||||
<form id="sendForm" method="post" action="<?php echo site_url('/system/Messages/send'); ?>">
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-1 msgfieldcol-left">
|
||||
<label><?php echo ucfirst($this->p->t('global', 'empfaenger')).':'; ?></label>
|
||||
</div>
|
||||
<div class="col-lg-11 msgfieldcol-right">
|
||||
<?php
|
||||
for ($i = 0; $i < count($recipients); $i++)
|
||||
{
|
||||
$receiver = $recipients[$i];
|
||||
// Every 10 recipients a new line
|
||||
if ($i > 1 && $i % 10 == 0)
|
||||
{
|
||||
echo '<br>';
|
||||
}
|
||||
echo $receiver->Vorname." ".$receiver->Nachname."; ";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-1 msgfield msgfieldcol-left">
|
||||
<label><?php echo ucfirst($this->p->t('global', 'betreff')).':'; ?></label>
|
||||
</div>
|
||||
<?php
|
||||
$subject = '';
|
||||
if (isset($message))
|
||||
{
|
||||
$subject = 'Re: '.$message->subject;
|
||||
}
|
||||
?>
|
||||
<div class="col-lg-7">
|
||||
<input id="subject" class="form-control" type="text" value="<?php echo $subject; ?>" name="subject">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-lg-10">
|
||||
<label><?php echo ucfirst($this->p->t('global', 'nachricht')).':'; ?></label>
|
||||
<?php
|
||||
$body = '';
|
||||
if (isset($message))
|
||||
{
|
||||
$body = $message->body;
|
||||
}
|
||||
?>
|
||||
<textarea id="bodyTextArea" name="body"><?php echo $body; ?></textarea>
|
||||
</div>
|
||||
<?php
|
||||
if (isset($variables))
|
||||
{
|
||||
?>
|
||||
<div class="col-lg-2">
|
||||
<div class="form-group">
|
||||
<label><?php echo ucfirst($this->p->t('ui', 'felder')).':'; ?></label>
|
||||
<select id="variables" class="form-control" size="14" multiple="multiple">
|
||||
<?php
|
||||
foreach ($variables as $key => $val)
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $key; ?>"><?php echo $val; ?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<?php
|
||||
echo $this->widgetlib->widget(
|
||||
'Vorlage_widget',
|
||||
array('oe_kurzbz' => $oe_kurzbz, 'isAdmin' => $isAdmin),
|
||||
array('name' => 'vorlage', 'id' => 'vorlageDnD')
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div class="col-lg-7 col-xs-9 text-right">
|
||||
<button id="sendButton" class="btn btn-default" type="button"><?php echo $this->p->t('ui', 'senden'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if (isset($recipients) && count($recipients) > 0)
|
||||
{
|
||||
?>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<label><?php echo ucfirst($this->p->t('global', 'vorschau')).':'; ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="well">
|
||||
<div class="row">
|
||||
<div class="col-lg-5">
|
||||
<div class="form-grop form-inline">
|
||||
<label><?php echo ucfirst($this->p->t('global', 'empfaenger')).': '; ?></label>
|
||||
<select id="recipients">
|
||||
<?php
|
||||
if (count($recipients) > 1) echo '<option value="-1">Select...</option>';
|
||||
|
||||
foreach ($recipients as $receiver)
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $receiver->person_id; ?>">
|
||||
<?php echo $receiver->Vorname." ".$receiver->Nachname; ?>
|
||||
</option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
<strong><a href="#" id="refresh">Refresh</a></strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<textarea id="tinymcePreview"></textarea>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
foreach ($recipients as $receiver)
|
||||
{
|
||||
echo '<input type="hidden" name="persons[]" value="'.$receiver->person_id.'">'."\n";
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if (isset($message))
|
||||
{
|
||||
?>
|
||||
<input type="hidden" name="relationmessage_id" value="<?php echo $message->message_id; ?>">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<?php $this->load->view("templates/FHC-Footer"); ?>
|
||||
@@ -1,63 +0,0 @@
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
array(
|
||||
'title' => 'MessageReply',
|
||||
'jquery' => true,
|
||||
'bootstrap' => true,
|
||||
'fontawesome' => true,
|
||||
'tinymce' => true,
|
||||
'sbadmintemplate' => true,
|
||||
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/messageWrite.css'),
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/messageWriteReply.js')
|
||||
)
|
||||
);
|
||||
?>
|
||||
<body>
|
||||
<?php
|
||||
$href = site_url('/ViewMessage/sendReply');
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header">Send message</h3>
|
||||
</div>
|
||||
</div>
|
||||
<form id="sendForm" method="post" action="<?php echo $href; ?>">
|
||||
<?php
|
||||
$this->load->view('system/messages/messageForm.php');
|
||||
|
||||
for ($i = 0; $i < count($receivers); $i++)
|
||||
{
|
||||
$receiver = $receivers[$i];
|
||||
$receiverid = $receiver->person_id;
|
||||
$fieldname = 'persons[]';
|
||||
|
||||
echo '<input type="hidden" name="'.$fieldname.'" value="'.$receiverid.'">'."\n";
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if (isset($message))
|
||||
{
|
||||
?>
|
||||
<input type="hidden" name="relationmessage_id" value="<?php echo $message->message_id; ?>">
|
||||
<?php
|
||||
}
|
||||
if (isset($token))
|
||||
{
|
||||
?>
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<?php $this->load->view("templates/FHC-Footer"); ?>
|
||||
@@ -1,20 +1,20 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
|
||||
<html lang="de_AT">
|
||||
|
||||
<head>
|
||||
<title>VileSci - Phrasen</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
</head>
|
||||
|
||||
<frameset rows="30%,*">
|
||||
<frame src="Phrases/table" id="PhrasesTop" name="PhrasesTop" frameborder="0" />
|
||||
<frame src="Phrases/edit" id="PhrasesBottom" name="PhrasesBottom" frameborder="0" />
|
||||
<noframes>
|
||||
<body bgcolor="#FFFFFF">
|
||||
This application works only with a frames-enabled browser.<br />
|
||||
<a href="PhrasesList">Use without frames</a>
|
||||
</body>
|
||||
</noframes>
|
||||
</frameset>
|
||||
|
||||
</html>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
|
||||
<html lang="de_AT">
|
||||
|
||||
<head>
|
||||
<title>VileSci - Phrasen</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
</head>
|
||||
|
||||
<frameset rows="30%,*">
|
||||
<frame src="Phrases/table" id="PhrasesTop" name="PhrasesTop" frameborder="0" />
|
||||
<frame src="Phrases/edit" id="PhrasesBottom" name="PhrasesBottom" frameborder="0" />
|
||||
<noframes>
|
||||
<body bgcolor="#FFFFFF">
|
||||
This application works only with a frames-enabled browser.<br />
|
||||
<a href="PhrasesList">Use without frames</a>
|
||||
</body>
|
||||
</noframes>
|
||||
</frameset>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'PhrasesEdit'));
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Phrase: <?php echo $phrase->phrase_id; ?></h2>
|
||||
<form method="post" action="../save">
|
||||
Bezeichnung: <input type="text" name="phrase" value="<?php echo $phrase->phrase; ?>" />
|
||||
<input type="hidden" name="phrase_id" value="<?php echo $phrase->phrase_id; ?>" />
|
||||
<button type="submit">Save</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'PhrasesEdit'));
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Phrase: <?php echo $phrase->phrase_id; ?></h2>
|
||||
<form method="post" action="../save">
|
||||
Bezeichnung: <input type="text" name="phrase" value="<?php echo $phrase->phrase; ?>" />
|
||||
<input type="hidden" name="phrase_id" value="<?php echo $phrase->phrase_id; ?>" />
|
||||
<button type="submit">Save</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,54 +1,54 @@
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'PhrasenInhaltList', 'tablesort' => true, 'tableid' => 't1', 'headers' => '5:{sorter:false}'));
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Phrase Inhalt - <?php echo $phrase; ?></h2>
|
||||
<form method="post" action="../newText" target="PhrasesBottom">
|
||||
<input type="hidden" name="phrase_id" value="<?php echo $phrase_id; ?>"/>
|
||||
<button type="submit">Neu</button>
|
||||
</form>
|
||||
|
||||
<table id="t1" class="tablesorter">
|
||||
<thead>
|
||||
<tr><th class='table-sortable:default'>ID</th>
|
||||
<th class='table-sortable:default'>Sprache</th>
|
||||
<th class='table-sortable:default'>OrgEinheit</th>
|
||||
<th class='table-sortable:default'>OrgForm</th>
|
||||
<th class='table-sortable:default'>Text</th>
|
||||
<th>Beschreibung</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($phrase_inhalt as $v): ?>
|
||||
<tr><td><a href="../editText/<?php echo $v->phrasentext_id; ?>" target="PhrasesBottom"><?php echo $v->phrasentext_id; ?></a></td>
|
||||
<td><?php echo $v->sprache; ?></td>
|
||||
<td><?php echo $v->orgeinheit_kurzbz; ?></td>
|
||||
<td><?php echo $v->orgform_kurzbz; ?></td>
|
||||
<td><?php echo $v->text; ?></td>
|
||||
<td><?php echo $v->description; ?></td>
|
||||
<td><a href="../editText/<?php echo $v->phrasentext_id; ?>" target="PhrasesBottom">edit</a></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" onclick="delPhrasentext(<?php echo $v->phrasentext_id; ?>, <?php echo $phrase_id; ?>)">delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function delPhrasentext(id,pid)
|
||||
{
|
||||
var c = confirm("Wirklich löschen?");
|
||||
if (c == true)
|
||||
window.location.href = "../deltext/"+id+"/"+pid;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$this->load->view('templates/footer');
|
||||
?>
|
||||
<?php
|
||||
$this->load->view('templates/header', array('title' => 'PhrasenInhaltList', 'tablesort' => true, 'tableid' => 't1', 'headers' => '5:{sorter:false}'));
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Phrase Inhalt - <?php echo $phrase; ?></h2>
|
||||
<form method="post" action="../newText" target="PhrasesBottom">
|
||||
<input type="hidden" name="phrase_id" value="<?php echo $phrase_id; ?>"/>
|
||||
<button type="submit">Neu</button>
|
||||
</form>
|
||||
|
||||
<table id="t1" class="tablesorter">
|
||||
<thead>
|
||||
<tr><th class='table-sortable:default'>ID</th>
|
||||
<th class='table-sortable:default'>Sprache</th>
|
||||
<th class='table-sortable:default'>OrgEinheit</th>
|
||||
<th class='table-sortable:default'>OrgForm</th>
|
||||
<th class='table-sortable:default'>Text</th>
|
||||
<th>Beschreibung</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($phrase_inhalt as $v): ?>
|
||||
<tr><td><a href="../editText/<?php echo $v->phrasentext_id; ?>" target="PhrasesBottom"><?php echo $v->phrasentext_id; ?></a></td>
|
||||
<td><?php echo $v->sprache; ?></td>
|
||||
<td><?php echo $v->orgeinheit_kurzbz; ?></td>
|
||||
<td><?php echo $v->orgform_kurzbz; ?></td>
|
||||
<td><?php echo $v->text; ?></td>
|
||||
<td><?php echo $v->description; ?></td>
|
||||
<td><a href="../editText/<?php echo $v->phrasentext_id; ?>" target="PhrasesBottom">edit</a></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" onclick="delPhrasentext(<?php echo $v->phrasentext_id; ?>, <?php echo $phrase_id; ?>)">delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function delPhrasentext(id,pid)
|
||||
{
|
||||
var c = confirm("Wirklich löschen?");
|
||||
if (c == true)
|
||||
window.location.href = "../deltext/"+id+"/"+pid;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$this->load->view('templates/footer');
|
||||
?>
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
|
||||
<html lang="de_AT">
|
||||
|
||||
<head>
|
||||
<title>VileSci - Vorlage</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
</head>
|
||||
|
||||
<frameset rows="30%,*">
|
||||
<frame src="Vorlage/table" id="VorlageTop" name="VorlageTop" frameborder="0" />
|
||||
<frame src="Vorlage/edit" id="VorlageBottom" name="VorlageBottom" frameborder="0" />
|
||||
<noframes>
|
||||
<body bgcolor="#FFFFFF">
|
||||
This application works only with a frames-enabled browser.<br />
|
||||
<a href="VorlageList">Use without frames</a>
|
||||
</body>
|
||||
</noframes>
|
||||
</frameset>
|
||||
|
||||
</html>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
|
||||
<html lang="de_AT">
|
||||
|
||||
<head>
|
||||
<title>VileSci - Vorlage</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
</head>
|
||||
|
||||
<frameset rows="30%,*">
|
||||
<frame src="Vorlage/table" id="VorlageTop" name="VorlageTop" frameborder="0" />
|
||||
<frame src="Vorlage/edit" id="VorlageBottom" name="VorlageBottom" frameborder="0" />
|
||||
<noframes>
|
||||
<body bgcolor="#FFFFFF">
|
||||
This application works only with a frames-enabled browser.<br />
|
||||
<a href="VorlageList">Use without frames</a>
|
||||
</body>
|
||||
</noframes>
|
||||
</frameset>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?php
|
||||
echo $text;
|
||||
<?php
|
||||
echo $text;
|
||||
?>
|
||||
@@ -34,6 +34,7 @@
|
||||
$tablewidget = isset($tablewidget) ? $tablewidget : false;
|
||||
$tabulator = isset($tabulator) ? $tabulator : false;
|
||||
$tinymce = isset($tinymce) ? $tinymce : false;
|
||||
$widgets = isset($widgets) ? $widgets : false;
|
||||
?>
|
||||
|
||||
<!-- Header start -->
|
||||
@@ -63,6 +64,9 @@
|
||||
// Font Awesome CSS
|
||||
if ($fontawesome === true) generateCSSsInclude('vendor/components/font-awesome/css/font-awesome.min.css');
|
||||
|
||||
// PivotUI CSS
|
||||
if ($pivotui === true) generateCSSsInclude('vendor/nicolaskruchten/pivottable/dist/pivot.min.css');
|
||||
|
||||
// SB Admin 2 template CSS
|
||||
if ($sbadmintemplate === true)
|
||||
{
|
||||
@@ -73,12 +77,6 @@
|
||||
// Securimage CSS
|
||||
if ($captcha === true) generateCSSsInclude('vendor/dapphp/securimage/securimage.css');
|
||||
|
||||
// PivotUI CSS
|
||||
if ($pivotui === true)
|
||||
{
|
||||
generateCSSsInclude('vendor/nicolaskruchten/pivottable/dist/pivot.min.css');
|
||||
}
|
||||
|
||||
// Table sorter CSS
|
||||
if ($tablesorter === true)
|
||||
{
|
||||
@@ -93,6 +91,9 @@
|
||||
generateCSSsInclude('public/css/Tabulator.css');
|
||||
}
|
||||
|
||||
// Tinymce CSS
|
||||
if ($tinymce === true) generateCSSsInclude('public/css/TinyMCE.css');
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------
|
||||
// From public folder
|
||||
|
||||
@@ -108,11 +109,12 @@
|
||||
// NavigationWidget CSS
|
||||
if ($navigationwidget === true) generateCSSsInclude('public/css/NavigationWidget.css');
|
||||
|
||||
// HTML Widget CSS
|
||||
if ($widgets === true) generateCSSsInclude('public/css/Widgets.css');
|
||||
|
||||
// Eventually required CSS
|
||||
generateCSSsInclude($customCSSs); // Eventually required CSS
|
||||
|
||||
// CSS End
|
||||
// --------------------------------------------------------------------------------------------------------
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------
|
||||
// Javascripts
|
||||
@@ -140,11 +142,7 @@
|
||||
|
||||
// jQuery checkboxes
|
||||
// NOTE: keep it after jQuery includes
|
||||
if ($jquerycheckboxes === true)
|
||||
{
|
||||
generateJSsInclude('vendor/rmariuzzo/jquery-checkboxes/dist/jquery.checkboxes-1.0.7.min.js');
|
||||
}
|
||||
|
||||
if ($jquerycheckboxes === true) generateJSsInclude('vendor/rmariuzzo/jquery-checkboxes/dist/jquery.checkboxes-1.0.7.min.js');
|
||||
// jQuery treetable
|
||||
// NOTE: keep it after jQuery includes
|
||||
if ($jquerytreetable === true) generateJSsInclude('vendor/ludo/jquery-treetable/jquery.treetable.js');
|
||||
@@ -173,10 +171,7 @@
|
||||
}
|
||||
|
||||
// PivotUI JS
|
||||
if ($pivotui === true)
|
||||
{
|
||||
generateJSsInclude('vendor/nicolaskruchten/pivottable/dist/pivot.min.js');
|
||||
}
|
||||
if ($pivotui === true) generateJSsInclude('vendor/nicolaskruchten/pivottable/dist/pivot.min.js');
|
||||
|
||||
// Table sorter JS
|
||||
if ($tablesorter === true)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>This is not the email template, this is a tribute</title>
|
||||
<title>Notification of personal message reception</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h2>Neue Nachricht vorhanden</h2>
|
||||
<h2>A new message is available</h2>
|
||||
<div class="body">
|
||||
<a href="{href}">Klicken Sie hier, um die Nachricht anzuzeigen</a>
|
||||
<a href="{href}">Click here to view the message</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Follow the following link to read the message.
|
||||
Notification of personal message reception
|
||||
|
||||
{href}
|
||||
A new message is available
|
||||
|
||||
Click here to view the message
|
||||
|
||||
{href}
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo $this->template->title->default("Default title"); ?></title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="description" content="<?php echo $this->template->description; ?>">
|
||||
<meta name="author" content="">
|
||||
<?php echo $this->template->meta; ?>
|
||||
<?php echo $this->template->stylesheet; ?>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
// This is an example to show that you can load stuff from inside the template file
|
||||
echo $this->template->widget("navigation", array('title' => 'Project name'));
|
||||
?>
|
||||
|
||||
<div class="container" style="margin-top: 60px;">
|
||||
|
||||
<?php
|
||||
// This is the main content partial
|
||||
echo $this->template->content;
|
||||
?>
|
||||
|
||||
<hr>
|
||||
|
||||
<footer>
|
||||
<p>
|
||||
<?php
|
||||
// Show the footer partial, and prepend copyright message
|
||||
echo $this->template->footer->prepend("© Special Company 2012 - ");
|
||||
?>
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//code.jquery.com/jquery-latest.min.js"></script>
|
||||
<?php echo $this->template->javascript; ?>
|
||||
|
||||
</body>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo $this->template->title->default("Default title"); ?></title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="description" content="<?php echo $this->template->description; ?>">
|
||||
<meta name="author" content="">
|
||||
<?php echo $this->template->meta; ?>
|
||||
<?php echo $this->template->stylesheet; ?>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
// This is an example to show that you can load stuff from inside the template file
|
||||
echo $this->template->widget("navigation", array('title' => 'Project name'));
|
||||
?>
|
||||
|
||||
<div class="container" style="margin-top: 60px;">
|
||||
|
||||
<?php
|
||||
// This is the main content partial
|
||||
echo $this->template->content;
|
||||
?>
|
||||
|
||||
<hr>
|
||||
|
||||
<footer>
|
||||
<p>
|
||||
<?php
|
||||
// Show the footer partial, and prepend copyright message
|
||||
echo $this->template->footer->prepend("© Special Company 2012 - ");
|
||||
?>
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//code.jquery.com/jquery-latest.min.js"></script>
|
||||
<?php echo $this->template->javascript; ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -11,7 +11,7 @@
|
||||
$align = "valign-top";
|
||||
}
|
||||
?>
|
||||
<div class="div-cell width-150px <?php echo $align; ?>">
|
||||
<div class="div-cell <?php echo $align; ?>">
|
||||
<label
|
||||
for="<?php echo ${HTMLWidget::HTML_ARG_NAME}[HTMLWidget::HTML_ID]; ?>"
|
||||
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::REQUIRED); ?>
|
||||
@@ -22,7 +22,7 @@
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="div-cell width-150px">
|
||||
<div class="div-cell">
|
||||
<select
|
||||
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::HTML_ID); ?>
|
||||
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::HTML_NAME); ?>
|
||||
@@ -37,11 +37,11 @@
|
||||
<?php
|
||||
$elements = ${DropdownWidget::WIDGET_DATA_ELEMENTS_ARRAY_NAME};
|
||||
$selectedElements = ${DropdownWidget::SELECTED_ELEMENT};
|
||||
|
||||
|
||||
foreach($elements as $element)
|
||||
{
|
||||
$selected = '';
|
||||
|
||||
|
||||
if (is_array($selectedElements))
|
||||
{
|
||||
foreach($selectedElements as $selectedElement)
|
||||
@@ -71,4 +71,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php HTMLWidget::printEndBlock(${HTMLWidget::HTML_ARG_NAME}); ?>
|
||||
<?php HTMLWidget::printEndBlock(${HTMLWidget::HTML_ARG_NAME}); ?>
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
class Dropdown_widget extends DropdownWidget
|
||||
{
|
||||
public function display($widgetData)
|
||||
{
|
||||
$elements = $widgetData['elements'];
|
||||
$emptyElement = $widgetData['emptyElement'];
|
||||
|
||||
$this->setElementsArray(
|
||||
$elements,
|
||||
true,
|
||||
$emptyElement,
|
||||
'No data present'
|
||||
);
|
||||
|
||||
$this->loadDropDownView($widgetData);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
class MultipleDropdown_widget extends DropdownWidget
|
||||
{
|
||||
public function display($widgetData)
|
||||
{
|
||||
$elements = $widgetData['elements'];
|
||||
|
||||
$this->setElementsArray(
|
||||
$elements,
|
||||
false,
|
||||
'',
|
||||
'No data present'
|
||||
);
|
||||
|
||||
$this->setMultiple();
|
||||
|
||||
$this->loadDropDownView($widgetData);
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,21 @@
|
||||
<?php
|
||||
|
||||
class Nation_widget extends DropdownWidget
|
||||
{
|
||||
public function display($widgetData)
|
||||
{
|
||||
// Nation
|
||||
$this->load->model('codex/Nation_model', 'NationModel');
|
||||
$this->NationModel->addOrder('nation_code');
|
||||
|
||||
$this->addSelectToModel($this->NationModel, 'nation_code', 'kurztext');
|
||||
|
||||
$this->setElementsArray(
|
||||
$this->NationModel->load(),
|
||||
true,
|
||||
$this->p->t('ui', 'bitteEintragWaehlen')
|
||||
);
|
||||
|
||||
$this->loadDropDownView($widgetData);
|
||||
}
|
||||
}
|
||||
<?php
|
||||
|
||||
class Nation_widget extends DropdownWidget
|
||||
{
|
||||
public function display($widgetData)
|
||||
{
|
||||
// Nation
|
||||
$this->load->model('codex/Nation_model', 'NationModel');
|
||||
$this->NationModel->addOrder('nation_code');
|
||||
|
||||
$this->addSelectToModel($this->NationModel, 'nation_code', 'kurztext');
|
||||
|
||||
$this->setElementsArray(
|
||||
$this->NationModel->load(),
|
||||
true,
|
||||
$this->p->t('ui', 'bitteEintragWaehlen')
|
||||
);
|
||||
|
||||
$this->loadDropDownView($widgetData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class Vorlage_widget extends DropdownWidget
|
||||
FROM tbl_vorlagestudiengang vs INNER JOIN tbl_vorlage v USING(vorlage_kurzbz)
|
||||
) templates';
|
||||
$alias = 'templates';
|
||||
$fields = array("templates.vorlage_kurzbz AS id", "UPPER(templates.oe_kurzbz) || ' - ' || templates.bezeichnung || ' - V' || templates.version AS description");
|
||||
$fields = array("templates.vorlage_kurzbz AS id", "templates.bezeichnung AS description");
|
||||
$where = 'templates.aktiv = TRUE
|
||||
AND templates.subject IS NOT NULL
|
||||
AND templates.text IS NOT NULL
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
<?php
|
||||
|
||||
class Zgv_widget extends DropdownWidget
|
||||
{
|
||||
public function display($widgetData)
|
||||
{
|
||||
// Zgv
|
||||
$this->load->model('codex/Zgv_model', 'ZgvModel');
|
||||
$this->ZgvModel->addOrder('zgv_bez');
|
||||
|
||||
$this->addSelectToModel($this->ZgvModel, 'zgv_code', 'zgv_bez');
|
||||
|
||||
$this->setElementsArray(
|
||||
$this->ZgvModel->load(),
|
||||
true,
|
||||
$this->p->t('ui', 'bitteEintragWaehlen')
|
||||
);
|
||||
|
||||
$this->loadDropDownView($widgetData);
|
||||
}
|
||||
}
|
||||
<?php
|
||||
|
||||
class Zgv_widget extends DropdownWidget
|
||||
{
|
||||
public function display($widgetData)
|
||||
{
|
||||
// Zgv
|
||||
$this->load->model('codex/Zgv_model', 'ZgvModel');
|
||||
$this->ZgvModel->addOrder('zgv_bez');
|
||||
|
||||
$this->addSelectToModel($this->ZgvModel, 'zgv_code', 'zgv_bez');
|
||||
|
||||
$this->setElementsArray(
|
||||
$this->ZgvModel->load(),
|
||||
true,
|
||||
$this->p->t('ui', 'bitteEintragWaehlen')
|
||||
);
|
||||
|
||||
$this->loadDropDownView($widgetData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,10 +337,10 @@ function writePruefungsTable(e, data, anmeldung)
|
||||
{
|
||||
var row = "";
|
||||
var teilnehmer = "";
|
||||
var button = "";
|
||||
row += "<tr><td>"+e.organisationseinheit+"</td><td style='cursor: pointer; text-decoration: underline;' onclick='showPruefungsDetails(\""+e.pruefung.pruefung_id+"\",\""+e.lehrveranstaltung[0].lehrveranstaltung_id+"\");'>"+e.lehrveranstaltung[0].bezeichnung+" <br>("+e.lehrveranstaltung[0].lehrform_kurzbz+", "+e.lehrveranstaltung[0].ects+" ECTS, "+e.pruefung.mitarbeiter_uid+")</td><td>";
|
||||
e.pruefung.termine.forEach(function(d){
|
||||
var storno = false;
|
||||
var button = "";
|
||||
var storno = false;
|
||||
var anmeldung_id = null;
|
||||
data.result.anmeldungen.forEach(function(anmeldung){
|
||||
if((anmeldung.pruefungstermin_id === d.pruefungstermin_id) && (anmeldung.lehrveranstaltung_id === e.lehrveranstaltung[0].lehrveranstaltung_id))
|
||||
|
||||
@@ -26,6 +26,8 @@ require_once('../../../include/organisationseinheit.class.php');
|
||||
require_once('../../../include/addon.class.php');
|
||||
require_once('../../../include/benutzer.class.php');
|
||||
require_once('../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../include/student.class.php');
|
||||
require_once('../../../include/prestudent.class.php');
|
||||
|
||||
$uid = get_uid();
|
||||
|
||||
@@ -66,7 +68,19 @@ $studiengang=new studiengang();
|
||||
$studiengang->load($konto->studiengang_kz);
|
||||
$bankverbindung=new bankverbindung();
|
||||
|
||||
$kontodaten = getBankverbindung($studiengang->oe_kurzbz);
|
||||
// Wenn Person StudentIn ist, auch die OrgForm laden um die richtige Kontonummer anzeigen zu können
|
||||
$student = new student();
|
||||
$orgform = '';
|
||||
if ($student->load($uid))
|
||||
{
|
||||
$laststatus = new prestudent();
|
||||
if ($laststatus->getLastStatus($student->prestudent_id))
|
||||
{
|
||||
$orgform = $laststatus->orgform_kurzbz;
|
||||
}
|
||||
}
|
||||
|
||||
$kontodaten = getBankverbindung($studiengang->oe_kurzbz, $orgform);
|
||||
$iban=$kontodaten["iban"];
|
||||
$bic=$kontodaten["bic"];
|
||||
|
||||
@@ -156,56 +170,63 @@ $addon = new addon();
|
||||
$addon->loadAddons();
|
||||
foreach($addon->result as $a)
|
||||
{
|
||||
if($a->kurzbz === "eps")
|
||||
{
|
||||
if($a->kurzbz === "eps")
|
||||
{
|
||||
echo '<table class="tablesorter">
|
||||
<thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="40%">Zahlung anweisen</th>
|
||||
<th width="60%"></th>
|
||||
<th width="40%">Zahlung anweisen</th>
|
||||
<th width="60%"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>EPS</td>
|
||||
<td>
|
||||
<a href="../../../addons/eps/cis/index.php?buchungsnummer='.$buchungsnr.'"><img src="../../../skin/images/eps-logo_full.gif" width="30" height="30" alt="EPS Überweisung"></a>
|
||||
</td>
|
||||
<td>EPS</td>
|
||||
<td>
|
||||
<a href="../../../addons/eps/cis/index.php?buchungsnummer='.$buchungsnr.'"><img src="../../../skin/images/eps-logo_full.gif" width="30" height="30" alt="EPS Überweisung"></a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</tbody>
|
||||
</table>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo '</body></html>';
|
||||
|
||||
function getBankverbindung($oe_kurzbz)
|
||||
function getBankverbindung($oe_kurzbz, $orgform_kurzbz = null)
|
||||
{
|
||||
$iban = "";
|
||||
$bic = "";
|
||||
$result = array();
|
||||
$bankverbindung=new bankverbindung();
|
||||
if($bankverbindung->load_oe($oe_kurzbz) && count($bankverbindung->result)>0)
|
||||
{
|
||||
$result["iban"]=$bankverbindung->result[0]->iban;
|
||||
$result["bic"]=$bankverbindung->result[0]->bic;
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
{
|
||||
$organisationseinheit = new organisationseinheit();
|
||||
$organisationseinheit->load($oe_kurzbz);
|
||||
if($organisationseinheit->oe_parent_kurzbz !== NULL)
|
||||
$iban = "";
|
||||
$bic = "";
|
||||
$result = array();
|
||||
$bankverbindung=new bankverbindung();
|
||||
if($bankverbindung->load_oe($oe_kurzbz, $orgform_kurzbz) && count($bankverbindung->result) > 0)
|
||||
{
|
||||
$result = getBankverbindung($organisationseinheit->oe_parent_kurzbz);
|
||||
return $result;
|
||||
$result["iban"] = $bankverbindung->result[0]->iban;
|
||||
$result["bic"] = $bankverbindung->result[0]->bic;
|
||||
return $result;
|
||||
}
|
||||
// Nochmal ohne $orgform_kurzbz versuchen
|
||||
elseif($bankverbindung->load_oe($oe_kurzbz) && count($bankverbindung->result) > 0)
|
||||
{
|
||||
$result["iban"] = $bankverbindung->result[0]->iban;
|
||||
$result["bic"] = $bankverbindung->result[0]->bic;
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result["iban"]="";
|
||||
$result["bic"]="";
|
||||
$organisationseinheit = new organisationseinheit();
|
||||
$organisationseinheit->load($oe_kurzbz);
|
||||
if($organisationseinheit->oe_parent_kurzbz !== NULL)
|
||||
{
|
||||
$result = getBankverbindung($organisationseinheit->oe_parent_kurzbz, $orgform_kurzbz);
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result["iban"] = "";
|
||||
$result["bic"] = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -186,6 +186,7 @@ if (isset($_POST['speichern']))
|
||||
$gebiet->zufallvorschlag = isset($_POST['zufallvorschlag']);
|
||||
$gebiet->levelgleichverteilung = isset($_POST['levelgleichverteilung']);
|
||||
$gebiet->maxpunkte = $_POST['maxpunkte'];
|
||||
$gebiet->offsetpunkte = $_POST['offsetpunkte'];
|
||||
$gebiet->maxfragen = $_POST['maxfragen'];
|
||||
$gebiet->level_start = $_POST['level_start'];
|
||||
$gebiet->level_sprung_auf = $_POST['level_sprung_auf'];
|
||||
@@ -257,6 +258,18 @@ if ($gebiet_id != '')
|
||||
$hinweis = '';
|
||||
echo '<td>Maximale Punkteanzahl</td><td><input type="text" size="5" maxlength="5" name="maxpunkte" value="'.$gebiet->maxpunkte.'">'.$hinweis.'</td>';
|
||||
echo '</tr><tr>';
|
||||
// empfohlene offsetpunkte berechnen und anzeigen
|
||||
$offsethinweis = '';
|
||||
$offsetpunkte = $gebiet->berechneOffsetpunkte($gebiet_id);
|
||||
if ($offsetpunkte)
|
||||
{
|
||||
$offsetwarnung = strlen($gebiet->errormsg) > 0 ? ' (HINWEIS: '.$gebiet->errormsg.')' : '';
|
||||
|
||||
$offsethinweis = ' <span class="error">empfohlene Offsetpunkteanzahl: '.round($offsetpunkte).(round($offsetpunkte) != $offsetpunkte ? ' ('.$offsetpunkte.' gerundet)' : '').'</span>';
|
||||
$offsethinweis .= '<span class="error">'.$offsetwarnung.'</span>';
|
||||
}
|
||||
echo '<td>Offsetpunkte (minimale Punkteanzahl)</td><td><input type="text" size="5" maxlength="5" name="offsetpunkte" value="'.$gebiet->offsetpunkte.'">'.$offsethinweis.'</td>';
|
||||
echo '</tr><tr>';
|
||||
echo '<td>Maximale Fragenanzahl</td><td><input type="text" size="5" maxlength="5" name="maxfragen" value="'.$gebiet->maxfragen.'"></td>';
|
||||
echo '</tr><tr>';
|
||||
echo '<td>Antworten pro Zeile</td><td><input type="text" size="5" maxlength="2" name="antwortenprozeile" value="'.$gebiet->antwortenprozeile.'" required></td>';
|
||||
|
||||
@@ -35,7 +35,7 @@ if (!$db = new basis_db())
|
||||
<title>Testool Fragen Übersicht</title>
|
||||
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<body style="padding: 10px">
|
||||
<?php
|
||||
$user = get_uid();
|
||||
$rechte = new benutzerberechtigung();
|
||||
@@ -47,7 +47,8 @@ if(!$rechte->isBerechtigt('basis/testtool', null, 's'))
|
||||
$gebiet = new gebiet();
|
||||
$gebiet->getAll();
|
||||
$sprache = (isset($_REQUEST['Sprache'])?$_REQUEST['Sprache']:'German');
|
||||
$Auswahlgebiet = (isset($_REQUEST['AuswahlGebiet'])?$_REQUEST['AuswahlGebiet']:'');
|
||||
$Auswahlgebiet = (isset($_REQUEST['AuswahlGebiet'])?$_REQUEST['AuswahlGebiet']:'');
|
||||
$loesungen = (isset($_REQUEST['loesungen']) && $_REQUEST['loesungen'] != '' ? true:false);
|
||||
|
||||
echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post" name="TesttoolUebersicht">
|
||||
<table>
|
||||
@@ -76,6 +77,13 @@ else
|
||||
|
||||
echo'</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Mit Lösungen
|
||||
</td>
|
||||
<td><input type="checkbox" name="loesungen" '.($loesungen ? 'checked':'').'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><input type="submit" value="Anzeigen"></td></tr>
|
||||
</table><br>';
|
||||
@@ -208,8 +216,17 @@ if(isset($_REQUEST['AuswahlGebiet']))
|
||||
$vorschlag = new vorschlag();
|
||||
$vorschlag->loadVorschlagSprache($vor->vorschlag_id, $sprache);
|
||||
|
||||
if($vorschlag->bild =='')
|
||||
echo '<tr><td align="right"><b>'.$vor->punkte.'</b></td><td style="border-left:1px solid;"> '.$vorschlag->text.'</td></tr>';
|
||||
if($vorschlag->bild == '')
|
||||
{
|
||||
if ($loesungen)
|
||||
{
|
||||
echo '<tr><td style="border-right:1px solid;">'.$vor->nummer.'</td></td><td align="right"><b>'.$vor->punkte.'</b></td><td style="border-left:1px solid;"> '.$vorschlag->text.'</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<tr><td style="border-right:1px solid;">'.$vor->nummer.'</td><td> '.$vorschlag->text.'</td></tr>';
|
||||
}
|
||||
}
|
||||
if($vorschlag->bild!='')
|
||||
{
|
||||
// zeilenumbruch nach 4 bilder
|
||||
@@ -217,7 +234,15 @@ if(isset($_REQUEST['AuswahlGebiet']))
|
||||
echo "</tr>";
|
||||
echo "<td>";
|
||||
echo "<img class='testtoolvorschlag' src='../bild.php?src=vorschlag&vorschlag_id=$vor->vorschlag_id&sprache=".$sprache."' /><br/>";
|
||||
echo "<br>".$vor->punkte."</td>";
|
||||
if ($loesungen)
|
||||
{
|
||||
echo "<br>".$vor->punkte."</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "</td>";
|
||||
}
|
||||
|
||||
$anzahlBild++;
|
||||
}
|
||||
if($vorschlag->audio!='')
|
||||
|
||||
+95
-76
@@ -16,8 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>,
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>,
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>,
|
||||
* Gerald Simane-Sequens <gerald.simane-sequens@technikum-wien.at>,
|
||||
* Manfred Kindl <manfred.kindl@technikum-wien.at>
|
||||
*/
|
||||
@@ -48,8 +48,8 @@ session_start();
|
||||
// If language is changed by language select menu, reset language variables
|
||||
if (isset($_GET['sprache_user']) && !empty($_GET['sprache_user']))
|
||||
{
|
||||
$_SESSION['sprache_user'] = $_GET['sprache_user'];
|
||||
$sprache_user = $_GET['sprache_user'];
|
||||
$_SESSION['sprache_user'] = $_GET['sprache_user'];
|
||||
$sprache_user = $_GET['sprache_user'];
|
||||
}
|
||||
|
||||
// Set language variable, which impacts the question language
|
||||
@@ -78,10 +78,10 @@ echo '
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
|
||||
<link rel="stylesheet" href="../../vendor/twbs/bootstrap/dist/css/bootstrap.min.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../../vendor/twbs/bootstrap/dist/css/bootstrap.min.css" type="text/css"/>
|
||||
<link href="../../skin/style.css.php" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../../vendor/components/jquery/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../vendor/twbs/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="../../vendor/components/jquery/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../vendor/twbs/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
<script language="Javascript" type="text/javascript">
|
||||
//<![CDATA[
|
||||
function killChildNodes(an_element)
|
||||
@@ -132,19 +132,19 @@ echo '
|
||||
function GebietStarten(bezeichnung,stunde,minute,sekunde,gebiet_id)
|
||||
{
|
||||
var check = confirm(<?php echo "'".$p->t('testtool/okKlickenUmZuStarten')."'"?>+' '+stunde+'h '+minute+'m '+sekunde+'s');
|
||||
if (check == true) {
|
||||
if (check == true) {
|
||||
var sprache_user = <?php echo "'".$sprache_user."'"?>;
|
||||
document.location.href = 'frage.php?gebiet_id='+gebiet_id+'&start=true';
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
document.location.href = 'frage.php?gebiet_id='+gebiet_id+'&start=true';
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function letzteFrage()
|
||||
{
|
||||
alert(<?php echo "'".$p->t("testtool/alleFragenBeantwortet")."'"?>);
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
//]]>
|
||||
@@ -357,8 +357,8 @@ if($levelgebiet)
|
||||
<tr>
|
||||
<td valign="top" style="height:1px;font-size:2px;">
|
||||
<table cellpadding="0" cellspacing="0" style="border:0px;height:1px;font-size:2px;">
|
||||
<tr>
|
||||
<td nowrap="nowrap" style="height:1px;font-size:2px;">
|
||||
<tr>
|
||||
<td nowrap="nowrap" style="height:1px;font-size:2px;">
|
||||
<font size="2" face="Arial, Helvetica, sans-serif">
|
||||
<img src="../../skin/images/entry.gif" width="'.($psolved*3).'" height="10" alt="" border="1" />
|
||||
</font>
|
||||
@@ -372,32 +372,32 @@ if($levelgebiet)
|
||||
}
|
||||
//Zeit des Gebietes holen
|
||||
echo '
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td valign="top" width="50%">TeilnehmerIn: '.$info.'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">'.$fortschrittsbalken.'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>';
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td valign="top" width="50%">TeilnehmerIn: '.$info.'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">'.$fortschrittsbalken.'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>';
|
||||
|
||||
if($demo)
|
||||
{
|
||||
//Wenn es sich um ein Demobeispiel handelt, dann wird die Maximale Gesamtzeit angezeigt
|
||||
echo
|
||||
$p->t('testtool/bearbeitungszeit').': '.$stunde.'h '.$minute.'m '.$sekunde.'s';
|
||||
$p->t('testtool/bearbeitungszeit').': '.$stunde.'h '.$minute.'m '.$sekunde.'s';
|
||||
echo '
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
';
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
';
|
||||
echo "
|
||||
<input type=\"button\" class='btn btn-default btn-testtool' value=\"".$p->t("testtool/gebietStarten")."\" onclick=\"GebietStarten('".$db->convert_html_chars($gebiet->bezeichnung)."','".$stunde."','".$minute."','".$sekunde."','".$gebiet_id."')\" /> ";
|
||||
<input type=\"button\" class='btn btn-default btn-testtool' value=\"".$p->t("testtool/gebietStarten")."\" onclick=\"GebietStarten('".$db->convert_html_chars($gebiet->bezeichnung)."','".$stunde."','".$minute."','".$sekunde."','".$gebiet_id."')\" /> ";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -458,7 +458,18 @@ else
|
||||
if($frage->frage_id!='')
|
||||
{
|
||||
$frage_id = $frage->frage_id;
|
||||
$frage->bild = '';
|
||||
$frage->audio = '';
|
||||
$frage->text = '';
|
||||
$frage->getFrageSprache($frage_id, $_SESSION['sprache_user']);
|
||||
$fallbacksprache = $_SESSION['sprache_user'];
|
||||
|
||||
// Fallback auf DEFAULT_LANGUAGE wenn keine Frage in der $_SESSION['sprache_user'] vorhanden ist
|
||||
if ($frage->text == '' && $frage->bild == '' && $frage->audio == '')
|
||||
{
|
||||
$frage->getFrageSprache($frage_id, DEFAULT_LANGUAGE);
|
||||
$fallbacksprache = DEFAULT_LANGUAGE;
|
||||
}
|
||||
|
||||
if(!$demo)
|
||||
{
|
||||
@@ -489,9 +500,9 @@ if($frage->frage_id!='')
|
||||
WHERE gebiet_id=".$db->db_add_param($gebiet_id, FHC_INTEGER)." AND pruefling_id=".$db->db_add_param($_SESSION['pruefling_id'], FHC_INTEGER)." AND demo=false ORDER BY nummer";
|
||||
|
||||
echo "
|
||||
<table class='table' style='margin-top: 20px; margin-bottom: 40px;'>
|
||||
<tr class='text-center'>
|
||||
";
|
||||
<table class='table' style='margin-top: 20px; margin-bottom: 40px;'>
|
||||
<tr class='text-center'>
|
||||
";
|
||||
//Nummern der Fragen Anzeigen
|
||||
$result = $db->db_query($qry);
|
||||
while($row = $db->db_fetch_object($result))
|
||||
@@ -533,59 +544,67 @@ if($frage->frage_id!='')
|
||||
echo " </tr></table>";
|
||||
|
||||
echo '
|
||||
<br/>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-lg-offset-1 col-lg-10">
|
||||
';
|
||||
<br/>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-lg-offset-1 col-lg-10">
|
||||
';
|
||||
|
||||
//Bild und Text der Frage anzeigen
|
||||
if($frage->bild!='')
|
||||
{
|
||||
echo '
|
||||
<div class="row text-center">
|
||||
<img class="testtoolfrage" src="bild.php?src=frage&frage_id='. $frage->frage_id.'&sprache='. $_SESSION["sprache_user"].'"></img><br/><br/><br/>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
{
|
||||
echo '
|
||||
<div class="row text-center">
|
||||
<img class="testtoolfrage" src="bild.php?src=frage&frage_id='. $frage->frage_id.'&sprache='.$fallbacksprache.'"></img><br/><br/><br/>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
$timestamp = time();
|
||||
|
||||
//Sound einbinden
|
||||
if($frage->audio!='')
|
||||
{
|
||||
echo '
|
||||
<div class="row text-center">
|
||||
<audio src="sound.php?src=frage&frage_id='.$frage->frage_id.'&sprache='.$_SESSION['sprache_user'].'&'.$timestamp.'" controls="controls" type="audio/ogg">
|
||||
<div>
|
||||
<p>Ihr Browser unterstützt dieses Audioelement leider nicht.</p>
|
||||
</div>
|
||||
</audio>
|
||||
</div>
|
||||
';
|
||||
<div class="row text-center">
|
||||
<audio src="sound.php?src=frage&frage_id='.$frage->frage_id.'&sprache='.$fallbacksprache.'&'.$timestamp.'" controls="controls" type="audio/ogg">
|
||||
<div>
|
||||
<p>Ihr Browser unterstützt dieses Audioelement leider nicht.</p>
|
||||
</div>
|
||||
</audio>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
|
||||
$display_well = $frage->nummer == 0 ? '' : 'well'; // don't style frage 0 because this is always the introduction to gebiet
|
||||
echo '
|
||||
<div class="row">
|
||||
<div class="col-xs-offset-1 col-xs-10 col-sm-offset-2 col-sm-8">
|
||||
<div class="'. $display_well. ' text-center">'. $frage->text. '</div>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
$display_well = $frage->nummer == 0 ? '' : 'well'; // don't style frage 0 because this is always the introduction to gebiet
|
||||
echo '
|
||||
<div class="row">
|
||||
<div class="col-xs-offset-1 col-xs-10 col-sm-offset-2 col-sm-8">
|
||||
<div class="'. $display_well. ' text-center">'. $frage->text. '</div>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
//Vorschlaege laden
|
||||
//Vorschlaege laden
|
||||
$vs = new vorschlag();
|
||||
$vs->getVorschlag($frage->frage_id, $_SESSION['sprache_user'], $gebiet->zufallvorschlag);
|
||||
|
||||
// Fallback auf DEFAULT_LANGUAGE wenn kein Vorschlag in der $_SESSION['sprache_user'] vorhanden ist
|
||||
if (isset($vs->result[0]) && $vs->result[0]->text == '' && $vs->result[0]->bild == '' && $vs->result[0]->audio == '')
|
||||
{
|
||||
$vs = new vorschlag();
|
||||
$vs->getVorschlag($frage->frage_id, DEFAULT_LANGUAGE, $gebiet->zufallvorschlag);
|
||||
}
|
||||
|
||||
$letzte = $frage->getNextFrage($gebiet_id, $_SESSION['pruefling_id'], $frage_id, $demo);
|
||||
echo "<form action=\"$PHP_SELF?gebiet_id=$gebiet_id&frage_id=$frage->frage_id\" method=\"POST\" ".(!$letzte && !$levelgebiet?"onsubmit=\"letzteFrage()\"":"").">";
|
||||
echo '
|
||||
<div class="row text-center">
|
||||
<table class="table" style="width: 600px; margin-left: auto; margin-right: auto;">
|
||||
<tr>
|
||||
';
|
||||
<div class="row text-center">
|
||||
<table class="table" style="width: 600px; margin-left: auto; margin-right: auto;">
|
||||
<tr>
|
||||
';
|
||||
$anzahl = 1;
|
||||
$beantwortet = false;
|
||||
$cnt = 0; // counter für foreach-Schleife
|
||||
$len = count($vs->result);
|
||||
$len = count($vs->result);
|
||||
|
||||
//Antworten laden falls bereits vorhanden
|
||||
$antwort = new antwort();
|
||||
@@ -618,10 +637,10 @@ if($frage->frage_id!='')
|
||||
|
||||
echo '<br/>';
|
||||
if($vorschlag->bild!='')
|
||||
echo "<img class='testtoolvorschlag' src='bild.php?src=vorschlag&vorschlag_id=$vorschlag->vorschlag_id&sprache=".$_SESSION['sprache_user']."' /><br/>";
|
||||
echo "<img class='testtoolvorschlag' src='bild.php?src=vorschlag&vorschlag_id=$vorschlag->vorschlag_id&sprache=".$fallbacksprache."' /><br/>";
|
||||
if($vorschlag->audio!='')
|
||||
{
|
||||
echo ' <audio src="sound.php?src=vorschlag&vorschlag_id='.$vorschlag->vorschlag_id.'&sprache='.$_SESSION['sprache_user'].'" controls="controls">
|
||||
echo ' <audio src="sound.php?src=vorschlag&vorschlag_id='.$vorschlag->vorschlag_id.'&sprache='.$fallbacksprache.'" controls="controls">
|
||||
<div>
|
||||
<p>Ihr Browser unterstützt dieses Audioelement leider nicht.</p>
|
||||
</div>
|
||||
@@ -682,9 +701,9 @@ if($frage->frage_id!='')
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '
|
||||
</div> <!--/.row-->
|
||||
';
|
||||
echo '
|
||||
</div> <!--/.row-->
|
||||
';
|
||||
echo "</form>";
|
||||
echo '</div></div>';
|
||||
echo '<br/><br/><br/><br/><br/>';
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<frame src="topbar.php" name="topbar" scrolling="NO" noresize>
|
||||
<frameset rows="*" cols="230,*" framespacing="0" frameborder="NO" border="0">
|
||||
<frame id="menu_testtool" src="menu.php" name="menu" scrolling="AUTO" noresize>
|
||||
<frame id="content_testtool" style="padding-top: 24px; overflow: hidden;" src="login.php" name="content">
|
||||
<frame id="content_testtool" style="padding-top: 24px; overflow: hidden; padding-left: 10px" src="login.php" name="content">
|
||||
</frameset>
|
||||
<noframes>
|
||||
<body>
|
||||
|
||||
+23
-10
@@ -66,6 +66,7 @@ $gebdatum='';
|
||||
$date = new datum();
|
||||
|
||||
$reload_menu=false;
|
||||
$alertmsg = '';
|
||||
|
||||
$sg_var = new studiengang();
|
||||
|
||||
@@ -189,7 +190,7 @@ if (isset($_POST['prestudent']) && isset($gebdatum))
|
||||
|
||||
// * 1. Sprache über Ablauf Vorgaben ermitteln
|
||||
$ablauf = new Ablauf();
|
||||
$ablauf->getAblaufVorgabeStudiengang($firstPrio_studiengang_kz);
|
||||
$ablauf->getAblaufGebiete($firstPrio_studiengang_kz, $firstPrio_studienplan_id);
|
||||
$rt_sprache = '';
|
||||
|
||||
if(!empty($ablauf->result[0]))
|
||||
@@ -224,17 +225,17 @@ if (isset($_POST['prestudent']) && isset($gebdatum))
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<span class="error">'.$p->t('testtool/reihungstestNichtFreigeschalten').'</span>';
|
||||
$alertmsg .= '<div class="alert alert-danger">'.$p->t('testtool/reihungstestNichtFreigeschalten').'</div>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<span class="error">'.$p->t('testtool/reihungstestKannNichtGeladenWerden').'</span>';
|
||||
$alertmsg .= '<div class="alert alert-danger">'.$p->t('testtool/reihungstestKannNichtGeladenWerden').'</div>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<span class="error">'.$p->t('testtool/geburtsdatumStimmtNichtUeberein').'</span>';
|
||||
$alertmsg .= '<div class="alert alert-danger">'.$p->t('testtool/geburtsdatumStimmtNichtUeberein').'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,7 +276,15 @@ else
|
||||
//$prestudent_id=null;
|
||||
$ps=new prestudent();
|
||||
$datum=date('Y-m-d');
|
||||
$ps->getPrestudentRT($datum);
|
||||
// An der FHTW wird ein Bewerber nur einmal ausgegeben (1. Prio) falls es mehrere Bewerbungen gibt
|
||||
/*if (CAMPUS_NAME == 'FH Technikum Wien')
|
||||
{
|
||||
$ps->getFirstPrioPrestudentRT($datum);
|
||||
}
|
||||
else*/
|
||||
{
|
||||
$ps->getPrestudentRT($datum);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -490,16 +499,19 @@ if (isset($prestudent_id))
|
||||
echo '<tr>';
|
||||
$stg = new Studiengang($ps_obj->studiengang_kz);
|
||||
|
||||
if($ps_obj->lastStatus == "Interessent")
|
||||
if($ps_obj->lastStatus == "Interessent"
|
||||
|| $ps_obj->lastStatus == "Bewerber"
|
||||
|| $ps_obj->lastStatus == "Wartender"
|
||||
|| $ps_obj->lastStatus == "Aufgenommener")
|
||||
{
|
||||
echo '<td style="width: 50%;">'. $ps_obj->typ_bz .' '. ($sprache_user == 'English' ? $stg->english : $stg->bezeichnung). '</td>';
|
||||
echo '<td style="width: 50%;">'. $ps_obj->typ_bz .' '. ($sprache_user == 'English' ? $stg->english : $stg->bezeichnung). ' ('.$ps_obj->orgform_bezeichnung[$sprache_user].')</td>';
|
||||
if($ps_obj->ausbildungssemester == '1')
|
||||
{
|
||||
echo '<td>'. $p->t('testtool/regulaererEinstieg'). ' (1. Semester)</td>';
|
||||
}
|
||||
elseif($ps_obj->ausbildungssemester == '3')
|
||||
{
|
||||
echo '<td>'. $p->t('testtool/quereinstieg'). ' (3.Semester)</td>';
|
||||
echo '<td>'. $p->t('testtool/quereinstieg'). ' (3. Semester)</td>';
|
||||
}
|
||||
}
|
||||
// wenn letzter Status \'Abgewiesener\' ist, dann als solchen kennzeichnen
|
||||
@@ -564,7 +576,8 @@ else // LOGIN Site (vor Login)
|
||||
echo '<div class="col-xs-11">';
|
||||
|
||||
// Welcome text
|
||||
echo '
|
||||
echo $alertmsg;
|
||||
echo '
|
||||
<div class="row" style="margin-bottom: 10%; margin-top: 3%;">
|
||||
<div class="col-xs-6 text-center" style="border-right: 1px solid lightgrey;">
|
||||
<h1 style="white-space: normal">Herzlich Willkommen zum Reihungstest</h1><br><br>
|
||||
@@ -615,7 +628,7 @@ else // LOGIN Site (vor Login)
|
||||
echo '<div class="form-group"> ';
|
||||
echo '<label for="datepicker" class="col-sm-offset-1 col-sm-4 control-label">Geburtsdatum | Date of Birth</label>';
|
||||
echo '<div class="col-sm-3">';
|
||||
echo '<input type="text" id="datepicker" class="form-control" name="gebdatum" value="'.$date->formatDatum($gebdatum,'d.m.Y').'">';
|
||||
echo '<input type="text" id="datepicker" class="form-control" name="gebdatum" value="'.$date->formatDatum($gebdatum,'d.m.Y').'" placeholder="DD.MM.YYYY">';
|
||||
echo '</div>'; // end col-xs
|
||||
echo '</div>'; // end form-group
|
||||
|
||||
|
||||
+165
-140
@@ -69,7 +69,7 @@ if (isset($_SESSION['pruefling_id']))
|
||||
$result = $db->db_query($qry);
|
||||
|
||||
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-right-width:1px;border-right-color:#BCBCBC; border-collapse: separate;
|
||||
border-spacing: 0 3px;">';
|
||||
border-spacing: 0 3px;">';
|
||||
|
||||
// Link zur Startseite
|
||||
echo '<tr><td class="ItemTesttool" style="margin-left: 20px;" nowrap>
|
||||
@@ -78,16 +78,16 @@ if (isset($_SESSION['pruefling_id']))
|
||||
|
||||
// Link zur Einleitung
|
||||
if ($content_id = $db->db_fetch_object($result))
|
||||
{
|
||||
{
|
||||
if($content_id->content_id!='')
|
||||
{
|
||||
{
|
||||
echo '
|
||||
<tr id="tr-einleitung"><td class="ItemTesttool" style="margin-left: 20px;" nowrap>
|
||||
<a class="ItemTesttool navButton" href="../../cms/content.php?content_id='.$content_id->content_id.'&sprache='.$sprache_user.'" target="content">'.$p->t('testtool/einleitung').'</a>
|
||||
</td></tr>
|
||||
';
|
||||
}
|
||||
}
|
||||
<tr id="tr-einleitung"><td class="ItemTesttool" style="margin-left: 20px;" nowrap>
|
||||
<a class="ItemTesttool navButton" href="../../cms/content.php?content_id='.$content_id->content_id.'&sprache='.$sprache_user.'" target="content">'.$p->t('testtool/einleitung').'</a>
|
||||
</td></tr>
|
||||
';
|
||||
}
|
||||
}
|
||||
echo '<tr><td style="padding-left: 20px;" nowrap>';
|
||||
|
||||
$studiengang_kz = (isset($_SESSION['studiengang_kz'])) ? $_SESSION['studiengang_kz'] : '';
|
||||
@@ -98,78 +98,78 @@ if (isset($_SESSION['pruefling_id']))
|
||||
|
||||
/**
|
||||
* Spaltennamen-Aliase extrahieren um sie im Outer-Select verwenden zu können
|
||||
* $bezeichnung_mehrsprachig liefert: bezeichnung_mehrsprachig[1] as bezeichnung_mehrsprachig_1,...
|
||||
* $bezeichnung_mehrsprachig_sel liefert: bezeichnung_mehrsprachig_1, bezeichnung_mehrsprachig_2,...
|
||||
* $bezeichnung_mehrsprachig liefert: bezeichnung_mehrsprachig[1] as bezeichnung_mehrsprachig_1,...
|
||||
* $bezeichnung_mehrsprachig_sel liefert: bezeichnung_mehrsprachig_1, bezeichnung_mehrsprachig_2,...
|
||||
*/
|
||||
$bezeichnung_mehrsprachig_sel = explode(",", $bezeichnung_mehrsprachig);
|
||||
foreach ($bezeichnung_mehrsprachig_sel as &$bm)
|
||||
{
|
||||
$bm = strrchr($bm, ' as ');
|
||||
}
|
||||
{
|
||||
$bm = strrchr($bm, ' as ');
|
||||
}
|
||||
$bezeichnung_mehrsprachig_sel = implode(', ', $bezeichnung_mehrsprachig_sel);
|
||||
|
||||
/**
|
||||
* Reihungstestgebiete der Person ermitteln; Zusammenfassen, falls RT für mehrere Studien
|
||||
* 1. Aktuelle Prestudenten zur Person über den Prüfling ermitteln,
|
||||
* 2. Einstiegssemester (Erstsemester/Quereinsteiger) und Studienplan pro Prestudent ermitteln,
|
||||
* 3. RT-Gebiete falls vorhanden über Studienplan, sonst über STG ermitteln
|
||||
* 4. Für Quereinsteiger zusätzlich auch Erstsemestrigen-Gebiete
|
||||
* 1. Aktuelle Prestudenten zur Person über den Prüfling ermitteln,
|
||||
* 2. Einstiegssemester (Erstsemester/Quereinsteiger) und Studienplan pro Prestudent ermitteln,
|
||||
* 3. RT-Gebiete falls vorhanden über Studienplan, sonst über STG ermitteln
|
||||
* 4. Für Quereinsteiger zusätzlich auch Erstsemestrigen-Gebiete
|
||||
*/
|
||||
$qry = "
|
||||
WITH prestudent_data AS
|
||||
(
|
||||
SELECT DISTINCT ON (prestudent_id)
|
||||
prestudent_id,
|
||||
studienplan_id,
|
||||
studiengang_kz,
|
||||
typ,
|
||||
WITH prestudent_data AS
|
||||
(
|
||||
SELECT DISTINCT ON (prestudent_id)
|
||||
prestudent_id,
|
||||
studienplan_id,
|
||||
studiengang_kz,
|
||||
typ,
|
||||
tbl_studiengangstyp.bezeichnung AS typ_bz,
|
||||
ausbildungssemester AS semester
|
||||
FROM
|
||||
public.tbl_prestudentstatus AS ps_status
|
||||
JOIN
|
||||
public.tbl_prestudent USING (prestudent_id)
|
||||
JOIN
|
||||
public.tbl_studiengang USING (studiengang_kz)
|
||||
JOIN
|
||||
public.tbl_studiengangstyp USING (typ)
|
||||
WHERE
|
||||
tbl_prestudent.person_id = (
|
||||
SELECT
|
||||
person_id
|
||||
FROM
|
||||
public.tbl_prestudent
|
||||
WHERE
|
||||
prestudent_id = ".$db->db_add_param($_SESSION['prestudent_id'])."
|
||||
)
|
||||
ausbildungssemester AS semester
|
||||
FROM
|
||||
public.tbl_prestudentstatus AS ps_status
|
||||
JOIN
|
||||
public.tbl_prestudent USING (prestudent_id)
|
||||
JOIN
|
||||
public.tbl_studiengang USING (studiengang_kz)
|
||||
JOIN
|
||||
public.tbl_studiengangstyp USING (typ)
|
||||
WHERE
|
||||
tbl_prestudent.person_id = (
|
||||
SELECT
|
||||
person_id
|
||||
FROM
|
||||
public.tbl_prestudent
|
||||
WHERE
|
||||
prestudent_id = ".$db->db_add_param($_SESSION['prestudent_id'])."
|
||||
)
|
||||
|
||||
/* Filter only future studiensemester (incl. actual one) */
|
||||
AND
|
||||
studiensemester_kurzbz IN (
|
||||
SELECT
|
||||
studiensemester_kurzbz
|
||||
FROM
|
||||
public.tbl_studiensemester
|
||||
WHERE
|
||||
ende > now()
|
||||
)
|
||||
/* Filter only future studiensemester (incl. actual one) */
|
||||
AND
|
||||
studiensemester_kurzbz IN (
|
||||
SELECT
|
||||
studiensemester_kurzbz
|
||||
FROM
|
||||
public.tbl_studiensemester
|
||||
WHERE
|
||||
ende > now()
|
||||
)
|
||||
|
||||
/* Filter out all Abgewiesene */
|
||||
AND NOT EXISTS (
|
||||
SELECT
|
||||
1
|
||||
FROM
|
||||
tbl_prestudentstatus
|
||||
WHERE
|
||||
status_kurzbz = 'Abgewiesener'
|
||||
AND
|
||||
prestudent_id = ps_status.prestudent_id
|
||||
)
|
||||
/* Filter out all Abgewiesene */
|
||||
AND NOT EXISTS (
|
||||
SELECT
|
||||
1
|
||||
FROM
|
||||
tbl_prestudentstatus
|
||||
WHERE
|
||||
status_kurzbz = 'Abgewiesener'
|
||||
AND
|
||||
prestudent_id = ps_status.prestudent_id
|
||||
)
|
||||
|
||||
AND
|
||||
status_kurzbz = 'Interessent'";
|
||||
AND
|
||||
status_kurzbz = 'Interessent'";
|
||||
|
||||
/* If the logged-in prestudents study is a Bachelor-study, filter only Bachelor-studies */
|
||||
/* If the logged-in prestudents study is a Bachelor-study, filter only Bachelor-studies */
|
||||
if ($stg->typ == 'b')
|
||||
{
|
||||
$qry .= "
|
||||
@@ -184,86 +184,95 @@ if (isset($_SESSION['pruefling_id']))
|
||||
|
||||
$qry .= "
|
||||
|
||||
/* Order to get last semester when using distinct on */
|
||||
ORDER BY
|
||||
prestudent_id,
|
||||
datum DESC,
|
||||
ps_status.insertamum DESC,
|
||||
ps_status.ext_id DESC
|
||||
)
|
||||
/* Order to get last semester when using distinct on */
|
||||
ORDER BY
|
||||
prestudent_id,
|
||||
datum DESC,
|
||||
ps_status.insertamum DESC,
|
||||
ps_status.ext_id DESC
|
||||
)
|
||||
|
||||
|
||||
SELECT DISTINCT ON
|
||||
(gebiet_id, semester)
|
||||
semester,
|
||||
gebiet_id,
|
||||
STRING_AGG(studiengang_kz::TEXT, ', ' ORDER BY studiengang_kz) AS studiengang_kz_list,
|
||||
bezeichnung,
|
||||
MIN(reihung) AS reihung,
|
||||
". $bezeichnung_mehrsprachig_sel. "
|
||||
FROM (
|
||||
SELECT
|
||||
*
|
||||
FROM (
|
||||
(SELECT
|
||||
prestudent_data.semester AS ps_sem,
|
||||
gebiet_id,
|
||||
bezeichnung,
|
||||
tbl_ablauf.studienplan_id,
|
||||
tbl_ablauf.studiengang_kz,
|
||||
tbl_ablauf.semester,
|
||||
tbl_ablauf.reihung,
|
||||
".$bezeichnung_mehrsprachig. "
|
||||
FROM
|
||||
prestudent_data
|
||||
JOIN
|
||||
testtool.tbl_ablauf USING (studiengang_kz)
|
||||
JOIN
|
||||
testtool.tbl_gebiet USING (gebiet_id)
|
||||
WHERE
|
||||
(prestudent_data.semester= 1 AND tbl_ablauf.semester = 1)
|
||||
OR
|
||||
(prestudent_data.semester= 3 AND tbl_ablauf.semester IN (1,3))
|
||||
)
|
||||
SELECT DISTINCT ON
|
||||
(gebiet_id, semester, reihung)
|
||||
semester,
|
||||
gebiet_id,
|
||||
STRING_AGG(studiengang_kz::TEXT, ', ' ORDER BY studiengang_kz) AS studiengang_kz_list,
|
||||
bezeichnung,
|
||||
MIN(reihung) AS reihung,
|
||||
". $bezeichnung_mehrsprachig_sel. "
|
||||
FROM (
|
||||
SELECT
|
||||
*
|
||||
FROM (
|
||||
(SELECT
|
||||
prestudent_data.semester AS ps_sem,
|
||||
gebiet_id,
|
||||
bezeichnung,
|
||||
tbl_ablauf.studienplan_id,
|
||||
tbl_ablauf.studiengang_kz,
|
||||
tbl_ablauf.semester,
|
||||
tbl_ablauf.reihung,
|
||||
".$bezeichnung_mehrsprachig. "
|
||||
FROM
|
||||
prestudent_data
|
||||
JOIN
|
||||
testtool.tbl_ablauf USING (studiengang_kz)
|
||||
JOIN
|
||||
testtool.tbl_gebiet USING (gebiet_id)
|
||||
WHERE
|
||||
(
|
||||
(prestudent_data.semester= 1 AND tbl_ablauf.semester = 1)
|
||||
OR
|
||||
(prestudent_data.semester= 3 AND tbl_ablauf.semester IN (1,3))
|
||||
)
|
||||
AND (
|
||||
prestudent_data.studienplan_id = tbl_ablauf.studienplan_id
|
||||
OR
|
||||
tbl_ablauf.studienplan_id IS NULL
|
||||
)
|
||||
)
|
||||
|
||||
UNION
|
||||
UNION
|
||||
|
||||
(
|
||||
SELECT
|
||||
prestudent_data.semester AS ps_sem,
|
||||
gebiet_id,
|
||||
bezeichnung,
|
||||
tbl_ablauf.studienplan_id,
|
||||
tbl_ablauf.studiengang_kz,
|
||||
tbl_ablauf.semester,
|
||||
tbl_ablauf.reihung,
|
||||
". $bezeichnung_mehrsprachig. "
|
||||
FROM
|
||||
prestudent_data
|
||||
JOIN
|
||||
testtool.tbl_ablauf USING (studienplan_id)
|
||||
JOIN
|
||||
testtool.tbl_gebiet USING (gebiet_id)
|
||||
WHERE
|
||||
(prestudent_data.semester= 1 AND tbl_ablauf.semester = 1)
|
||||
OR
|
||||
(prestudent_data.semester= 3 AND tbl_ablauf.semester IN (1,3))
|
||||
)
|
||||
) temp
|
||||
) temp2
|
||||
(
|
||||
SELECT
|
||||
prestudent_data.semester AS ps_sem,
|
||||
gebiet_id,
|
||||
bezeichnung,
|
||||
tbl_ablauf.studienplan_id,
|
||||
tbl_ablauf.studiengang_kz,
|
||||
tbl_ablauf.semester,
|
||||
tbl_ablauf.reihung,
|
||||
". $bezeichnung_mehrsprachig. "
|
||||
FROM
|
||||
prestudent_data
|
||||
JOIN
|
||||
testtool.tbl_ablauf USING (studienplan_id)
|
||||
JOIN
|
||||
testtool.tbl_gebiet USING (gebiet_id)
|
||||
WHERE
|
||||
(prestudent_data.semester= 1 AND tbl_ablauf.semester = 1)
|
||||
OR
|
||||
(prestudent_data.semester= 3 AND tbl_ablauf.semester IN (1,3))
|
||||
)
|
||||
) temp
|
||||
) temp2
|
||||
|
||||
GROUP BY
|
||||
semester,
|
||||
gebiet_id,
|
||||
bezeichnung,
|
||||
GROUP BY
|
||||
semester,
|
||||
gebiet_id,
|
||||
bezeichnung,
|
||||
". $bezeichnung_mehrsprachig_sel ."
|
||||
|
||||
ORDER BY
|
||||
semester,
|
||||
gebiet_id
|
||||
";
|
||||
ORDER BY
|
||||
semester,
|
||||
reihung,
|
||||
gebiet_id
|
||||
";
|
||||
|
||||
$result = $db->db_query($qry);
|
||||
$anzahlGebiete = $db->db_num_rows($result);
|
||||
$lastsemester = '';
|
||||
$quereinsteiger_stg = '';
|
||||
while($row = $db->db_fetch_object($result))
|
||||
@@ -355,10 +364,22 @@ if (isset($_SESSION['pruefling_id']))
|
||||
$class='ItemTesttool';
|
||||
}
|
||||
|
||||
// Fallback für Gebietbezeichnung, falls nicht in gewählter Sprache vorhanden
|
||||
$gebietbezeichnung = $sprache_mehrsprachig->parseSprachResult("bezeichnung_mehrsprachig", $row)[$sprache_user];
|
||||
if ($gebietbezeichnung == '')
|
||||
{
|
||||
$gebietbezeichnung = $sprache_mehrsprachig->parseSprachResult("bezeichnung_mehrsprachig", $row)[DEFAULT_LANGUAGE];
|
||||
|
||||
if ($gebietbezeichnung == '')
|
||||
{
|
||||
$gebietbezeichnung = $row->bezeichnung;
|
||||
}
|
||||
}
|
||||
|
||||
echo '<tr>
|
||||
<!--<td width="10" class="ItemTesttoolLeft" nowrap> </td>-->
|
||||
<td class="'.$class.'">
|
||||
<a class="'.$class.'" href="frage.php?gebiet_id='.$row->gebiet_id.'" onclick="document.location.reload()" target="content" style="'.$style.'">'.$sprache_mehrsprachig->parseSprachResult("bezeichnung_mehrsprachig", $row)[$sprache_user].'</a>
|
||||
<a class="'.$class.'" href="frage.php?gebiet_id='.$row->gebiet_id.'" onclick="document.location.reload()" target="content" style="'.$style.'">'.$gebietbezeichnung.'</a>
|
||||
</td>
|
||||
<!--<td width="10" class="ItemTesttoolRight" nowrap> </td>-->
|
||||
</tr>';
|
||||
@@ -368,9 +389,13 @@ if (isset($_SESSION['pruefling_id']))
|
||||
$invalid_gebiete = true;
|
||||
}
|
||||
}
|
||||
echo '</table>';
|
||||
if ($anzahlGebiete > 0)
|
||||
{
|
||||
echo '</table>';
|
||||
}
|
||||
|
||||
// Link zum Logout
|
||||
|
||||
echo '<tr><td class="ItemTesttool" style="margin-left: 20px;" nowrap>
|
||||
<a class="ItemTesttool navButton" href="login.php?logout=true" target="content">Logout</a>
|
||||
</td></tr>';
|
||||
|
||||
@@ -108,6 +108,10 @@ define('FAS_ANWESENHEIT_GELB', 90);
|
||||
// Legt einen Prüfungstermin an wenn eine neue Note erfasst wird
|
||||
define('FAS_PRUEFUNG_BEI_NOTENEINGABE_ANLEGEN',false);
|
||||
|
||||
// Legt fest ob die Uebernahme der Reihungstestpunkte im FAS moeglich ist
|
||||
// true | false
|
||||
define('FAS_REIHUNGSTEST_PUNKTEUEBERNAHME', true);
|
||||
|
||||
// Legt fest ob bei der Uebernahme der Reihungstestpunkte die Punkte
|
||||
//oder Prozentpunkte uebernommen werden true=Punkte, false=Prozentpunkte
|
||||
define('FAS_REIHUNGSTEST_PUNKTE', false);
|
||||
|
||||
@@ -1266,7 +1266,7 @@ function MessageNew()
|
||||
{
|
||||
var prestudentIdArray = getMultipleTreeCellText(tree, 'student-treecol-prestudent_id');
|
||||
|
||||
var action = '<?php echo APP_ROOT ?>index.ci.php/system/FASMessages/write/' + <?php echo $benutzer->person_id; ?>;
|
||||
var action = '<?php echo APP_ROOT ?>index.ci.php/system/messages/FASMessages/writeTemplate/' + <?php echo $benutzer->person_id; ?>;
|
||||
|
||||
openWindowPostArray(action, 'prestudent_id', prestudentIdArray);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ function MessagesNewMessage()
|
||||
{
|
||||
var prestudentIdArray = getMultipleTreeCellText(tree, 'student-treecol-prestudent_id');
|
||||
|
||||
var action = '<?php echo APP_ROOT ?>index.ci.php/system/FASMessages/write/' + MessageSenderPersonID;
|
||||
var action = '<?php echo APP_ROOT ?>index.ci.php/system/messages/FASMessages/writeTemplate';
|
||||
|
||||
openWindowPostArray(action, 'prestudent_id', prestudentIdArray);
|
||||
}
|
||||
@@ -128,7 +128,7 @@ function MessagesSendAnswer()
|
||||
var RecipientID = getTreeCellText(messagesTree, 'messages-tree-recipient_id', messagesTree.currentIndex);
|
||||
var prestudentIdArray = new Array(getTreeCellText(studentsTree, 'student-treecol-prestudent_id', studentsTree.currentIndex));
|
||||
|
||||
var action = '<?php echo APP_ROOT ?>index.ci.php/system/FASMessages/writeReply/' + MessageSenderPersonID + '/' + MessageId + '/' + RecipientID;
|
||||
var action = '<?php echo APP_ROOT ?>index.ci.php/system/messages/FASMessages/writeReplyTemplate/' + MessageId + '/' + RecipientID;
|
||||
|
||||
openWindowPostArray(action, 'prestudent_id', prestudentIdArray);
|
||||
}
|
||||
|
||||
@@ -125,15 +125,15 @@ $format_colored =& $workbook->addFormat();
|
||||
$format_colored->setFgColor(10);
|
||||
|
||||
$format_number_colored =& $workbook->addFormat();
|
||||
$format_number_colored->setNumFormat('0, 0.00');
|
||||
$format_number_colored->setNumFormat('0,0.00');
|
||||
//$format_number_colored->setNumFormat('0.00');
|
||||
$format_number_colored->setFgColor(10);
|
||||
|
||||
$format_number =& $workbook->addFormat();
|
||||
$format_number->setNumFormat('0, 0.00');
|
||||
$format_number->setNumFormat('0,0.00');
|
||||
|
||||
$format_number_bold =& $workbook->addFormat();
|
||||
$format_number_bold->setNumFormat('0, 0.00');
|
||||
$format_number_bold->setNumFormat('0,0.00');
|
||||
//$format_number_bold->setNumFormat('0.00');
|
||||
$format_number_bold->setBold();
|
||||
|
||||
|
||||
@@ -1,496 +1,501 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 fhcomplete.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>
|
||||
*/
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
?>
|
||||
// ********** FUNKTIONEN ********** //
|
||||
var AufnahmeterminePrestudentID='';
|
||||
var AufnahmeTermineStudienplanID='';
|
||||
var AufnahmeTermineStudiengang='';
|
||||
|
||||
// ****
|
||||
// * Laedt die Trees
|
||||
// ****
|
||||
function loadAufnahmeTermine(prestudent_id)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
AufnahmeTerminePrestudentID = prestudent_id;
|
||||
AufnahmeTermineLoadTree();
|
||||
|
||||
document.getElementById('aufnahmetermine-textbox-gesamtpunkte').disabled=false;
|
||||
document.getElementById('aufnahmetermine-button-savegesamtpunkte').disabled=false;
|
||||
document.getElementById('aufnahmetermine-button-calculatetotal').disabled=false;
|
||||
|
||||
// Gruppen DropDown laden
|
||||
var aufnahmegruppemenulist = document.getElementById('aufnahmetermine-menulist-aufnahmegruppe');
|
||||
if(aufnahmegruppemenulist)
|
||||
{
|
||||
var url="<?php echo APP_ROOT ?>rdf/gruppen.rdf.php?aufnahmegruppe=true&optional=true";
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasources = aufnahmegruppemenulist.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
aufnahmegruppemenulist.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
//Refresh damit die entfernten DS auch wirklich entfernt werden
|
||||
aufnahmegruppemenulist.builder.rebuild();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
var myDatasource = rdfService.GetDataSourceBlocking(url);
|
||||
aufnahmegruppemenulist.database.AddDataSource(myDatasource);
|
||||
aufnahmegruppemenulist.builder.rebuild();
|
||||
}
|
||||
// Gesamtpunkte laden und anzeigen
|
||||
|
||||
var url = '<?php echo APP_ROOT ?>rdf/student.rdf.php?prestudent_id='+prestudent_id+'&'+gettimestamp();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].
|
||||
getService(Components.interfaces.nsIRDFService);
|
||||
|
||||
var dsource = rdfService.GetDataSourceBlocking(url);
|
||||
|
||||
var subject = rdfService.GetResource("http://www.technikum-wien.at/student/" + prestudent_id);
|
||||
|
||||
var predicateNS = "http://www.technikum-wien.at/student/rdf";
|
||||
|
||||
punkte = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#punkte" ));
|
||||
var person_id = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#person_id" ));
|
||||
AufnahmeTermineStudiengang = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#studiengang_kz" ));
|
||||
reihungstestangetreten = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#reihungstestangetreten" ));
|
||||
var aufnahmegruppe_kurzbz = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#aufnahmegruppe_kurzbz" ));
|
||||
document.getElementById('aufnahmetermine-textbox-gesamtpunkte').value=punkte;
|
||||
if(reihungstestangetreten=='true')
|
||||
document.getElementById('aufnahmetermine-checkbox-reihungstestangetreten').checked=true;
|
||||
else
|
||||
document.getElementById('aufnahmetermine-checkbox-reihungstestangetreten').checked=false;
|
||||
document.getElementById('aufnahmetermine-menulist-aufnahmegruppe').value = aufnahmegruppe_kurzbz;
|
||||
AufnahmeTermineStudienplanID = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#studienplan_id" ));
|
||||
|
||||
// ReihungstestDropDown laden
|
||||
var reihungstestmenulist = document.getElementById('aufnahmetermine-menulist-reihungstest');
|
||||
var url="<?php echo APP_ROOT ?>rdf/reihungstest.rdf.php?optional=true&prestudent_id="+AufnahmeTerminePrestudentID;
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasources = reihungstestmenulist.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
reihungstestmenulist.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
//Refresh damit die entfernten DS auch wirklich entfernt werden
|
||||
reihungstestmenulist.builder.rebuild();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
var myDatasource = rdfService.GetDataSourceBlocking(url);
|
||||
reihungstestmenulist.database.AddDataSource(myDatasource);
|
||||
reihungstestmenulist.builder.rebuild();
|
||||
|
||||
// Studienplan DropDown laden
|
||||
var studienplanmenulist = document.getElementById('aufnahmetermine-menulist-studienplan');
|
||||
var url="<?php echo APP_ROOT ?>rdf/studienplan.rdf.php?person_id="+person_id;
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasources = studienplanmenulist.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
studienplanmenulist.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
//Refresh damit die entfernten DS auch wirklich entfernt werden
|
||||
studienplanmenulist.builder.rebuild();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
var myDatasource = rdfService.GetDataSourceBlocking(url);
|
||||
studienplanmenulist.database.AddDataSource(myDatasource);
|
||||
studienplanmenulist.builder.rebuild();
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt den Tree mit den Terminen
|
||||
*/
|
||||
function AufnahmeTermineLoadTree()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
//Termine laden
|
||||
url = "<?php echo APP_ROOT; ?>rdf/aufnahmetermine.rdf.php?prestudent_id="+AufnahmeTerminePrestudentID+"&ts="+gettimestamp();
|
||||
|
||||
var treeAufnahmeTermine=document.getElementById('aufnahmetermine-tree');
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasources = treeAufnahmeTermine.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
treeAufnahmeTermine.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
treeAufnahmeTermine.builder.rebuild();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
var AufnahmeTerminTreeDatasource = rdfService.GetDataSource(url);
|
||||
AufnahmeTerminTreeDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
treeAufnahmeTermine.database.AddDataSource(AufnahmeTerminTreeDatasource);
|
||||
}
|
||||
|
||||
/**
|
||||
* Speichert die Gesamtpunkte
|
||||
*/
|
||||
function AufnahmeTermineSaveGesamtpunkte()
|
||||
{
|
||||
var punkte = document.getElementById('aufnahmetermine-textbox-gesamtpunkte').value;
|
||||
var aufnahmegruppe_kurzbz = document.getElementById('aufnahmetermine-menulist-aufnahmegruppe').value;
|
||||
var reihungstestangetreten = document.getElementById('aufnahmetermine-checkbox-reihungstestangetreten').checked;
|
||||
var url = '<?php echo APP_ROOT ?>content/student/studentDBDML.php';
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
req.add('type', 'AufnahmeTermineSaveGesamtpunkte');
|
||||
|
||||
req.add('prestudent_id', AufnahmeTerminePrestudentID);
|
||||
req.add('punkte', punkte);
|
||||
req.add('reihungstestangetreten',reihungstestangetreten);
|
||||
req.add('aufnahmegruppe_kurzbz',aufnahmegruppe_kurzbz);
|
||||
|
||||
var response = req.executePOST();
|
||||
var val = new ParseReturnValue(response);
|
||||
|
||||
if (!val.dbdml_return)
|
||||
{
|
||||
if(val.dbdml_errormsg=='')
|
||||
alert(response)
|
||||
else
|
||||
alert(val.dbdml_errormsg)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function AufnahmeTermineCalculateTotal()
|
||||
{
|
||||
var url = '<?php echo APP_ROOT ?>content/student/studentDBDML.php';
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
req.add('type', 'AufnahmeTermineBerechneGesamtpunkte');
|
||||
req.add('prestudent_id', AufnahmeTerminePrestudentID);
|
||||
|
||||
var response = req.executePOST();
|
||||
var val = new ParseReturnValue(response);
|
||||
|
||||
if (!val.dbdml_return)
|
||||
{
|
||||
if(val.dbdml_errormsg=='')
|
||||
alert(response)
|
||||
else
|
||||
alert(val.dbdml_errormsg)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById('aufnahmetermine-textbox-gesamtpunkte').value=val.dbdml_data;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt die Details bei Auswahl eines Eintrages aus dem Tree
|
||||
*/
|
||||
function AufnahmeTermineAuswahl()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var tree = document.getElementById('aufnahmetermine-tree');
|
||||
|
||||
if (tree.currentIndex==-1) return;
|
||||
|
||||
AufnahmeTermineDisableFields(false);
|
||||
AufnahmeTermineReihungstestDropDownRefresh(true);
|
||||
|
||||
//Ausgewaehlten Eintrag holen
|
||||
var rt_person_id = getTreeCellText(tree, 'aufnahmetermine-tree-rt_person_id', tree.currentIndex);
|
||||
|
||||
//Daten holen
|
||||
var url = '<?php echo APP_ROOT ?>rdf/aufnahmetermine.rdf.php?rt_person_id='+rt_person_id+'&'+gettimestamp();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].
|
||||
getService(Components.interfaces.nsIRDFService);
|
||||
|
||||
var dsource = rdfService.GetDataSourceBlocking(url);
|
||||
|
||||
var subject = rdfService.GetResource("http://www.technikum-wien.at/aufnahmetermine/"+rt_person_id);
|
||||
|
||||
var predicateNS = "http://www.technikum-wien.at/aufnahmetermine/rdf";
|
||||
|
||||
//Daten holen
|
||||
|
||||
var person_id = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#person_id" ));
|
||||
var rt_id = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#rt_id" ));
|
||||
var anmeldedatum = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#anmeldedatum" ));
|
||||
var teilgenommen = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#teilgenommen" ));
|
||||
var punkte = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#punkte" ));
|
||||
var studienplan_id = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#studienplan_id" ));
|
||||
var endpunkte_inkl_gebiete = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#endpunkte_inkl_gebiete" ));
|
||||
var endpunkte_exkl_gebiete = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#endpunkte_exkl_gebiete" ));
|
||||
var typ = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#typ" ));
|
||||
|
||||
document.getElementById('aufnahmetermine-textbox-rt_person_id').value=rt_person_id;
|
||||
document.getElementById('aufnahmetermine-textbox-person_id').value=person_id;
|
||||
document.getElementById('aufnahmetermine-checkbox-neu').checked=false;
|
||||
document.getElementById('aufnahmetermine-textbox-anmeldungreihungstest').value=anmeldedatum;
|
||||
MenulistSelectItemOnValue('aufnahmetermine-menulist-reihungstest', rt_id);
|
||||
|
||||
if(teilgenommen=='Ja')
|
||||
document.getElementById('aufnahmetermine-checkbox-teilgenommen').checked=true;
|
||||
else
|
||||
document.getElementById('aufnahmetermine-checkbox-teilgenommen').checked=false;
|
||||
document.getElementById('aufnahmetermine-textbox-punkte').value=punkte;
|
||||
document.getElementById('aufnahmetermine-menulist-studienplan').value=studienplan_id;
|
||||
document.getElementById('aufnahmetermine-textbox-endpunkte-inkl-gebiete').value = endpunkte_inkl_gebiete;
|
||||
document.getElementById('aufnahmetermine-textbox-endpunkte-exkl-gebiete').value = endpunkte_exkl_gebiete;
|
||||
|
||||
// Sichtbarkeit der RT-Vergleichsergebnispunkte (ohne Quereinsteiger)
|
||||
var basisgebiet_punkte_anzeigen = <?php echo (defined('FAS_REIHUNGSTEST_PUNKTE_BASISGEBIET_ANZEIGEN') && FAS_REIHUNGSTEST_PUNKTE_BASISGEBIET_ANZEIGEN) ? 'true' : 'false' ?>;
|
||||
|
||||
// * Generell Anzeige nur wenn über config-Datei gesetzt ist
|
||||
if (basisgebiet_punkte_anzeigen)
|
||||
{
|
||||
// * für Bachelor-Studiengänge anzeigen
|
||||
if (typ == 'b')
|
||||
{
|
||||
document.getElementById('aufnahmetermine-groupbox-vergleich-endpunkte').hidden = false;
|
||||
}
|
||||
// * für Master-Studiengänge verstecken
|
||||
else if (typ == 'm')
|
||||
{
|
||||
document.getElementById('aufnahmetermine-groupbox-vergleich-endpunkte').hidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function AufnahmeTermineNeu()
|
||||
{
|
||||
AufnahmeTermineDisableFields(false);
|
||||
AufnahmeTermineResetFields();
|
||||
AufnahmeTermineReihungstestDropDownRefresh(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Loescht einen Aufnahmetermin
|
||||
*/
|
||||
function AufnahmeTermineDelete()
|
||||
{
|
||||
var rt_person_id = document.getElementById('aufnahmetermine-textbox-rt_person_id').value;
|
||||
|
||||
if(!confirm("Wollen Sie diesen Eintrag wirklich löschen?"))
|
||||
return;
|
||||
|
||||
var url = '<?php echo APP_ROOT ?>content/student/studentDBDML.php';
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
req.add('type', 'AufnahmeTermineDelete');
|
||||
req.add('rt_person_id', rt_person_id);
|
||||
|
||||
var response = req.executePOST();
|
||||
var val = new ParseReturnValue(response);
|
||||
|
||||
if (!val.dbdml_return)
|
||||
{
|
||||
if(val.dbdml_errormsg=='')
|
||||
alert(response)
|
||||
else
|
||||
alert(val.dbdml_errormsg)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
AufnahmeTermineLoadTree();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function AufnahemTermineReihungstestPunkteTransmit()
|
||||
{
|
||||
var reihungstest_id = document.getElementById('aufnahmetermine-menulist-reihungstest').value;
|
||||
var person_id = document.getElementById('aufnahmetermine-textbox-person_id').value;
|
||||
|
||||
var url = '<?php echo APP_ROOT ?>content/student/studentDBDML.php';
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
req.add('type', 'getReihungstestPunkte');
|
||||
|
||||
req.add('person_id', person_id);
|
||||
req.add('reihungstest_id', reihungstest_id);
|
||||
var response = req.executePOST();
|
||||
|
||||
var val = new ParseReturnValue(response)
|
||||
|
||||
if (!val.dbdml_return)
|
||||
{
|
||||
if(val.dbdml_errormsg=='')
|
||||
alert(response)
|
||||
else
|
||||
alert(val.dbdml_errormsg)
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById('aufnahmetermine-textbox-punkte').value = val.dbdml_data;
|
||||
}
|
||||
}
|
||||
|
||||
function setEndpunkteAsPunkte(id)
|
||||
{
|
||||
var punkte = document.getElementById(id).value;
|
||||
document.getElementById('aufnahmetermine-textbox-punkte').value = punkte;
|
||||
}
|
||||
|
||||
/**
|
||||
* Speichert einen AufnahmeTermin
|
||||
*/
|
||||
function AufnahmeTermineSpeichern()
|
||||
{
|
||||
var rt_person_id = document.getElementById('aufnahmetermine-textbox-rt_person_id').value;
|
||||
var rt_id = document.getElementById('aufnahmetermine-menulist-reihungstest').value;
|
||||
var person_id = document.getElementById('aufnahmetermine-textbox-person_id').value;
|
||||
var neu = document.getElementById('aufnahmetermine-checkbox-neu').checked;
|
||||
var anmeldedatum = document.getElementById('aufnahmetermine-textbox-anmeldungreihungstest').iso;
|
||||
var rt_id_new = document.getElementById('aufnahmetermine-menulist-reihungstest').value;
|
||||
var teilgenommen = document.getElementById('aufnahmetermine-checkbox-teilgenommen').checked;
|
||||
var punkte = document.getElementById('aufnahmetermine-textbox-punkte').value;
|
||||
var studienplan_id = document.getElementById('aufnahmetermine-menulist-studienplan').value;
|
||||
|
||||
var url = '<?php echo APP_ROOT ?>content/student/studentDBDML.php';
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
req.add('type', 'AufnahmeTermineSave');
|
||||
|
||||
req.add('rt_id', rt_id);
|
||||
req.add('rt_person_id', rt_person_id);
|
||||
req.add('person_id', person_id);
|
||||
req.add('prestudent_id', AufnahmeTerminePrestudentID);
|
||||
req.add('neu', neu);
|
||||
req.add('anmeldedatum', anmeldedatum);
|
||||
req.add('teilgenommen', teilgenommen);
|
||||
req.add('punkte', punkte);
|
||||
req.add('studienplan_id', studienplan_id);
|
||||
|
||||
var response = req.executePOST();
|
||||
var val = new ParseReturnValue(response);
|
||||
|
||||
if (!val.dbdml_return)
|
||||
{
|
||||
if(val.dbdml_errormsg=='')
|
||||
alert(response)
|
||||
else
|
||||
alert(val.dbdml_errormsg)
|
||||
|
||||
document.getElementById('aufnahmetermine-textbox-rt_person_id').value=val.dbdml_data;
|
||||
document.getElementById('aufnahmetermine-checkbox-neu').checked=false;
|
||||
AufnahmeTermineLoadTree();
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById('aufnahmetermine-textbox-rt_person_id').value=val.dbdml_data;
|
||||
document.getElementById('aufnahmetermine-checkbox-neu').checked=false;
|
||||
AufnahmeTermineLoadTree();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Aktiviert oder Deaktiviert die Eingabefelder
|
||||
* @param val boolean true | false
|
||||
*/
|
||||
function AufnahmeTermineDisableFields(val)
|
||||
{
|
||||
document.getElementById('aufnahmetermine-button-speichern').disabled=val;
|
||||
document.getElementById('aufnahmetermine-textbox-punkte').disabled=val;
|
||||
document.getElementById('aufnahmetermine-checkbox-teilgenommen').disabled=val;
|
||||
document.getElementById('aufnahmetermine-textbox-anmeldungreihungstest').disabled=val;
|
||||
document.getElementById('aufnahmetermine-menulist-reihungstest').disabled=val;
|
||||
document.getElementById('aufnahmetermine-button-anmeldungreihungstest-heute').disabled=val;
|
||||
document.getElementById('aufnahmetermine-menulist-studienplan').disabled=val;
|
||||
}
|
||||
|
||||
/**
|
||||
* Leert die Eingabefelder
|
||||
*/
|
||||
function AufnahmeTermineResetFields()
|
||||
{
|
||||
document.getElementById('aufnahmetermine-textbox-punkte').value='';
|
||||
document.getElementById('aufnahmetermine-checkbox-teilgenommen').checked=false;
|
||||
document.getElementById('aufnahmetermine-textbox-anmeldungreihungstest').value='';
|
||||
document.getElementById('aufnahmetermine-menulist-reihungstest').value='';
|
||||
document.getElementById('aufnahmetermine-textbox-person_id').value='';
|
||||
document.getElementById('aufnahmetermine-checkbox-neu').checked=true;
|
||||
document.getElementById('aufnahmetermine-textbox-rt_person_id').value='';
|
||||
document.getElementById('aufnahmetermine-menulist-studienplan').value=AufnahmeTermineStudienplanID;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Setzt das aktuelle Datum als Anmeldedatum
|
||||
*/
|
||||
function AufnahmeTermineAnmeldungreihungstestHeute()
|
||||
{
|
||||
var now = new Date();
|
||||
var jahr = now.getFullYear();
|
||||
|
||||
monat = now.getMonth()+1;
|
||||
if(monat<10) monat='0'+monat;
|
||||
tag = now.getDate();
|
||||
if(tag<10) tag='0'+tag;
|
||||
|
||||
document.getElementById('aufnahmetermine-textbox-anmeldungreihungstest').value=tag+'.'+monat+'.'+jahr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresht das DropDown mit den Reihungstestterminen
|
||||
*/
|
||||
function AufnahmeTermineReihungstestDropDownRefresh(prestudent)
|
||||
{
|
||||
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var menulist = document.getElementById('aufnahmetermine-menulist-reihungstest');
|
||||
if(typeof(prestudent)=='undefined')
|
||||
var url="<?php echo APP_ROOT ?>rdf/reihungstest.rdf.php?include_id=&studiengang_kz="+AufnahmeTermineStudiengang+"&"+gettimestamp();
|
||||
else
|
||||
var url="<?php echo APP_ROOT ?>rdf/reihungstest.rdf.php?optional=true&prestudent_id="+AufnahmeTerminePrestudentID+"&"+gettimestamp();
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasources = menulist.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
menulist.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
//Refresh damit die entfernten DS auch wirklich entfernt werden
|
||||
menulist.builder.rebuild();
|
||||
btn = document.getElementById('aufnahmetermine-button-reihungstest-refresh');
|
||||
btn.setAttribute('image','../../skin/images/spinner.gif');
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
var myDatasource = rdfService.GetDataSourceBlocking(url);
|
||||
menulist.database.AddDataSource(myDatasource);
|
||||
menulist.builder.rebuild();
|
||||
btn.setAttribute('image','../../skin/images/refresh.png');
|
||||
}
|
||||
|
||||
function AufnahmeTermineReihungstestEdit()
|
||||
{
|
||||
var rt_id = document.getElementById('aufnahmetermine-menulist-reihungstest').value;
|
||||
var url="<?php echo APP_ROOT ?>vilesci/stammdaten/reihungstestverwaltung.php?reihungstest_id="+rt_id;
|
||||
window.open(url);
|
||||
<?php
|
||||
/* Copyright (C) 2015 fhcomplete.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>
|
||||
*/
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
?>
|
||||
// ********** FUNKTIONEN ********** //
|
||||
var AufnahmeterminePrestudentID='';
|
||||
var AufnahmeTermineStudienplanID='';
|
||||
var AufnahmeTermineStudiengang='';
|
||||
|
||||
// ****
|
||||
// * Laedt die Trees
|
||||
// ****
|
||||
function loadAufnahmeTermine(prestudent_id)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
AufnahmeTerminePrestudentID = prestudent_id;
|
||||
AufnahmeTermineLoadTree();
|
||||
|
||||
document.getElementById('aufnahmetermine-textbox-gesamtpunkte').disabled=false;
|
||||
document.getElementById('aufnahmetermine-button-savegesamtpunkte').disabled=false;
|
||||
document.getElementById('aufnahmetermine-button-calculatetotal').disabled=false;
|
||||
|
||||
// Gruppen DropDown laden
|
||||
var aufnahmegruppemenulist = document.getElementById('aufnahmetermine-menulist-aufnahmegruppe');
|
||||
if(aufnahmegruppemenulist)
|
||||
{
|
||||
var url="<?php echo APP_ROOT ?>rdf/gruppen.rdf.php?aufnahmegruppe=true&optional=true";
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasources = aufnahmegruppemenulist.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
aufnahmegruppemenulist.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
//Refresh damit die entfernten DS auch wirklich entfernt werden
|
||||
aufnahmegruppemenulist.builder.rebuild();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
var myDatasource = rdfService.GetDataSourceBlocking(url);
|
||||
aufnahmegruppemenulist.database.AddDataSource(myDatasource);
|
||||
aufnahmegruppemenulist.builder.rebuild();
|
||||
}
|
||||
// Gesamtpunkte laden und anzeigen
|
||||
|
||||
var url = '<?php echo APP_ROOT ?>rdf/student.rdf.php?prestudent_id='+prestudent_id+'&'+gettimestamp();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].
|
||||
getService(Components.interfaces.nsIRDFService);
|
||||
|
||||
var dsource = rdfService.GetDataSourceBlocking(url);
|
||||
|
||||
var subject = rdfService.GetResource("http://www.technikum-wien.at/student/" + prestudent_id);
|
||||
|
||||
var predicateNS = "http://www.technikum-wien.at/student/rdf";
|
||||
|
||||
punkte = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#punkte" ));
|
||||
var person_id = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#person_id" ));
|
||||
AufnahmeTermineStudiengang = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#studiengang_kz" ));
|
||||
reihungstestangetreten = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#reihungstestangetreten" ));
|
||||
var aufnahmegruppe_kurzbz = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#aufnahmegruppe_kurzbz" ));
|
||||
document.getElementById('aufnahmetermine-textbox-gesamtpunkte').value=punkte;
|
||||
if(reihungstestangetreten=='true')
|
||||
document.getElementById('aufnahmetermine-checkbox-reihungstestangetreten').checked=true;
|
||||
else
|
||||
document.getElementById('aufnahmetermine-checkbox-reihungstestangetreten').checked=false;
|
||||
document.getElementById('aufnahmetermine-menulist-aufnahmegruppe').value = aufnahmegruppe_kurzbz;
|
||||
AufnahmeTermineStudienplanID = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#studienplan_id" ));
|
||||
|
||||
// ReihungstestDropDown laden
|
||||
var reihungstestmenulist = document.getElementById('aufnahmetermine-menulist-reihungstest');
|
||||
var url="<?php echo APP_ROOT ?>rdf/reihungstest.rdf.php?optional=true&prestudent_id="+AufnahmeTerminePrestudentID;
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasources = reihungstestmenulist.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
reihungstestmenulist.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
//Refresh damit die entfernten DS auch wirklich entfernt werden
|
||||
reihungstestmenulist.builder.rebuild();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
var myDatasource = rdfService.GetDataSourceBlocking(url);
|
||||
reihungstestmenulist.database.AddDataSource(myDatasource);
|
||||
reihungstestmenulist.builder.rebuild();
|
||||
|
||||
// Studienplan DropDown laden
|
||||
var studienplanmenulist = document.getElementById('aufnahmetermine-menulist-studienplan');
|
||||
var url="<?php echo APP_ROOT ?>rdf/studienplan.rdf.php?person_id="+person_id;
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasources = studienplanmenulist.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
studienplanmenulist.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
//Refresh damit die entfernten DS auch wirklich entfernt werden
|
||||
studienplanmenulist.builder.rebuild();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
var myDatasource = rdfService.GetDataSourceBlocking(url);
|
||||
studienplanmenulist.database.AddDataSource(myDatasource);
|
||||
studienplanmenulist.builder.rebuild();
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt den Tree mit den Terminen
|
||||
*/
|
||||
function AufnahmeTermineLoadTree()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
//Termine laden
|
||||
url = "<?php echo APP_ROOT; ?>rdf/aufnahmetermine.rdf.php?prestudent_id="+AufnahmeTerminePrestudentID+"&ts="+gettimestamp();
|
||||
|
||||
var treeAufnahmeTermine=document.getElementById('aufnahmetermine-tree');
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasources = treeAufnahmeTermine.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
treeAufnahmeTermine.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
treeAufnahmeTermine.builder.rebuild();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
var AufnahmeTerminTreeDatasource = rdfService.GetDataSource(url);
|
||||
AufnahmeTerminTreeDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
treeAufnahmeTermine.database.AddDataSource(AufnahmeTerminTreeDatasource);
|
||||
}
|
||||
|
||||
/**
|
||||
* Speichert die Gesamtpunkte
|
||||
*/
|
||||
function AufnahmeTermineSaveGesamtpunkte()
|
||||
{
|
||||
var punkte = document.getElementById('aufnahmetermine-textbox-gesamtpunkte').value;
|
||||
var aufnahmegruppe_kurzbz = document.getElementById('aufnahmetermine-menulist-aufnahmegruppe').value;
|
||||
var reihungstestangetreten = document.getElementById('aufnahmetermine-checkbox-reihungstestangetreten').checked;
|
||||
var url = '<?php echo APP_ROOT ?>content/student/studentDBDML.php';
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
req.add('type', 'AufnahmeTermineSaveGesamtpunkte');
|
||||
|
||||
req.add('prestudent_id', AufnahmeTerminePrestudentID);
|
||||
req.add('punkte', punkte);
|
||||
req.add('reihungstestangetreten',reihungstestangetreten);
|
||||
req.add('aufnahmegruppe_kurzbz',aufnahmegruppe_kurzbz);
|
||||
|
||||
var response = req.executePOST();
|
||||
var val = new ParseReturnValue(response);
|
||||
|
||||
if (!val.dbdml_return)
|
||||
{
|
||||
if(val.dbdml_errormsg=='')
|
||||
alert(response)
|
||||
else
|
||||
alert(val.dbdml_errormsg)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function AufnahmeTermineCalculateTotal()
|
||||
{
|
||||
var url = '<?php echo APP_ROOT ?>content/student/studentDBDML.php';
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
req.add('type', 'AufnahmeTermineBerechneGesamtpunkte');
|
||||
req.add('prestudent_id', AufnahmeTerminePrestudentID);
|
||||
|
||||
var response = req.executePOST();
|
||||
var val = new ParseReturnValue(response);
|
||||
|
||||
if (!val.dbdml_return)
|
||||
{
|
||||
if(val.dbdml_errormsg=='')
|
||||
alert(response)
|
||||
else
|
||||
alert(val.dbdml_errormsg)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById('aufnahmetermine-textbox-gesamtpunkte').value=val.dbdml_data;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt die Details bei Auswahl eines Eintrages aus dem Tree
|
||||
*/
|
||||
function AufnahmeTermineAuswahl()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var tree = document.getElementById('aufnahmetermine-tree');
|
||||
|
||||
if (tree.currentIndex==-1) return;
|
||||
|
||||
AufnahmeTermineDisableFields(false);
|
||||
AufnahmeTermineReihungstestDropDownRefresh(true);
|
||||
|
||||
//Ausgewaehlten Eintrag holen
|
||||
var rt_person_id = getTreeCellText(tree, 'aufnahmetermine-tree-rt_person_id', tree.currentIndex);
|
||||
|
||||
//Daten holen
|
||||
var url = '<?php echo APP_ROOT ?>rdf/aufnahmetermine.rdf.php?rt_person_id='+rt_person_id+'&'+gettimestamp();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].
|
||||
getService(Components.interfaces.nsIRDFService);
|
||||
|
||||
var dsource = rdfService.GetDataSourceBlocking(url);
|
||||
|
||||
var subject = rdfService.GetResource("http://www.technikum-wien.at/aufnahmetermine/"+rt_person_id);
|
||||
|
||||
var predicateNS = "http://www.technikum-wien.at/aufnahmetermine/rdf";
|
||||
|
||||
//Daten holen
|
||||
|
||||
var person_id = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#person_id" ));
|
||||
var rt_id = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#rt_id" ));
|
||||
var anmeldedatum = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#anmeldedatum" ));
|
||||
var teilgenommen = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#teilgenommen" ));
|
||||
var punkte = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#punkte" ));
|
||||
var studienplan_id = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#studienplan_id" ));
|
||||
var studienplan_studiengang_kz = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#studienplan_studiengang_kz" ));
|
||||
var endpunkte_inkl_gebiete = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#endpunkte_inkl_gebiete" ));
|
||||
var endpunkte_exkl_gebiete = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#endpunkte_exkl_gebiete" ));
|
||||
var typ = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#typ" ));
|
||||
|
||||
document.getElementById('aufnahmetermine-textbox-rt_person_id').value=rt_person_id;
|
||||
document.getElementById('aufnahmetermine-textbox-person_id').value=person_id;
|
||||
document.getElementById('aufnahmetermine-textbox-studienplan_studiengang_kz').value=studienplan_studiengang_kz;
|
||||
document.getElementById('aufnahmetermine-checkbox-neu').checked=false;
|
||||
document.getElementById('aufnahmetermine-textbox-anmeldungreihungstest').value=anmeldedatum;
|
||||
MenulistSelectItemOnValue('aufnahmetermine-menulist-reihungstest', rt_id);
|
||||
|
||||
if(teilgenommen=='Ja')
|
||||
document.getElementById('aufnahmetermine-checkbox-teilgenommen').checked=true;
|
||||
else
|
||||
document.getElementById('aufnahmetermine-checkbox-teilgenommen').checked=false;
|
||||
document.getElementById('aufnahmetermine-textbox-punkte').value=punkte;
|
||||
document.getElementById('aufnahmetermine-menulist-studienplan').value=studienplan_id;
|
||||
document.getElementById('aufnahmetermine-textbox-endpunkte-inkl-gebiete').value = endpunkte_inkl_gebiete;
|
||||
document.getElementById('aufnahmetermine-textbox-endpunkte-exkl-gebiete').value = endpunkte_exkl_gebiete;
|
||||
|
||||
// Sichtbarkeit der RT-Vergleichsergebnispunkte (ohne Quereinsteiger)
|
||||
var basisgebiet_punkte_anzeigen = <?php echo (defined('FAS_REIHUNGSTEST_PUNKTE_BASISGEBIET_ANZEIGEN') && FAS_REIHUNGSTEST_PUNKTE_BASISGEBIET_ANZEIGEN) ? 'true' : 'false' ?>;
|
||||
|
||||
// * Generell Anzeige nur wenn über config-Datei gesetzt ist
|
||||
if (basisgebiet_punkte_anzeigen)
|
||||
{
|
||||
// * für Bachelor-Studiengänge anzeigen
|
||||
if (typ == 'b')
|
||||
{
|
||||
document.getElementById('aufnahmetermine-groupbox-vergleich-endpunkte').hidden = false;
|
||||
}
|
||||
// * für Master-Studiengänge verstecken
|
||||
else if (typ == 'm')
|
||||
{
|
||||
document.getElementById('aufnahmetermine-groupbox-vergleich-endpunkte').hidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function AufnahmeTermineNeu()
|
||||
{
|
||||
AufnahmeTermineDisableFields(false);
|
||||
AufnahmeTermineResetFields();
|
||||
AufnahmeTermineReihungstestDropDownRefresh(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Loescht einen Aufnahmetermin
|
||||
*/
|
||||
function AufnahmeTermineDelete()
|
||||
{
|
||||
var rt_person_id = document.getElementById('aufnahmetermine-textbox-rt_person_id').value;
|
||||
|
||||
if(!confirm("Wollen Sie diesen Eintrag wirklich löschen?"))
|
||||
return;
|
||||
|
||||
var url = '<?php echo APP_ROOT ?>content/student/studentDBDML.php';
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
req.add('type', 'AufnahmeTermineDelete');
|
||||
req.add('rt_person_id', rt_person_id);
|
||||
|
||||
var response = req.executePOST();
|
||||
var val = new ParseReturnValue(response);
|
||||
|
||||
if (!val.dbdml_return)
|
||||
{
|
||||
if(val.dbdml_errormsg=='')
|
||||
alert(response)
|
||||
else
|
||||
alert(val.dbdml_errormsg)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
AufnahmeTermineLoadTree();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function AufnahemTermineReihungstestPunkteTransmit()
|
||||
{
|
||||
var reihungstest_id = document.getElementById('aufnahmetermine-menulist-reihungstest').value;
|
||||
var person_id = document.getElementById('aufnahmetermine-textbox-person_id').value;
|
||||
var studienplan_studiengang_kz = document.getElementById('aufnahmetermine-textbox-studienplan_studiengang_kz').value;
|
||||
|
||||
var url = '<?php echo APP_ROOT ?>content/student/studentDBDML.php';
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
req.add('type', 'getReihungstestPunkte');
|
||||
|
||||
req.add('person_id', person_id);
|
||||
req.add('studienplan_studiengang_kz', studienplan_studiengang_kz);
|
||||
req.add('reihungstest_id', reihungstest_id);
|
||||
var response = req.executePOST();
|
||||
|
||||
var val = new ParseReturnValue(response)
|
||||
|
||||
if (!val.dbdml_return)
|
||||
{
|
||||
if(val.dbdml_errormsg=='')
|
||||
alert(response)
|
||||
else
|
||||
alert(val.dbdml_errormsg)
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById('aufnahmetermine-textbox-punkte').value = val.dbdml_data;
|
||||
}
|
||||
}
|
||||
|
||||
function setEndpunkteAsPunkte(id)
|
||||
{
|
||||
var punkte = document.getElementById(id).value;
|
||||
document.getElementById('aufnahmetermine-textbox-punkte').value = punkte;
|
||||
}
|
||||
|
||||
/**
|
||||
* Speichert einen AufnahmeTermin
|
||||
*/
|
||||
function AufnahmeTermineSpeichern()
|
||||
{
|
||||
var rt_person_id = document.getElementById('aufnahmetermine-textbox-rt_person_id').value;
|
||||
var rt_id = document.getElementById('aufnahmetermine-menulist-reihungstest').value;
|
||||
var person_id = document.getElementById('aufnahmetermine-textbox-person_id').value;
|
||||
var neu = document.getElementById('aufnahmetermine-checkbox-neu').checked;
|
||||
var anmeldedatum = document.getElementById('aufnahmetermine-textbox-anmeldungreihungstest').iso;
|
||||
var rt_id_new = document.getElementById('aufnahmetermine-menulist-reihungstest').value;
|
||||
var teilgenommen = document.getElementById('aufnahmetermine-checkbox-teilgenommen').checked;
|
||||
var punkte = document.getElementById('aufnahmetermine-textbox-punkte').value;
|
||||
var studienplan_id = document.getElementById('aufnahmetermine-menulist-studienplan').value;
|
||||
|
||||
var url = '<?php echo APP_ROOT ?>content/student/studentDBDML.php';
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
req.add('type', 'AufnahmeTermineSave');
|
||||
|
||||
req.add('rt_id', rt_id);
|
||||
req.add('rt_person_id', rt_person_id);
|
||||
req.add('person_id', person_id);
|
||||
req.add('prestudent_id', AufnahmeTerminePrestudentID);
|
||||
req.add('neu', neu);
|
||||
req.add('anmeldedatum', anmeldedatum);
|
||||
req.add('teilgenommen', teilgenommen);
|
||||
req.add('punkte', punkte);
|
||||
req.add('studienplan_id', studienplan_id);
|
||||
|
||||
var response = req.executePOST();
|
||||
var val = new ParseReturnValue(response);
|
||||
|
||||
if (!val.dbdml_return)
|
||||
{
|
||||
if(val.dbdml_errormsg=='')
|
||||
alert(response)
|
||||
else
|
||||
alert(val.dbdml_errormsg)
|
||||
|
||||
document.getElementById('aufnahmetermine-textbox-rt_person_id').value=val.dbdml_data;
|
||||
document.getElementById('aufnahmetermine-checkbox-neu').checked=false;
|
||||
AufnahmeTermineLoadTree();
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById('aufnahmetermine-textbox-rt_person_id').value=val.dbdml_data;
|
||||
document.getElementById('aufnahmetermine-checkbox-neu').checked=false;
|
||||
AufnahmeTermineLoadTree();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Aktiviert oder Deaktiviert die Eingabefelder
|
||||
* @param val boolean true | false
|
||||
*/
|
||||
function AufnahmeTermineDisableFields(val)
|
||||
{
|
||||
document.getElementById('aufnahmetermine-button-speichern').disabled=val;
|
||||
document.getElementById('aufnahmetermine-textbox-punkte').disabled=val;
|
||||
document.getElementById('aufnahmetermine-checkbox-teilgenommen').disabled=val;
|
||||
document.getElementById('aufnahmetermine-textbox-anmeldungreihungstest').disabled=val;
|
||||
document.getElementById('aufnahmetermine-menulist-reihungstest').disabled=val;
|
||||
document.getElementById('aufnahmetermine-button-anmeldungreihungstest-heute').disabled=val;
|
||||
document.getElementById('aufnahmetermine-menulist-studienplan').disabled=val;
|
||||
}
|
||||
|
||||
/**
|
||||
* Leert die Eingabefelder
|
||||
*/
|
||||
function AufnahmeTermineResetFields()
|
||||
{
|
||||
document.getElementById('aufnahmetermine-textbox-punkte').value='';
|
||||
document.getElementById('aufnahmetermine-checkbox-teilgenommen').checked=false;
|
||||
document.getElementById('aufnahmetermine-textbox-anmeldungreihungstest').value='';
|
||||
document.getElementById('aufnahmetermine-menulist-reihungstest').value='';
|
||||
document.getElementById('aufnahmetermine-textbox-person_id').value='';
|
||||
document.getElementById('aufnahmetermine-textbox-studienplan_studiengang_kz').value='';
|
||||
document.getElementById('aufnahmetermine-checkbox-neu').checked=true;
|
||||
document.getElementById('aufnahmetermine-textbox-rt_person_id').value='';
|
||||
document.getElementById('aufnahmetermine-menulist-studienplan').value=AufnahmeTermineStudienplanID;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Setzt das aktuelle Datum als Anmeldedatum
|
||||
*/
|
||||
function AufnahmeTermineAnmeldungreihungstestHeute()
|
||||
{
|
||||
var now = new Date();
|
||||
var jahr = now.getFullYear();
|
||||
|
||||
monat = now.getMonth()+1;
|
||||
if(monat<10) monat='0'+monat;
|
||||
tag = now.getDate();
|
||||
if(tag<10) tag='0'+tag;
|
||||
|
||||
document.getElementById('aufnahmetermine-textbox-anmeldungreihungstest').value=tag+'.'+monat+'.'+jahr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresht das DropDown mit den Reihungstestterminen
|
||||
*/
|
||||
function AufnahmeTermineReihungstestDropDownRefresh(prestudent)
|
||||
{
|
||||
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var menulist = document.getElementById('aufnahmetermine-menulist-reihungstest');
|
||||
if(typeof(prestudent)=='undefined')
|
||||
var url="<?php echo APP_ROOT ?>rdf/reihungstest.rdf.php?include_id=&studiengang_kz="+AufnahmeTermineStudiengang+"&"+gettimestamp();
|
||||
else
|
||||
var url="<?php echo APP_ROOT ?>rdf/reihungstest.rdf.php?optional=true&prestudent_id="+AufnahmeTerminePrestudentID+"&"+gettimestamp();
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasources = menulist.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
menulist.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
//Refresh damit die entfernten DS auch wirklich entfernt werden
|
||||
menulist.builder.rebuild();
|
||||
btn = document.getElementById('aufnahmetermine-button-reihungstest-refresh');
|
||||
btn.setAttribute('image','../../skin/images/spinner.gif');
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
var myDatasource = rdfService.GetDataSourceBlocking(url);
|
||||
menulist.database.AddDataSource(myDatasource);
|
||||
menulist.builder.rebuild();
|
||||
btn.setAttribute('image','../../skin/images/refresh.png');
|
||||
}
|
||||
|
||||
function AufnahmeTermineReihungstestEdit()
|
||||
{
|
||||
var rt_id = document.getElementById('aufnahmetermine-menulist-reihungstest').value;
|
||||
var url="<?php echo APP_ROOT ?>vilesci/stammdaten/reihungstestverwaltung.php?reihungstest_id="+rt_id;
|
||||
window.open(url);
|
||||
}
|
||||
@@ -1,334 +1,348 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 fhcomplete.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>
|
||||
*/
|
||||
header("Cache-Control: no-cache");
|
||||
header("Cache-Control: post-check=0, pre-check=0",false);
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Pragma: no-cache");
|
||||
header("Content-type: application/vnd.mozilla.xul+xml");
|
||||
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
require_once('../../config/global.config.inc.php');
|
||||
require_once('../../include/functions.inc.php');
|
||||
require_once('../../include/variable.class.php');
|
||||
require_once('../../include/prestudent.class.php');
|
||||
require_once('../../include/studiengang.class.php');
|
||||
|
||||
$user=get_uid();
|
||||
$variable = new variable();
|
||||
if(!$variable->loadVariables($user))
|
||||
{
|
||||
die('Fehler beim Laden der Variablen:'.$variable->errormsg);
|
||||
}
|
||||
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
|
||||
|
||||
echo '<?xml-stylesheet href="'.APP_ROOT.'skin/tempus.css" type="text/css"?>';
|
||||
echo '<?xml-stylesheet href="'.APP_ROOT.'content/bindings.css" type="text/css"?>';
|
||||
echo '<?xml-stylesheet href="'.APP_ROOT.'content/datepicker/datepicker.css" type="text/css"?>';
|
||||
|
||||
$prestudent_id = filter_input(INPUT_GET,'prestudent_id');
|
||||
|
||||
echo '
|
||||
<!DOCTYPE overlay [';
|
||||
require('../../locale/'.$variable->variable->locale.'/fas.dtd');
|
||||
echo ']>
|
||||
';
|
||||
?>
|
||||
|
||||
<window id="aufnahmetermine-window" title="aufnahmetermine"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="loadAufnahmeTermine(<?php echo "'".$prestudent_id."'"; ?>);"
|
||||
>
|
||||
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/student/aufnahmetermine.js.php" />
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/functions.js.php" />
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/phpRequest.js.php" />
|
||||
|
||||
<vbox flex="1">
|
||||
<popupset>
|
||||
<menupopup id="aufnahmetermine-tree-popup">
|
||||
<menuitem label="Entfernen" oncommand="aufnahmetermineDelete();" id="aufnahmetermine-tree-popup-delete" hidden="false"/>
|
||||
</menupopup>
|
||||
</popupset>
|
||||
<groupbox>
|
||||
<caption label="Studiengang" />
|
||||
<hbox style="padding-top: 10px">
|
||||
<?php
|
||||
if(!defined('FAS_REIHUNGSTEST_AUFNAHMEGRUPPEN') || FAS_REIHUNGSTEST_AUFNAHMEGRUPPEN==true)
|
||||
$aufnahmegruppe_visibility='';
|
||||
else
|
||||
$aufnahmegruppe_visibility='hidden="true"';
|
||||
|
||||
echo '<hbox '.$aufnahmegruppe_visibility.'>';
|
||||
?>
|
||||
<label value="Gruppe" control="aufnahmetermine-menulist-aufnahmegruppe"/>
|
||||
<menulist id="aufnahmetermine-menulist-aufnahmegruppe" disabled="false"
|
||||
datasources="rdf:null"
|
||||
ref="http://www.technikum-wien.at/gruppen/liste">
|
||||
<template>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/gruppen/rdf#gruppe_kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/gruppen/rdf#bezeichnung"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</template>
|
||||
</menulist>
|
||||
</hbox>
|
||||
<label value="&aufnahmetermine-reihungstest.absolviert;" control="aufnahmetermine-checkbox-reihungstestangetreten"/>
|
||||
<checkbox id="aufnahmetermine-checkbox-reihungstestangetreten" checked="true"/>
|
||||
<label value="Gesamtpunkte" control="aufnahmetermine-textbox-gesamtpunkte"/>
|
||||
<textbox id="aufnahmetermine-textbox-gesamtpunkte" disabled="true" maxlength="8" size="8"/>
|
||||
<button id="aufnahmetermine-button-savegesamtpunkte" disabled="true" label="Speichern" oncommand="AufnahmeTermineSaveGesamtpunkte();"/>
|
||||
<button id="aufnahmetermine-button-calculatetotal" disabled="true" label="Gesamtpunkte berechnen" oncommand="AufnahmeTermineCalculateTotal();"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
<groupbox>
|
||||
<caption label="Allgemein" />
|
||||
<hbox flex="1">
|
||||
<grid id="aufnahmetermine-grid-detail" style="overflow:auto;margin:4px;" flex="1">
|
||||
<columns >
|
||||
<column flex="1"/>
|
||||
<column flex="1"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<tree id="aufnahmetermine-tree" seltype="single" hidecolumnpicker="false" flex="1"
|
||||
datasources="rdf:null" ref="http://www.technikum-wien.at/aufnahmetermine"
|
||||
style="margin-left:10px;margin-right:10px;margin-bottom:5px;margin-top: 10px;" height="100px" enableColumnDrag="true"
|
||||
onselect="AufnahmeTermineAuswahl()"
|
||||
context="aufnahmetermine-tree-popup"
|
||||
flags="dont-build-content"
|
||||
>
|
||||
|
||||
<treecols>
|
||||
<treecol id="aufnahmetermine-tree-datum" label="Datum" flex="3" hidden="false" primary="true"
|
||||
class="sortDirectionIndicator"
|
||||
sortActive="true"
|
||||
sortDirection="ascending"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#datum_iso"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-stufe" label="Stufe" flex="2" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sortActive="true"
|
||||
sortDirection="ascending"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#stufe"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-studiensemester" label="Studiensemester" flex="2" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#studiensemester"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-anmerkung" label="Anmerkung" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#anmerkung"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-anmeldedatum" label="Anmeldedatum" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#anmeldedatum_iso"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-ort" label="Ort" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#ort" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-punkte" label="Punkte" flex="2" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#punkte" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-teilgenommen" label="Teilgen." flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#teilgenommen" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-ort_kurzbz" label="Ort" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#ort_kurzbz" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-rt_id" label="ReihungstestID" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#rt_id" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-person_id" label="PersonID" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#person_id" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-rt_person_id" label="RTPersonID" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#rt_person_id" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-studienplan_bezeichnung" label="Studienplan" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#studienplan_bezeichnung" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-studienplan_id" label="StudienplanID" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#studienplan_id" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-studienplan_studiengang" label="Stg" flex="2" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#studienplan_studiengang" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-datum_iso" label="DatumISO" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#datum_iso"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-anmeldedatum_iso" label="AnmeldedatumISO" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#anmeldedatum_iso"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
</treecols>
|
||||
|
||||
<template>
|
||||
<treechildren flex="1" >
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow properties="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#properties">
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#datum"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#stufe"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#studiensemester"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#anmerkung"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#anmeldedatum"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#ort_kurzbz"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#punkte"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#teilgenommen"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#ort_kurzbz"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#rt_id"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#person_id"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#rt_person_id"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#studienplan_bezeichnung"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#studienplan_id"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#studienplan_studiengang"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#datum_iso"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#anmeldedatum_iso"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</template>
|
||||
</tree>
|
||||
<vbox>
|
||||
<hbox>
|
||||
<button id="aufnahmetermine-button-neu" label="Neu" oncommand="AufnahmeTermineNeu();"/>
|
||||
<button id="aufnahmetermine-button-loeschen" label="Loeschen" oncommand="AufnahmeTermineDelete();"/>
|
||||
</hbox>
|
||||
<vbox hidden="true">
|
||||
<label value="person_id" control="aufnahmetermine-textbox-person_id"/>
|
||||
<textbox id="aufnahmetermine-textbox-person_id" disabled="true"/>
|
||||
<label value="Neu" control="aufnahmetermine-checkbox-neu"/>
|
||||
<checkbox id="aufnahmetermine-checkbox-neu" disabled="true" checked="false"/>
|
||||
<label value="rt_person_id" control="aufnahmetermine-textbox-rt_person_id"/>
|
||||
<textbox id="aufnahmetermine-textbox-rt_person_id" disabled="true"/>
|
||||
</vbox>
|
||||
<groupbox id="aufnahmetermine-groupbox" flex="1">
|
||||
<caption label="Details"/>
|
||||
<grid id="aufnahmetermine-grid-detail" style="overflow:auto;margin:4px;" flex="1">
|
||||
<columns >
|
||||
<column flex="1"/>
|
||||
<column flex="5"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="Reihungstest / Interview" control="aufnahmetermine-menulist-reihungstest"/>
|
||||
<hbox>
|
||||
<menulist id="aufnahmetermine-menulist-reihungstest" disabled="true"
|
||||
datasources="rdf:null" flex="1" style="width:200px"
|
||||
ref="http://www.technikum-wien.at/reihungstest/alle">
|
||||
<template>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/reihungstest/rdf#reihungstest_id"
|
||||
label="rdf:http://www.technikum-wien.at/reihungstest/rdf#bezeichnung"
|
||||
tooltiptext="rdf:http://www.technikum-wien.at/reihungstest/rdf#bezeichnung"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</template>
|
||||
</menulist>
|
||||
<toolbarbutton id="aufnahmetermine-button-reihungstest-refresh" image="../../skin/images/refresh.png" tooltiptext="Alle zukünftigen Reihungstests des Studiengangs laden" onclick="AufnahmeTermineReihungstestDropDownRefresh()"/>
|
||||
<toolbarbutton id="aufnahmetermine-button-reihungstest-open" image="../../skin/images/edit.png" tooltiptext="Zur Reihungstestverwaltung" onclick="AufnahmeTermineReihungstestEdit()"/>
|
||||
<spacer flex="1"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<label value="&tab-prestudent-aufnahme.anmeldung;" control="aufnahmetermine-textbox-anmeldungreihungstest"/>
|
||||
<hbox>
|
||||
<box class="Datum" id="aufnahmetermine-textbox-anmeldungreihungstest" disabled="true"/>
|
||||
<button id="aufnahmetermine-button-anmeldungreihungstest-heute" label="Heute" oncommand="AufnahmeTermineAnmeldungreihungstestHeute()" disabled="true" style="margin:0px;"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<label value="&tab-prestudent-aufnahme.absolviert;" control="aufnahmetermine-checkbox-teilgenommen"/>
|
||||
<checkbox id="aufnahmetermine-checkbox-teilgenommen" checked="true" disabled="true"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Reihungstest Studienplan" control="aufnahmetermine-menulist-studienplan"/>
|
||||
<hbox>
|
||||
<menulist id="aufnahmetermine-menulist-studienplan" disabled="true"
|
||||
datasources="rdf:null" flex="1"
|
||||
ref="http://www.technikum-wien.at/studienplan">
|
||||
<template>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/studienplan/rdf#studienplan_id"
|
||||
label="rdf:http://www.technikum-wien.at/studienplan/rdf#bezeichnung"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</template>
|
||||
</menulist>
|
||||
<spacer flex="1"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Punkte" control="aufnahmetermine-textbox-punkte" />
|
||||
<hbox>
|
||||
<textbox id="aufnahmetermine-textbox-punkte" disabled="true" maxlength="8" size="6"/>
|
||||
<toolbarbutton id="aufnahmetermine-button-reihungstest-punktesync" image="../../skin/images/transmit.png" tooltiptext="Reihungstest Ergebnis holen" onclick="AufnahemTermineReihungstestPunkteTransmit()"/>
|
||||
<spacer flex="1" />
|
||||
</hbox>
|
||||
</row>
|
||||
<groupbox id="aufnahmetermine-groupbox-vergleich-endpunkte" hidden="true">
|
||||
<caption label="Vergleichswerte Reihungstestpunkte (Basisgebiete)"></caption>
|
||||
<vbox style="padding: 10px;">
|
||||
<spacer resize='none' height='10' flex="1"/>
|
||||
<row>
|
||||
<label value="Reihungstestpunkte (inkl. Physik)" control="aufnahmetermine-textbox-endpunkte-inkl-gebiete" style="margin-right: 7px;"/>
|
||||
<hbox>
|
||||
<textbox id="aufnahmetermine-textbox-endpunkte-inkl-gebiete" readonly="true" maxlength="8" size="6" flex="1"/>
|
||||
<toolbarbutton image="../../skin/images/up.png" tooltiptext="Als Punkte setzen" onclick="setEndpunkteAsPunkte('aufnahmetermine-textbox-endpunkte-inkl-gebiete')"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Reihungstestpunkte (exkl. Physik)" control="aufnahmetermine-textbox-endpunkte-exkl-gebiete" />
|
||||
<hbox>
|
||||
<textbox id="aufnahmetermine-textbox-endpunkte-exkl-gebiete" readonly="true" maxlength="8" size="6" flex="1"/>
|
||||
<toolbarbutton image="../../skin/images/up.png" tooltiptext="Als Punkte setzen" onclick="setEndpunkteAsPunkte('aufnahmetermine-textbox-endpunkte-exkl-gebiete')"/>
|
||||
</hbox>
|
||||
</row>
|
||||
</vbox>
|
||||
</groupbox>
|
||||
</rows>
|
||||
</grid>
|
||||
<hbox>
|
||||
<button id="aufnahmetermine-button-speichern" oncommand="AufnahmeTermineSpeichern()" label="Speichern" disabled="true"/>
|
||||
<spacer flex="1" />
|
||||
</hbox>
|
||||
</groupbox>
|
||||
</vbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
</hbox>
|
||||
</groupbox>
|
||||
<spacer flex="1" />
|
||||
</vbox>
|
||||
</window>
|
||||
<?php
|
||||
/* Copyright (C) 2015 fhcomplete.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>
|
||||
*/
|
||||
header("Cache-Control: no-cache");
|
||||
header("Cache-Control: post-check=0, pre-check=0",false);
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Pragma: no-cache");
|
||||
header("Content-type: application/vnd.mozilla.xul+xml");
|
||||
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
require_once('../../config/global.config.inc.php');
|
||||
require_once('../../include/functions.inc.php');
|
||||
require_once('../../include/variable.class.php');
|
||||
require_once('../../include/prestudent.class.php');
|
||||
require_once('../../include/studiengang.class.php');
|
||||
|
||||
$user=get_uid();
|
||||
$variable = new variable();
|
||||
if(!$variable->loadVariables($user))
|
||||
{
|
||||
die('Fehler beim Laden der Variablen:'.$variable->errormsg);
|
||||
}
|
||||
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
|
||||
|
||||
echo '<?xml-stylesheet href="'.APP_ROOT.'skin/tempus.css" type="text/css"?>';
|
||||
echo '<?xml-stylesheet href="'.APP_ROOT.'content/bindings.css" type="text/css"?>';
|
||||
echo '<?xml-stylesheet href="'.APP_ROOT.'content/datepicker/datepicker.css" type="text/css"?>';
|
||||
|
||||
$prestudent_id = filter_input(INPUT_GET,'prestudent_id');
|
||||
|
||||
if(!defined('FAS_REIHUNGSTEST_PUNKTEUEBERNAHME') || FAS_REIHUNGSTEST_PUNKTEUEBERNAHME == true)
|
||||
$rt_uebernahme = true;
|
||||
else
|
||||
$rt_uebernahme = false;
|
||||
echo '
|
||||
<!DOCTYPE overlay [';
|
||||
require('../../locale/'.$variable->variable->locale.'/fas.dtd');
|
||||
echo ']>
|
||||
';
|
||||
?>
|
||||
|
||||
<window id="aufnahmetermine-window" title="aufnahmetermine"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="loadAufnahmeTermine(<?php echo "'".$prestudent_id."'"; ?>);"
|
||||
>
|
||||
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/student/aufnahmetermine.js.php" />
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/functions.js.php" />
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/phpRequest.js.php" />
|
||||
|
||||
<vbox flex="1">
|
||||
<popupset>
|
||||
<menupopup id="aufnahmetermine-tree-popup">
|
||||
<menuitem label="Entfernen" oncommand="aufnahmetermineDelete();" id="aufnahmetermine-tree-popup-delete" hidden="false"/>
|
||||
</menupopup>
|
||||
</popupset>
|
||||
<groupbox>
|
||||
<caption label="Studiengang" />
|
||||
<hbox style="padding-top: 10px">
|
||||
<?php
|
||||
if(!defined('FAS_REIHUNGSTEST_AUFNAHMEGRUPPEN') || FAS_REIHUNGSTEST_AUFNAHMEGRUPPEN==true)
|
||||
$aufnahmegruppe_visibility='';
|
||||
else
|
||||
$aufnahmegruppe_visibility='hidden="true"';
|
||||
|
||||
echo '<hbox '.$aufnahmegruppe_visibility.'>';
|
||||
?>
|
||||
<label value="Gruppe" control="aufnahmetermine-menulist-aufnahmegruppe"/>
|
||||
<menulist id="aufnahmetermine-menulist-aufnahmegruppe" disabled="false"
|
||||
datasources="rdf:null"
|
||||
ref="http://www.technikum-wien.at/gruppen/liste">
|
||||
<template>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/gruppen/rdf#gruppe_kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/gruppen/rdf#bezeichnung"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</template>
|
||||
</menulist>
|
||||
</hbox>
|
||||
<label value="&aufnahmetermine-reihungstest.absolviert;" control="aufnahmetermine-checkbox-reihungstestangetreten"/>
|
||||
<checkbox id="aufnahmetermine-checkbox-reihungstestangetreten" checked="true"/>
|
||||
<label value="Gesamtpunkte" control="aufnahmetermine-textbox-gesamtpunkte"/>
|
||||
<textbox id="aufnahmetermine-textbox-gesamtpunkte" disabled="true" maxlength="8" size="8"/>
|
||||
<button id="aufnahmetermine-button-savegesamtpunkte" disabled="true" label="Speichern" oncommand="AufnahmeTermineSaveGesamtpunkte();"/>
|
||||
<button id="aufnahmetermine-button-calculatetotal" disabled="true" label="Gesamtpunkte berechnen" oncommand="AufnahmeTermineCalculateTotal();"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
<groupbox>
|
||||
<caption label="Allgemein" />
|
||||
<hbox flex="1">
|
||||
<grid id="aufnahmetermine-grid-detail" style="overflow:auto;margin:4px;" flex="1">
|
||||
<columns >
|
||||
<column flex="1"/>
|
||||
<column flex="1"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<tree id="aufnahmetermine-tree" seltype="single" hidecolumnpicker="false" flex="1"
|
||||
datasources="rdf:null" ref="http://www.technikum-wien.at/aufnahmetermine"
|
||||
style="margin-left:10px;margin-right:10px;margin-bottom:5px;margin-top: 10px;" height="100px" enableColumnDrag="true"
|
||||
onselect="AufnahmeTermineAuswahl()"
|
||||
context="aufnahmetermine-tree-popup"
|
||||
flags="dont-build-content"
|
||||
>
|
||||
|
||||
<treecols>
|
||||
<treecol id="aufnahmetermine-tree-datum" label="Datum" flex="3" hidden="false" primary="true"
|
||||
class="sortDirectionIndicator"
|
||||
sortActive="true"
|
||||
sortDirection="ascending"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#datum_iso"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-stufe" label="Stufe" flex="2" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sortActive="true"
|
||||
sortDirection="ascending"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#stufe"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-studiensemester" label="Studiensemester" flex="2" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#studiensemester"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-anmerkung" label="Anmerkung" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#anmerkung"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-anmeldedatum" label="Anmeldedatum" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#anmeldedatum_iso"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-ort" label="Ort" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#ort" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-punkte" label="Punkte" flex="2" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#punkte" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-teilgenommen" label="Teilgen." flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#teilgenommen" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-ort_kurzbz" label="Ort" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#ort_kurzbz" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-rt_id" label="ReihungstestID" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#rt_id" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-person_id" label="PersonID" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#person_id" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-rt_person_id" label="RTPersonID" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#rt_person_id" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-studienplan_bezeichnung" label="Studienplan" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#studienplan_bezeichnung" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-studienplan_id" label="StudienplanID" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#studienplan_id" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-studienplan_studiengang" label="Stg" flex="2" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#studienplan_studiengang" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-datum_iso" label="DatumISO" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#datum_iso"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="aufnahmetermine-tree-anmeldedatum_iso" label="AnmeldedatumISO" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#anmeldedatum_iso"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
</treecols>
|
||||
|
||||
<template>
|
||||
<treechildren flex="1" >
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow properties="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#properties">
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#datum"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#stufe"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#studiensemester"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#anmerkung"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#anmeldedatum"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#ort_kurzbz"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#punkte"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#teilgenommen"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#ort_kurzbz"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#rt_id"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#person_id"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#rt_person_id"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#studienplan_bezeichnung"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#studienplan_id"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#studienplan_studiengang"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#datum_iso"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/aufnahmetermine/rdf#anmeldedatum_iso"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</template>
|
||||
</tree>
|
||||
<vbox>
|
||||
<hbox>
|
||||
<button id="aufnahmetermine-button-neu" label="Neu" oncommand="AufnahmeTermineNeu();"/>
|
||||
<button id="aufnahmetermine-button-loeschen" label="Loeschen" oncommand="AufnahmeTermineDelete();"/>
|
||||
</hbox>
|
||||
<vbox hidden="true">
|
||||
<label value="person_id" control="aufnahmetermine-textbox-person_id"/>
|
||||
<textbox id="aufnahmetermine-textbox-person_id" disabled="true"/>
|
||||
<label value="studienplan_studiengang_kz" control="aufnahmetermine-textbox-studienplan_studiengang_kz"/>
|
||||
<textbox id="aufnahmetermine-textbox-studienplan_studiengang_kz" disabled="true"/>
|
||||
<label value="Neu" control="aufnahmetermine-checkbox-neu"/>
|
||||
<checkbox id="aufnahmetermine-checkbox-neu" disabled="true" checked="false"/>
|
||||
<label value="rt_person_id" control="aufnahmetermine-textbox-rt_person_id"/>
|
||||
<textbox id="aufnahmetermine-textbox-rt_person_id" disabled="true"/>
|
||||
</vbox>
|
||||
<groupbox id="aufnahmetermine-groupbox" flex="1">
|
||||
<caption label="Details"/>
|
||||
<grid id="aufnahmetermine-grid-detail" style="overflow:auto;margin:4px;" flex="1">
|
||||
<columns >
|
||||
<column flex="1"/>
|
||||
<column flex="5"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="Reihungstest / Interview" control="aufnahmetermine-menulist-reihungstest"/>
|
||||
<hbox>
|
||||
<menulist id="aufnahmetermine-menulist-reihungstest" disabled="true"
|
||||
datasources="rdf:null" flex="1" style="width:200px"
|
||||
ref="http://www.technikum-wien.at/reihungstest/alle">
|
||||
<template>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/reihungstest/rdf#reihungstest_id"
|
||||
label="rdf:http://www.technikum-wien.at/reihungstest/rdf#bezeichnung"
|
||||
tooltiptext="rdf:http://www.technikum-wien.at/reihungstest/rdf#bezeichnung"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</template>
|
||||
</menulist>
|
||||
<toolbarbutton id="aufnahmetermine-button-reihungstest-refresh" image="../../skin/images/refresh.png" tooltiptext="Alle zukünftigen Reihungstests des Studiengangs laden" onclick="AufnahmeTermineReihungstestDropDownRefresh()"/>
|
||||
<toolbarbutton id="aufnahmetermine-button-reihungstest-open" image="../../skin/images/edit.png" tooltiptext="Zur Reihungstestverwaltung" onclick="AufnahmeTermineReihungstestEdit()"/>
|
||||
<spacer flex="1"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<label value="&tab-prestudent-aufnahme.anmeldung;" control="aufnahmetermine-textbox-anmeldungreihungstest"/>
|
||||
<hbox>
|
||||
<box class="Datum" id="aufnahmetermine-textbox-anmeldungreihungstest" disabled="true"/>
|
||||
<button id="aufnahmetermine-button-anmeldungreihungstest-heute" label="Heute" oncommand="AufnahmeTermineAnmeldungreihungstestHeute()" disabled="true" style="margin:0px;"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<label value="&tab-prestudent-aufnahme.absolviert;" control="aufnahmetermine-checkbox-teilgenommen"/>
|
||||
<checkbox id="aufnahmetermine-checkbox-teilgenommen" checked="true" disabled="true"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Reihungstest Studienplan" control="aufnahmetermine-menulist-studienplan"/>
|
||||
<hbox>
|
||||
<menulist id="aufnahmetermine-menulist-studienplan" disabled="true"
|
||||
datasources="rdf:null" flex="1"
|
||||
ref="http://www.technikum-wien.at/studienplan">
|
||||
<template>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/studienplan/rdf#studienplan_id"
|
||||
label="rdf:http://www.technikum-wien.at/studienplan/rdf#bezeichnung"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</template>
|
||||
</menulist>
|
||||
<spacer flex="1"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Punkte" control="aufnahmetermine-textbox-punkte" />
|
||||
<hbox>
|
||||
<textbox id="aufnahmetermine-textbox-punkte" disabled="true" maxlength="8" size="6"/>
|
||||
<toolbarbutton
|
||||
id="aufnahmetermine-button-reihungstest-punktesync"
|
||||
<?php
|
||||
if(!$rt_uebernahme)
|
||||
echo 'hidden="true"';
|
||||
?>
|
||||
image="../../skin/images/transmit.png"
|
||||
tooltiptext="Reihungstest Ergebnis holen"
|
||||
onclick="AufnahemTermineReihungstestPunkteTransmit()"/>
|
||||
<spacer flex="1" />
|
||||
</hbox>
|
||||
</row>
|
||||
<groupbox id="aufnahmetermine-groupbox-vergleich-endpunkte" hidden="true">
|
||||
<caption label="Vergleichswerte Reihungstestpunkte (Basisgebiete)"></caption>
|
||||
<vbox style="padding: 10px;">
|
||||
<spacer resize='none' height='10' flex="1"/>
|
||||
<row>
|
||||
<label value="Reihungstestpunkte (inkl. Physik)" control="aufnahmetermine-textbox-endpunkte-inkl-gebiete" style="margin-right: 7px;"/>
|
||||
<hbox>
|
||||
<textbox id="aufnahmetermine-textbox-endpunkte-inkl-gebiete" readonly="true" maxlength="8" size="6" flex="1"/>
|
||||
<toolbarbutton image="../../skin/images/up.png" tooltiptext="Als Punkte setzen" onclick="setEndpunkteAsPunkte('aufnahmetermine-textbox-endpunkte-inkl-gebiete')"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Reihungstestpunkte (exkl. Physik)" control="aufnahmetermine-textbox-endpunkte-exkl-gebiete" />
|
||||
<hbox>
|
||||
<textbox id="aufnahmetermine-textbox-endpunkte-exkl-gebiete" readonly="true" maxlength="8" size="6" flex="1"/>
|
||||
<toolbarbutton image="../../skin/images/up.png" tooltiptext="Als Punkte setzen" onclick="setEndpunkteAsPunkte('aufnahmetermine-textbox-endpunkte-exkl-gebiete')"/>
|
||||
</hbox>
|
||||
</row>
|
||||
</vbox>
|
||||
</groupbox>
|
||||
</rows>
|
||||
</grid>
|
||||
<hbox>
|
||||
<button id="aufnahmetermine-button-speichern" oncommand="AufnahmeTermineSpeichern()" label="Speichern" disabled="true"/>
|
||||
<spacer flex="1" />
|
||||
</hbox>
|
||||
</groupbox>
|
||||
</vbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
</hbox>
|
||||
</groupbox>
|
||||
<spacer flex="1" />
|
||||
</vbox>
|
||||
</window>
|
||||
|
||||
+4696
-4696
File diff suppressed because it is too large
Load Diff
@@ -69,6 +69,10 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<row>
|
||||
<label value="Person ID" control="student-detail-textbox-person_id"/>
|
||||
<hbox><textbox id="student-detail-textbox-person_id" readonly="true" maxlength="16" size="16"/></hbox>
|
||||
<label value="Zugangscode" control="student-detail-zugangscode"/>
|
||||
<label id="label-student-detail-link_bewerbungstool" hidden="true" value=""></label>
|
||||
<label class="text-link" href="#" id="label-student-detail-zugangscode" value="" onclick="window.open(document.getElementById('label-student-detail-link_bewerbungstool').value)"/>
|
||||
|
||||
</row>
|
||||
<row>
|
||||
<label value="Anrede" control="student-detail-textbox-anrede"/>
|
||||
@@ -496,105 +500,176 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
<groupbox id="student-detail-groupbox-rollen">
|
||||
<caption label="Status" />
|
||||
<tree id="student-prestudent-tree-rolle" seltype="single" hidecolumnpicker="false" flex="1"
|
||||
datasources="rdf:null" ref="http://www.technikum-wien.at/prestudentrolle/liste"
|
||||
style="margin-left:10px;margin-right:10px;margin-bottom:5px;" height="200px" enableColumnDrag="true"
|
||||
flags="dont-build-content"
|
||||
context="student-prestudent-rolle-tree-popup"
|
||||
ondblclick="StudentRolleBearbeiten()"
|
||||
>
|
||||
<treecols>
|
||||
<treecol id="student-prestudent-tree-rolle-status_kurzbz" label="Kurzbz" flex="2" hidden="false" primary="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#status_kurzbz"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-studiensemester_kurzbz" label="StSem" flex="3" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#studiensemester_kurzbz"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-ausbildungssemester" label="Semester" flex="1" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#ausbildungssemester"
|
||||
sorthints="integer"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-lehrverband" label="Lehrverband" flex="1" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#lehrverband" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-datum" label="Datum" flex="2" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#datum" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-orgform_kurzbz" label="Organisationsform" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#orgform_kurzbz" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-prestudent_id" label="PrestudentInID" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#prestudent_id" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-studienplan_id" label="StudienplanID" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#studienplan_id" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-studienplan_bezeichnung" label="Studienplan" flex="2" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#studienplan_bezeichnung" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-anmerkung" label="Anmerkung" flex="2" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#anmerkung" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-bestaetigt_von" label="BestaetigtVon" flex="1" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#bestaetigt_von" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-bestaetigt_am" label="BestaetigtAm" flex="1" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#bestaetigt_Am" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-bewerbung_abgeschicktamum" label="AbgeschicktAm" flex="1" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#bewerbung_abgeschicktamum" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-statusgrund" label="Statusgrund" flex="1" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#statusgrund" />
|
||||
<splitter class="tree-splitter"/>
|
||||
</treecols>
|
||||
|
||||
<template>
|
||||
<rule>
|
||||
<treechildren flex="1" >
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#status_kurzbz"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#studiensemester_kurzbz"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#ausbildungssemester"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#lehrverband"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#datum"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#orgform_kurzbz"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#prestudent_id"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#studienplan_id"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#studienplan_bezeichnung"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#anmerkung"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#bestaetigt_von"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#bestaetigt_am"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#bewerbung_abgeschicktamum"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#statusgrund"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
</tree>
|
||||
</groupbox>
|
||||
<hbox>
|
||||
<spacer flex="1" />
|
||||
<button id="student-prestudent-button-save" label="Speichern" oncommand="StudentPrestudentSave();" disabled="true"/>
|
||||
</hbox>
|
||||
<hbox flex="1">
|
||||
<groupbox id="student-detail-groupbox-rollen" flex="3">
|
||||
<caption label="Status" />
|
||||
<tree id="student-prestudent-tree-rolle" seltype="single" hidecolumnpicker="false" flex="1"
|
||||
datasources="rdf:null" ref="http://www.technikum-wien.at/prestudentrolle/liste"
|
||||
style="margin-left:10px;margin-right:10px;margin-bottom:5px;min-height: 200px" height="200px" enableColumnDrag="true"
|
||||
flags="dont-build-content"
|
||||
context="student-prestudent-rolle-tree-popup"
|
||||
ondblclick="StudentRolleBearbeiten()"
|
||||
>
|
||||
<treecols>
|
||||
<treecol id="student-prestudent-tree-rolle-status_kurzbz" label="Kurzbz" flex="2" hidden="false" primary="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#status_kurzbz"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-studiensemester_kurzbz" label="StSem" flex="2" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#studiensemester_kurzbz"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-ausbildungssemester" label="Sem" flex="1" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#ausbildungssemester"
|
||||
sorthints="integer"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-lehrverband" label="Lehrverband" flex="1" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#lehrverband" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-datum" label="Datum" flex="2" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#datum" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-orgform_kurzbz" label="Organisationsform" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#orgform_kurzbz" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-prestudent_id" label="PrestudentInID" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#prestudent_id" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-studienplan_id" label="StudienplanID" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#studienplan_id" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-studienplan_bezeichnung" label="Studienplan" flex="2" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#studienplan_bezeichnung" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-anmerkung" label="Anmerkung" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#anmerkung" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-bestaetigt_von" label="BestaetigtVon" flex="1" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#bestaetigt_von" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-bestaetigt_am" label="BestaetigtAm" flex="1" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#bestaetigt_Am" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-bewerbung_abgeschicktamum" label="AbgeschicktAm" flex="1" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#bewerbung_abgeschicktamum" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-prestudent-tree-rolle-statusgrund" label="Statusgrund" flex="1" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#statusgrund" />
|
||||
<splitter class="tree-splitter"/>
|
||||
</treecols>
|
||||
|
||||
<template>
|
||||
<rule>
|
||||
<treechildren flex="1" >
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#status_kurzbz"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#studiensemester_kurzbz"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#ausbildungssemester"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#lehrverband"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#datum"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#orgform_kurzbz"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#prestudent_id"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#studienplan_id"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#studienplan_bezeichnung"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#anmerkung"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#bestaetigt_von"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#bestaetigt_am"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#bewerbung_abgeschicktamum"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#statusgrund"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
</tree>
|
||||
</groupbox>
|
||||
<groupbox id="student-detail-groupbox-historie" flex="2">
|
||||
<caption label="Gesamthistorie" />
|
||||
<vbox flex="1">
|
||||
<tree id="historie-tree" seltype="single" hidecolumnpicker="true" flex="1"
|
||||
datasources="rdf:null" ref="http://www.technikum-wien.at/prestudenthistorie/liste"
|
||||
style="margin-left:10px;margin-right:10px;margin-bottom:5px;" height="100px"
|
||||
persist="hidden, height"
|
||||
context="historie-tree-popup"
|
||||
>
|
||||
<treecols>
|
||||
<treecol id="historie-treecol-studiensemester_kurzbz" label="StSem" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#studiensemester_kurzbz" onclick="historieTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="historie-treecol-prioritaet" label="Prio" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#prioritaet" onclick="historieTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="historie-treecol-studiengang" label="Stg" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#studiengang" onclick="historieTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="historie-treecol-orgform_kurzbz" label="Orgform" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#orgform_kurzbz" onclick="historieTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="historie-treecol-studienplan_bezeichnung" label="Studienplan" flex="3" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#studienplan_bezeichnung" onclick="historieTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<!--<treecol id="historie-treecol-reihung_absolviert" label="Reihung absolviert" flex="2" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#reihung_absolviert" onclick="historieTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>-->
|
||||
<treecol id="historie-treecol-uid" label="UID" flex="2" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#uid" onclick="historieTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="historie-treecol-status" label="Status" flex="4" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#status" onclick="historieTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="historie-treecol-prestudent_id" label="PrestudentID" flex="1" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#prestudent_id" onclick="historieTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
</treecols>
|
||||
|
||||
<template>
|
||||
<rule>
|
||||
<treechildren>
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow>
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#aktiv rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#bold" label="rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#studiensemester_kurzbz" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#aktiv rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#bold" label="rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#prioritaet" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#aktiv rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#bold" label="rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#studiengang" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#aktiv rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#bold" label="rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#orgform_kurzbz" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#aktiv rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#bold" label="rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#studienplan_bezeichnung" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#aktiv rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#bold" label="rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#uid" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#aktiv rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#bold" label="rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#status" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#aktiv rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#bold" label="rdf:http://www.technikum-wien.at/prestudenthistorie/rdf#prestudent_id" />
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
</tree>
|
||||
</vbox>
|
||||
</groupbox>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
</overlay>
|
||||
|
||||
@@ -1055,6 +1055,8 @@ function StudentAuswahl()
|
||||
status=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#status" ));
|
||||
alias=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#alias" ));
|
||||
matr_nr=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#matr_nr" ));
|
||||
zugangscode=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#zugangscode" ));
|
||||
link_bewerbungstool=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#link_bewerbungstool" ));
|
||||
|
||||
//Bei Incoming wird das Menue zur Statusaenderung deaktiviert
|
||||
if(status=='Incoming')
|
||||
@@ -1099,6 +1101,8 @@ function StudentAuswahl()
|
||||
document.getElementById('student-detail-textbox-person_id').value = person_id;
|
||||
document.getElementById('student-detail-textbox-alias').value=alias;
|
||||
document.getElementById('student-detail-textbox-matr_nr').value=matr_nr;
|
||||
document.getElementById('label-student-detail-zugangscode').value=zugangscode;
|
||||
document.getElementById('label-student-detail-link_bewerbungstool').value=link_bewerbungstool;
|
||||
|
||||
//PreStudent Daten holen
|
||||
|
||||
@@ -1187,6 +1191,22 @@ function StudentAuswahl()
|
||||
rollentree.database.AddDataSource(StudentDetailRolleTreeDatasource);
|
||||
StudentDetailRolleTreeDatasource.addXMLSinkObserver(StudentDetailRolleTreeSinkObserver);
|
||||
|
||||
var historietree = document.getElementById('historie-tree');
|
||||
url_historie='<?php echo APP_ROOT;?>rdf/prestudenthistorie.rdf.php?prestudent_id='+prestudent_id+"&"+gettimestamp();
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasourcesHistorie = historietree.database.GetDataSources();
|
||||
while(oldDatasourcesHistorie.hasMoreElements())
|
||||
{
|
||||
historietree.database.RemoveDataSource(oldDatasourcesHistorie.getNext());
|
||||
}
|
||||
//Refresh damit die entfernten DS auch wirklich entfernt werden
|
||||
historietree.builder.rebuild();
|
||||
|
||||
var HistorieTreeDatasource = rdfService.GetDataSource(url_historie);
|
||||
HistorieTreeDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
historietree.database.AddDataSource(HistorieTreeDatasource);
|
||||
|
||||
if(uid=='')
|
||||
{
|
||||
//PRESTUDENT
|
||||
|
||||
@@ -247,6 +247,7 @@ $is_hidden = (!defined('FAS_STUDIERENDE_PROJEKTARBEIT_VERTRAGSDETAILS_ANZEIGEN')
|
||||
<label value="Lehreinheit" control="student-projektarbeit-menulist-lehreinheit"/>
|
||||
<menulist id="student-projektarbeit-menulist-lehreinheit" disabled="true"
|
||||
datasources="rdf:null" flex="1"
|
||||
style="max-width: 600px"
|
||||
ref="http://www.technikum-wien.at/lehreinheit/liste" >
|
||||
<template>
|
||||
<menupopup>
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
*/
|
||||
/**
|
||||
* Klasse bankverbindung
|
||||
@@ -47,6 +47,7 @@ class bankverbindung extends basis_db
|
||||
public $updateamum; // timestamp
|
||||
public $updatevon; // bigint
|
||||
public $oe_kurzbz; // string
|
||||
public $orgform_kurzbz; // string
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
@@ -95,6 +96,7 @@ class bankverbindung extends basis_db
|
||||
$this->insertvon = $row->insertvon;
|
||||
$this->ext_id = $row->ext_id;
|
||||
$this->oe_kurzbz = $row->oe_kurzbz;
|
||||
$this->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -176,19 +178,20 @@ class bankverbindung extends basis_db
|
||||
//Neuen Datensatz einfuegen
|
||||
|
||||
$qry = 'BEGIN;INSERT INTO public.tbl_bankverbindung (person_id, name, anschrift, blz, bic,
|
||||
kontonr, iban, typ, oe_kurzbz, verrechnung, insertamum, insertvon, updateamum, updatevon) VALUES('.
|
||||
$this->db_add_param($this->person_id, FHC_INTEGER).', '.
|
||||
$this->db_add_param($this->name).', '.
|
||||
$this->db_add_param($this->anschrift).', '.
|
||||
$this->db_add_param($this->blz).', '.
|
||||
$this->db_add_param($this->bic).', '.
|
||||
$this->db_add_param($this->kontonr).', '.
|
||||
$this->db_add_param($this->iban).', '.
|
||||
$this->db_add_param($this->typ).', '.
|
||||
$this->db_add_param($this->oe_kurzbz).', '.
|
||||
$this->db_add_param($this->verrechnung, FHC_BOOLEAN).', now(), '.
|
||||
$this->db_add_param($this->insertvon).', now(), '.
|
||||
$this->db_add_param($this->updatevon).');';
|
||||
kontonr, iban, typ, oe_kurzbz, orgform_kurzbz, verrechnung, insertamum, insertvon, updateamum, updatevon) VALUES('.
|
||||
$this->db_add_param($this->person_id, FHC_INTEGER).', '.
|
||||
$this->db_add_param($this->name).', '.
|
||||
$this->db_add_param($this->anschrift).', '.
|
||||
$this->db_add_param($this->blz).', '.
|
||||
$this->db_add_param($this->bic).', '.
|
||||
$this->db_add_param($this->kontonr).', '.
|
||||
$this->db_add_param($this->iban).', '.
|
||||
$this->db_add_param($this->typ).', '.
|
||||
$this->db_add_param($this->oe_kurzbz).', '.
|
||||
$this->db_add_param($this->orgform_kurzbz).', '.
|
||||
$this->db_add_param($this->verrechnung, FHC_BOOLEAN).', now(), '.
|
||||
$this->db_add_param($this->insertvon).', now(), '.
|
||||
$this->db_add_param($this->updatevon).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -212,6 +215,7 @@ class bankverbindung extends basis_db
|
||||
'typ='.$this->db_add_param($this->typ).', '.
|
||||
'verrechnung='.$this->db_add_param($this->verrechnung,FHC_BOOLEAN).', '.
|
||||
'oe_kurzbz='.$this->db_add_param($this->oe_kurzbz).', '.
|
||||
'orgform_kurzbz='.$this->db_add_param($this->orgform_kurzbz).', '.
|
||||
'updateamum='.$this->db_add_param($this->updateamum).','.
|
||||
'updatevon='.$this->db_add_param($this->updatevon).' '.
|
||||
'WHERE bankverbindung_id='.$this->db_add_param($this->bankverbindung_id).';';
|
||||
@@ -315,6 +319,7 @@ class bankverbindung extends basis_db
|
||||
$obj->insertvon = $row->insertvon;
|
||||
$obj->ext_id = $row->ext_id;
|
||||
$obj->oe_kurzbz = $row->oe_kurzbz;
|
||||
$obj->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -328,11 +333,12 @@ class bankverbindung extends basis_db
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt die Bankverbindung einer Organisationseinheit
|
||||
* @param $person_id
|
||||
* Laedt die Bankverbindung einer Organisationseinheit und optional einer OrgForm
|
||||
* @param string $oe_kurzbz
|
||||
* @param string $orgform_kurzbz
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function load_oe($oe_kurzbz)
|
||||
public function load_oe($oe_kurzbz, $orgform_kurzbz = null)
|
||||
{
|
||||
if($oe_kurzbz==null || $oe_kurzbz=='')
|
||||
{
|
||||
@@ -342,6 +348,11 @@ class bankverbindung extends basis_db
|
||||
|
||||
$qry = "SELECT * FROM public.tbl_bankverbindung WHERE oe_kurzbz=".$this->db_add_param($oe_kurzbz);
|
||||
|
||||
if($orgform_kurzbz != '')
|
||||
{
|
||||
$qry .= " AND orgform_kurzbz=".$this->db_add_param($orgform_kurzbz);
|
||||
}
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object())
|
||||
@@ -364,6 +375,7 @@ class bankverbindung extends basis_db
|
||||
$obj->insertvon = $row->insertvon;
|
||||
$obj->ext_id = $row->ext_id;
|
||||
$obj->oe_kurzbz = $row->oe_kurzbz;
|
||||
$obj->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -412,6 +424,7 @@ class bankverbindung extends basis_db
|
||||
$this->insertvon = $row->insertvon;
|
||||
$this->ext_id = $row->ext_id;
|
||||
$this->oe_kurzbz = $row->oe_kurzbz;
|
||||
$this->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+1070
-889
File diff suppressed because it is too large
Load Diff
@@ -420,6 +420,69 @@ class prestudent extends person
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Laden aller Prestudenten, die an $datum zum Reihungstest geladen sind.
|
||||
* Wenn es mehrere Bewerbungen für ein Person gibt, wird nur die höchste Prestudent_id zurückgeliefert
|
||||
* @param string $datum Datum in der Form YYYY-MM-DD an dem der Reihungstest stattfindet
|
||||
* @return true wenn erfolgreich, false im Fehlerfall
|
||||
*/
|
||||
public function getFirstPrioPrestudentRT($datum)
|
||||
{
|
||||
$sql_query='SELECT DISTINCT
|
||||
ps.prestudent_id,
|
||||
pers.vorname, pers.nachname, pers.person_id, pers.titelpre,
|
||||
pers.titelpost, pers.gebdatum,
|
||||
tbl_reihungstest.*,
|
||||
ps.studiengang_kz as studiengang_kz,
|
||||
tbl_studiengang.typ
|
||||
FROM
|
||||
public.tbl_prestudent ps
|
||||
JOIN public.tbl_person pers USING (person_id)
|
||||
JOIN public.tbl_rt_person USING (person_id)
|
||||
JOIN public.tbl_reihungstest ON (tbl_reihungstest.reihungstest_id=tbl_rt_person.rt_id)
|
||||
JOIN public.tbl_studiengang ON (ps.studiengang_kz=tbl_studiengang.studiengang_kz)
|
||||
JOIN public.tbl_prestudentstatus ON (tbl_prestudentstatus.prestudent_id=ps.prestudent_id
|
||||
AND status_kurzbz=\'Interessent\'
|
||||
AND tbl_prestudentstatus.studiensemester_kurzbz=tbl_reihungstest.studiensemester_kurzbz)
|
||||
WHERE
|
||||
tbl_reihungstest.datum='.$this->db_add_param($datum).'
|
||||
/*AND tbl_rt_person.studienplan_id IN (SELECT studienplan_id FROM public.tbl_prestudentstatus WHERE prestudent_id=ps.prestudent_id)*/
|
||||
AND tbl_prestudentstatus.studienplan_id IN (SELECT studienplan_id FROM public.tbl_rt_studienplan WHERE reihungstest_id=tbl_rt_person.rt_id)
|
||||
AND EXISTS(SELECT * FROM public.tbl_prestudentstatus JOIN public.tbl_studiensemester USING(studiensemester_kurzbz)
|
||||
WHERE prestudent_id=ps.prestudent_id AND tbl_studiensemester.ende > '.$this->db_add_param($datum).')
|
||||
AND priorisierung = (SELECT priorisierung FROM public.tbl_prestudent
|
||||
WHERE person_id = pers.person_id
|
||||
AND get_rolle_prestudent (ps.prestudent_id,NULL) IN (\'Interessent\',\'Bewerber\',\'Wartender\',\'Aufgenommener\')
|
||||
--AND tbl_prestudent.studiengang_kz=ps.studiengang_kz
|
||||
ORDER BY priorisierung ASC LIMIT 1)
|
||||
ORDER BY nachname,vorname';
|
||||
|
||||
if(!$this->db_query($sql_query))
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->num_rows=0;
|
||||
|
||||
while($row = $this->db_fetch_object())
|
||||
{
|
||||
$ps=new prestudent();
|
||||
$ps->prestudent_id = $row->prestudent_id;
|
||||
$ps->person_id = $row->person_id;
|
||||
$ps->reihungstest_id = $row->reihungstest_id;
|
||||
$ps->titelpost = $row->titelpost;
|
||||
$ps->titelpre = $row->titelpre;
|
||||
$ps->nachname = $row->nachname;
|
||||
$ps->vorname = $row->vorname;
|
||||
$ps->gebdatum = $row->gebdatum;
|
||||
$ps->studiengang_kz = $row->studiengang_kz;
|
||||
$this->result[]=$ps;
|
||||
$this->num_rows++;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt über einen Prestudenten alle anderen Prestudenten einer Person, die aktuell an STG interessiert sind.
|
||||
* @integer $prestudent_id Prestudent ID, über die alle weiteren Prestudenten ermittelt werden sollen.
|
||||
@@ -436,11 +499,12 @@ class prestudent extends person
|
||||
SELECT DISTINCT ON (priorisierung, prestudent_id)
|
||||
priorisierung,
|
||||
prestudent_id,
|
||||
studienplan_id,
|
||||
tbl_prestudentstatus.studienplan_id,
|
||||
studiengang_kz,
|
||||
typ,
|
||||
tbl_studiengangstyp.bezeichnung AS typ_bz,
|
||||
ausbildungssemester
|
||||
ausbildungssemester,
|
||||
tbl_orgform.bezeichnung_mehrsprachig
|
||||
FROM
|
||||
public.tbl_prestudentstatus
|
||||
JOIN
|
||||
@@ -449,6 +513,10 @@ class prestudent extends person
|
||||
public.tbl_studiengang USING (studiengang_kz)
|
||||
JOIN
|
||||
public.tbl_studiengangstyp USING (typ)
|
||||
JOIN
|
||||
lehre.tbl_studienplan ON (tbl_prestudentstatus.studienplan_id = tbl_studienplan.studienplan_id)
|
||||
JOIN
|
||||
bis.tbl_orgform ON (tbl_studienplan.orgform_kurzbz = tbl_orgform.orgform_kurzbz)
|
||||
WHERE
|
||||
tbl_prestudent.person_id = (
|
||||
SELECT
|
||||
@@ -516,6 +584,7 @@ class prestudent extends person
|
||||
$obj->typ = $row->typ;
|
||||
$obj->typ_bz = $row->typ_bz;
|
||||
$obj->ausbildungssemester = $row->ausbildungssemester;
|
||||
$obj->orgform_bezeichnung = $this->db_parse_lang_array($row->bezeichnung_mehrsprachig);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
|
||||
+53
-31
@@ -350,9 +350,10 @@ class pruefling extends basis_db
|
||||
* definiert sind, bei der Berechnung der Endpunkte nicht berücksichtigt.
|
||||
* @param $studiengang_kz Wenn eine Studiengangskennzahl übergeben wird, dann werden nur die Punkte der
|
||||
* Basis-Fragengebiete (ohne Quereinsteiger) bei der Berechnung der Endpunkte berücksichtigt.
|
||||
* @param $gewichtung_studiengang_kz Wenn diese studiengang_kz übergeben wird, wird das Ergebnis entsprechend des Gewichtungsschemas des Studienganges gewichtet
|
||||
* @return Endpunkte des Reihungstests oder False wenn keine Punkte vorhanden
|
||||
*/
|
||||
public function getReihungstestErgebnisPerson($person_id, $punkte=false, $reihungstest_id, $has_excluded_gebiete = false, $studiengang_kz = null)
|
||||
public function getReihungstestErgebnisPerson($person_id, $punkte=false, $reihungstest_id, $has_excluded_gebiete = false, $studiengang_kz = null, $gewichtung_studiengang_kz = null)
|
||||
{
|
||||
if(is_numeric($reihungstest_id))
|
||||
{
|
||||
@@ -415,39 +416,57 @@ class pruefling extends basis_db
|
||||
* Ergebniss der beiden Tests summiert bekommen
|
||||
* Im Zweifelsfall wird der neuere Reihungstest genommen */
|
||||
$qry .= "
|
||||
AND prestudent_id = (
|
||||
SELECT
|
||||
prestudent_id
|
||||
FROM
|
||||
public.tbl_rt_person
|
||||
JOIN
|
||||
public.tbl_prestudent USING(person_id)
|
||||
JOIN
|
||||
public.tbl_prestudentstatus USING (prestudent_id, studienplan_id)
|
||||
JOIN
|
||||
tbl_reihungstest ON (
|
||||
tbl_rt_person.rt_id = tbl_reihungstest.reihungstest_id
|
||||
)
|
||||
WHERE
|
||||
tbl_rt_person.person_id = ".$this->db_add_param($person_id, FHC_INTEGER)."
|
||||
AND
|
||||
tbl_rt_person.rt_id = ".$this->db_add_param($reihungstest_id, FHC_INTEGER)."
|
||||
AND
|
||||
tbl_prestudentstatus.status_kurzbz='Interessent'
|
||||
AND
|
||||
tbl_prestudentstatus.studiensemester_kurzbz = tbl_reihungstest.studiensemester_kurzbz
|
||||
ORDER BY
|
||||
tbl_reihungstest.datum DESC, tbl_prestudent.priorisierung ASC LIMIT 1
|
||||
)
|
||||
";
|
||||
AND prestudent_id = (
|
||||
SELECT
|
||||
prestudent_id
|
||||
FROM
|
||||
public.tbl_rt_person
|
||||
JOIN
|
||||
public.tbl_prestudent USING(person_id)
|
||||
JOIN
|
||||
public.tbl_prestudentstatus USING (prestudent_id, studienplan_id)
|
||||
JOIN
|
||||
tbl_reihungstest ON (
|
||||
tbl_rt_person.rt_id = tbl_reihungstest.reihungstest_id
|
||||
)
|
||||
WHERE
|
||||
tbl_rt_person.person_id = ".$this->db_add_param($person_id, FHC_INTEGER)."
|
||||
AND
|
||||
tbl_rt_person.rt_id = ".$this->db_add_param($reihungstest_id, FHC_INTEGER)."
|
||||
AND
|
||||
tbl_prestudentstatus.status_kurzbz='Interessent'
|
||||
AND
|
||||
tbl_prestudentstatus.studiensemester_kurzbz = tbl_reihungstest.studiensemester_kurzbz
|
||||
ORDER BY tbl_reihungstest.datum DESC, tbl_prestudent.priorisierung ASC LIMIT 1
|
||||
)
|
||||
";
|
||||
|
||||
//calculate Gewichte for Studiengang if set
|
||||
$gewichte = array();
|
||||
if (isset($gewichtung_studiengang_kz))
|
||||
{
|
||||
$ablauf = new ablauf();
|
||||
$ablauf->getAblaufGebiete($gewichtung_studiengang_kz);
|
||||
|
||||
foreach ($ablauf->result as $abl)
|
||||
{
|
||||
$gewichte[$abl->gebiet_id] = $abl->gewicht;
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
// Wenn keine Eintraege vorhanden dann false
|
||||
if($this->db_num_rows($result)==0)
|
||||
return false;
|
||||
|
||||
$summeGewicht = 0;
|
||||
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
if (!isset($row->punkte))
|
||||
continue;
|
||||
|
||||
//wenn maxpunkte ueberschritten wurde -> 100%
|
||||
if($row->punkte>=$row->maxpunkte)
|
||||
{
|
||||
@@ -455,17 +474,20 @@ class pruefling extends basis_db
|
||||
$row->punkte = $row->maxpunkte;
|
||||
}
|
||||
else
|
||||
$prozent = ($row->punkte/$row->maxpunkte)*100;
|
||||
$prozent = (($row->punkte + $row->offsetpunkte)/($row->maxpunkte + $row->offsetpunkte))*100;
|
||||
|
||||
if($punkte)
|
||||
{
|
||||
$ergebnis +=$row->punkte;
|
||||
$ergebnis += $row->punkte;
|
||||
}
|
||||
|
||||
else
|
||||
$ergebnis+=$prozent*$row->gewicht;
|
||||
{
|
||||
$gew = isset($gewichte[$row->gebiet_id]) ? $gewichte[$row->gebiet_id] : 1;
|
||||
$ergebnis += $prozent * $gew;
|
||||
$summeGewicht += $gew;
|
||||
}
|
||||
}
|
||||
return $ergebnis;
|
||||
return $summeGewicht > 0 ? $ergebnis/$summeGewicht : $ergebnis;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
.mce-tinymce .mce-container .mce-panel {
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.mce-panel {
|
||||
border-width: 0px !important;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
.div-table {
|
||||
display: table;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.div-row {
|
||||
display: table-row;
|
||||
}
|
||||
|
||||
.div-cell {
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
.div-cell-label {
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
label[required-field=true]::after {
|
||||
content: "*";
|
||||
}
|
||||
|
||||
.div-cell-data {
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
.halign-right {
|
||||
text-align: right;
|
||||
margin-left: auto;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.valign-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.valign-top {
|
||||
vertical-align: top;
|
||||
padding-top: 1px;
|
||||
}
|
||||
|
||||
.width-150px {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.width-30px {
|
||||
width: 30px;
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
/* Smaller subject field */
|
||||
input[type=text] {
|
||||
height: 28px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.msgfield label {
|
||||
margin-bottom: 0 !important;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1200px) {
|
||||
.col-lg-1.msgfieldcol-left {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.col-lg-11.msgfieldcol-right {
|
||||
width: 87%;
|
||||
}
|
||||
}
|
||||
|
||||
#sendButton {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
/* Overwrites the Widget.css class */
|
||||
div .width-150px {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.panel-heading {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.signatureblock {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.signatureblocklink {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.signatureblocklink:hover {
|
||||
color: #337ab7;
|
||||
}
|
||||
|
||||
.rwd-line {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1831px) {
|
||||
.rwd-line {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
|
||||
.panel-heading {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1500px) {
|
||||
#msgtable {
|
||||
width: 70%;
|
||||
}
|
||||
}
|
||||
|
||||
#msgtable td {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
#replybutton {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
/* STYLE THE HTML ELEMENTS (INCLUDES RESETS FOR THE DEFAULT FIELDSET AND LEGEND STYLES) */
|
||||
fieldset {
|
||||
margin: 0;
|
||||
padding: 2rem;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
border: none;
|
||||
border: solid 1px #CCC;
|
||||
min-width: 0;
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
fieldset legend {
|
||||
margin: 0 0 1.5rem;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
float: left;
|
||||
display: table;
|
||||
font-size: 1.5rem;
|
||||
line-height: 140%;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
fieldset legend + * {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
body:not(:-moz-handler-blocked) fieldset {
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
/* TOGGLE STYLING */
|
||||
.toggle {
|
||||
margin: 0 0 1.5rem;
|
||||
box-sizing: border-box;
|
||||
font-size: 0;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: flex-start;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.toggle input {
|
||||
width: 0;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
left: -9999px;
|
||||
}
|
||||
|
||||
.toggle input + label {
|
||||
margin: 0;
|
||||
padding: .75rem 2rem;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
border: solid 1px #DDD;
|
||||
background-color: #FFF;
|
||||
font-size: 14px;
|
||||
line-height: 140%;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
box-shadow: 0 0 0 rgba(255, 255, 255, 0);
|
||||
transition: border-color .15s ease-out, color .25s ease-out, background-color .15s ease-out, box-shadow .15s ease-out;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.toggle input + label:first-of-type {
|
||||
border-radius: 6px 0 0 6px;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.toggle input + label:last-of-type {
|
||||
border-radius: 0 6px 6px 0;
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
.toggle input:hover + label {
|
||||
border-color: #213140;
|
||||
}
|
||||
|
||||
.toggle input:checked + label {
|
||||
background-color: #337ab7;
|
||||
color: #FFF;
|
||||
box-shadow: 0 0 10px rgba(102, 179, 251, 0.5);
|
||||
border-color: #337ab7;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.toggle input:focus + label {
|
||||
outline: dotted 1px #CCC;
|
||||
outline-offset: .45rem;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
.toggle input + label {
|
||||
padding: .75rem .25rem;
|
||||
flex: 0 0 50%;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
/* STYLING FOR THE STATUS HELPER TEXT FOR THE DEMO */
|
||||
.status {
|
||||
margin: 0;
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.status span {
|
||||
font-weight: 600;
|
||||
color: #B6985A;
|
||||
}
|
||||
|
||||
.status span:first-of-type {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.status span:last-of-type {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
.status span:first-of-type {
|
||||
display: none;
|
||||
}
|
||||
.status span:last-of-type {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.buttonsSpacer {
|
||||
display: inline-block;
|
||||
width: 30px;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
.panel-heading {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1500px) {
|
||||
#msgtable {
|
||||
width: 70%;
|
||||
}
|
||||
}
|
||||
|
||||
#msgtable td {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
#replybutton {
|
||||
width: 120px;
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
.panel-heading {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.signatureblock {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.signatureblocklink {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.signatureblocklink:hover {
|
||||
color: #337ab7;
|
||||
}
|
||||
|
||||
.rwd-line {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1831px) {
|
||||
.rwd-line {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
/*smaller subject field*/
|
||||
input[type=text] {
|
||||
height: 28px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.msgfield label {
|
||||
margin-bottom: 0 !important;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1200px) {
|
||||
.col-lg-1.msgfieldcol-left {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.col-lg-11.msgfieldcol-right {
|
||||
width: 87%;
|
||||
}
|
||||
}
|
||||
|
||||
#sendButton {
|
||||
width: 120px;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ var FHC_DialogLib = {
|
||||
buttons: [{
|
||||
text: "Ok",
|
||||
click: function() {
|
||||
$(this).dialog("close");
|
||||
$("#fhc-dialoglib-dialog").remove();
|
||||
}
|
||||
}]
|
||||
});
|
||||
|
||||
@@ -284,10 +284,13 @@ var InfocenterDetails = {
|
||||
{
|
||||
var freigabeResponseData = FHC_AjaxClient.getData(data);
|
||||
|
||||
if (freigabeResponseData.nonCriticalErrors && freigabeResponseData.nonCriticalErrors.length > 0
|
||||
&& typeof freigabeResponseData.nonCriticalErrors == "string")
|
||||
if (freigabeResponseData.nonCriticalErrors && freigabeResponseData.nonCriticalErrors.length > 0)
|
||||
{
|
||||
FHC_DialogLib.alertWarning(freigabeResponseData.nonCriticalErrors);
|
||||
FHC_DialogLib.alertWarning(freigabeResponseData.nonCriticalErrors.join(", "));
|
||||
}
|
||||
else if (freigabeResponseData.infoMessages && freigabeResponseData.infoMessages.length > 0)
|
||||
{
|
||||
FHC_DialogLib.alertInfo(freigabeResponseData.infoMessages.join(", "));
|
||||
}
|
||||
FHC_AjaxClient.showVeil();
|
||||
InfocenterDetails.initFrgMessageSend(freigabeData);
|
||||
@@ -680,7 +683,7 @@ var InfocenterDetails = {
|
||||
sendFreigabeMessage: function(prestudentid, vorlage_kurzbz, msgvars)
|
||||
{
|
||||
FHC_AjaxClient.ajaxCallPost(
|
||||
'system/Messages/sendJson',
|
||||
'system/messages/Messages/sendExplicitTemplateJson',
|
||||
{
|
||||
"prestudents": prestudentid,
|
||||
"vorlage_kurzbz": vorlage_kurzbz,
|
||||
|
||||
@@ -26,7 +26,7 @@ var InfocenterPersonDataset = {
|
||||
*/
|
||||
appendTableActionsHtml: function(infocenter_studiensemester)
|
||||
{
|
||||
var url = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/system/Messages/write";
|
||||
var url = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/system/messages/Messages/writeTemplate";
|
||||
|
||||
var formHtml = '<form id="sendMsgsForm" method="post" action="'+ url +'" target="_blank"></form>';
|
||||
$("#datasetActionsTop").before(formHtml);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user