@ -29,6 +29,10 @@ class Template
public $app;
public $navigation_array;
/**
* @param null $title
* @param null $app
*/
function __construct($title = null, $app = null)
{
if (empty($app)) {
@ -64,18 +68,18 @@ class Template
//Setting system variables
$this->set_system_parameters();
//Setting user variables
$this->set_user_p arameters();
//Setting user variables
$this->setUserP arameters();
//Setting course variables
$this->set_course_p arameters();
$this->setCourseP arameters();
//header and footer are showed by default
$this->set_f ooter($show_footer);
$this->set_h eader($show_header);
$this->setF ooter($show_footer);
$this->setH eader($show_header);
$this->set_header_p arameters();
$this->set_footer_p arameters();
$this->setHeaderP arameters();
$this->setFooterP arameters();
$this->assign('style', $this->style);
@ -218,7 +222,7 @@ class Template
* Sets the footer visibility
* @param bool true if we show the footer
*/
function set_f ooter($status)
function setF ooter($status)
{
$this->show_footer = $status;
$this->assign('show_footer', $status);
@ -228,7 +232,7 @@ class Template
* Sets the header visibility
* @param bool true if we show the header
*/
function set_h eader($status)
function setH eader($status)
{
$this->show_header = $status;
$this->assign('show_header', $status);
@ -280,15 +284,14 @@ class Template
}
/** Set course parameters */
private function set_course_p arameters()
private function setCourseP arameters()
{
//Setting course id
$course_id = api_get_course_int_id();
$this->course_id = $course_id;
$this->course_id = api_get_course_int_id();
}
/** Set user parameters */
private function set_user_p arameters()
private function setUserP arameters()
{
$user_info = array();
$user_info['logged'] = 0;
@ -491,7 +494,7 @@ class Template
/**
* Set header parameters
*/
private function set_header_p arameters() {
private function setHeaderP arameters() {
global $interbreadcrumb;
if (isset($this->app['breadcrumb']) & & !empty($this->app['breadcrumb'])) {
@ -505,7 +508,6 @@ class Template
$_configuration = $this->app['configuration'];
$this_section = $this->app['this_section'];
$nameTools = $this->title;
$navigation = $this->navigation_array;
@ -648,7 +650,7 @@ class Template
/**
* Set footer parameteres
*/
private function set_footer_p arameters()
private function setFooterP arameters()
{
global $_configuration;
@ -977,18 +979,6 @@ class Template
// Social
if (api_get_setting('allow_social_tool') == 'true') {
$navigation['social']['url'] = api_get_path(WEB_CODE_PATH).'social/home.php';
/*
// get count unread message and total invitations
$count_unread_message = MessageManager::get_number_of_messages(true);
$number_of_new_messages_of_friend = SocialManager::get_message_number_invitation_by_user_id(api_get_user_id());
$group_pending_invitations = GroupPortalManager::get_groups_by_user(api_get_user_id(), GROUP_USER_PERMISSION_PENDING_INVITATION,false);
if (!empty($group_pending_invitations )) {
$group_pending_invitations = count($group_pending_invitations);
}
$total_invitations = intval($number_of_new_messages_of_friend) + $group_pending_invitations + intval($count_unread_message);
$total_invitations = (!empty($total_invitations) ? Display::badge($total_invitations) :'');*/
$navigation['social']['title'] = get_lang('SocialNetwork');
}