Allow course/session catalog published - refs BT#10060 #TMI

1.10.x
Angel Fernando Quiroz Campos 10 years ago
parent 807328fdca
commit 60c83b82ee
  1. 2
      main/auth/courses.php
  2. 8
      main/auth/courses_controller.php
  3. 21
      main/template/default/auth/catalog_layout.php

@ -21,8 +21,10 @@ $limit = getLimitArray();
// Section for the tabs.
$this_section = SECTION_COURSES;
if (api_get_configuration_value('course_catalog_published') !== 'true') {
// Access rights: anonymous users can't do anything useful here.
api_block_anonymous_users();
}
$user_can_view_page = false;

@ -49,7 +49,7 @@ class CoursesController
// render to the view
$this->view->set_data($data);
$this->view->set_layout('layout');
$this->view->set_layout('catalog_layout');
$this->view->set_template('courses_list');
$this->view->render();
}
@ -71,7 +71,7 @@ class CoursesController
// render to the view
$this->view->set_data($data);
$this->view->set_layout('layout');
$this->view->set_layout('catalog_layout');
$this->view->set_template('categories_list');
$this->view->render();
}
@ -146,7 +146,7 @@ class CoursesController
// render to the view
$this->view->set_data($data);
$this->view->set_layout('layout');
$this->view->set_layout('catalog_layout');
$this->view->set_template('courses_categories');
$this->view->render();
}
@ -190,7 +190,7 @@ class CoursesController
// render to the view
$this->view->set_data($data);
$this->view->set_layout('layout');
$this->view->set_layout('catalog_layout');
$this->view->set_template('courses_categories');
$this->view->render();
}

@ -0,0 +1,21 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Layout (principal view) used for structuring course/session catalog
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
* @package chamilo.auth
*/
if (api_get_configuration_value('course_catalog_published') !== 'true') {
// Acces rights: anonymous users can't do anything usefull here.
api_block_anonymous_users();
}
// Header
Display::display_header('');
// Display
echo $content;
// Footer
Display::display_footer();
Loading…
Cancel
Save