parent
13317a6d98
commit
c4944b6ccb
@ -1,57 +0,0 @@ |
|||||||
<?php |
|
||||||
/* For licensing terms, see /license.txt */ |
|
||||||
|
|
||||||
/** |
|
||||||
* @package chamilo.main |
|
||||||
*/ |
|
||||||
|
|
||||||
define('CHAMILO_HOMEPAGE', true); |
|
||||||
|
|
||||||
$language_file = array('courses', 'index'); |
|
||||||
|
|
||||||
/* Flag forcing the 'current course' reset, as we're not inside a course anymore. */ |
|
||||||
// Maybe we should change this into an api function? an example: Coursemanager::unset(); |
|
||||||
$cidReset = true; |
|
||||||
|
|
||||||
require_once 'main/inc/global.inc.php'; |
|
||||||
require_once api_get_path(LIBRARY_PATH).'userportal.lib.php'; |
|
||||||
|
|
||||||
// The section (for the tabs). |
|
||||||
$this_section = SECTION_CAMPUS; |
|
||||||
|
|
||||||
$header_title = null; |
|
||||||
if (!api_is_anonymous()) { |
|
||||||
$header_title = " "; |
|
||||||
} |
|
||||||
|
|
||||||
$htmlHeadXtra[] = api_get_jquery_libraries_js(array('bxslider')); |
|
||||||
$htmlHeadXtra[] =' |
|
||||||
<script type="text/javascript"> |
|
||||||
$(document).ready(function(){ |
|
||||||
$("#slider").bxSlider({ |
|
||||||
infiniteLoop : true, |
|
||||||
auto : true, |
|
||||||
pager : true, |
|
||||||
autoHover : true, |
|
||||||
pause : 10000 |
|
||||||
}); |
|
||||||
}); |
|
||||||
</script>'; |
|
||||||
|
|
||||||
|
|
||||||
$index = new IndexManager($header_title); |
|
||||||
$tpl = $index->tpl->get_template('layout/layout_2_col.tpl'); |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//@todo move this inside the IndexManager |
|
||||||
$index->tpl->assign('login_block', $index->set_login_form()); |
|
||||||
$index->tpl->assign('announcements_block', $index->return_announcements()); |
|
||||||
$index->tpl->assign('teacher_block', $index->return_teacher_link()); |
|
||||||
$index->tpl->assign('home_page_block', $index->return_home_page()); |
|
||||||
|
|
||||||
$index->tpl->assign('profile_block', $index->return_profile_block()); |
|
||||||
$index->tpl->assign('notice_block', $index->return_notice()); |
|
||||||
$index->tpl->assign('plugin_campushomepage', $index->return_plugin_campushomepage()); |
|
||||||
|
|
||||||
$index->tpl->display($tpl); |
|
||||||
@ -0,0 +1,12 @@ |
|||||||
|
<div id="menu" class="menu"> |
||||||
|
<div class="menusection"> |
||||||
|
<span class="menusectioncaption"> |
||||||
|
{"Login"|get_lang} |
||||||
|
</span> |
||||||
|
</div> |
||||||
|
{$login_language_form} |
||||||
|
{$login_form} |
||||||
|
{$login_failed} |
||||||
|
{$login_options} |
||||||
|
{$login_plugin_menu} |
||||||
|
</div> |
||||||
@ -1,53 +0,0 @@ |
|||||||
<?php |
|
||||||
/* For licensing terms, see /license.txt */ |
|
||||||
|
|
||||||
/** |
|
||||||
* @package chamilo.main |
|
||||||
*/ |
|
||||||
|
|
||||||
define('CHAMILO_HOMEPAGE', true); |
|
||||||
$language_file = array('courses', 'index'); |
|
||||||
|
|
||||||
/* Flag forcing the 'current course' reset, as we're not inside a course anymore. */ |
|
||||||
// Maybe we should change this into an api function? an example: Coursemanager::unset(); |
|
||||||
$cidReset = true; |
|
||||||
|
|
||||||
/* Included libraries */ |
|
||||||
require_once 'main/inc/global.inc.php'; |
|
||||||
require_once api_get_path(LIBRARY_PATH).'userportal.lib.php'; |
|
||||||
|
|
||||||
$this_section = SECTION_COURSES; |
|
||||||
api_block_anonymous_users(); // Only users who are logged in can proceed. |
|
||||||
|
|
||||||
$userportal = new IndexManager(get_lang('MyCourses')); |
|
||||||
$tpl = $userportal->tpl->get_template('layout/layout_2_col.tpl'); |
|
||||||
|
|
||||||
//if (!$userportal->tpl->isCached($tpl, api_get_user_id())) { |
|
||||||
|
|
||||||
//@todo all this could be moved in the IndexManager |
|
||||||
|
|
||||||
$courses_list = $userportal->return_courses_main_plugin(); |
|
||||||
$personal_course_list = UserManager::get_personal_session_course_list(api_get_user_id()); |
|
||||||
|
|
||||||
|
|
||||||
// Main courses and session list |
|
||||||
ob_start(); |
|
||||||
$userportal->return_courses_and_sessions($personal_course_list); |
|
||||||
$courses_and_sessions = ob_get_contents(); |
|
||||||
ob_get_clean(); |
|
||||||
|
|
||||||
// |
|
||||||
$userportal->tpl->assign('content', $courses_and_sessions); |
|
||||||
|
|
||||||
$userportal->tpl->assign('plugin_courses_block', $userportal->return_courses_main_plugin()); |
|
||||||
$userportal->tpl->assign('profile_block', $userportal->return_profile_block()); |
|
||||||
$userportal->tpl->assign('account_block', $userportal->return_account_block()); |
|
||||||
$userportal->tpl->assign('navigation_course_links', $userportal->return_navigation_course_links($menu_navigation)); |
|
||||||
$userportal->tpl->assign('plugin_courses_right_block', $userportal->return_plugin_courses_block()); |
|
||||||
$userportal->tpl->assign('reservation_block', $userportal->return_reservation_block()); |
|
||||||
$userportal->tpl->assign('search_block', $userportal->return_search_block()); |
|
||||||
$userportal->tpl->assign('classes_block', $userportal->return_classes_block()); |
|
||||||
/*} else { |
|
||||||
}*/ |
|
||||||
$userportal->tpl->display($tpl); |
|
||||||
|
|
||||||
Loading…
Reference in new issue