Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add AdvancedSubscriptions class methods - refs BT#9092
- Loading branch information
Daniel Barreto
committed
Feb 10, 2015
1 parent
60257aa
commit 791e457
Showing
3 changed files
with
164 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,31 @@ | ||
<?php | ||
/* For license terms, see /license.txt */ | ||
/** | ||
* Index of the Buy Courses plugin courses list | ||
* @package chamilo.plugin.advancedsubscription | ||
*/ | ||
/** | ||
* | ||
*/ | ||
$plugin = AdvancedSubscriptionPlugin::create(); | ||
|
||
if (api_is_platform_admin()) { | ||
$isAdmin = api_is_platform_admin(); | ||
$title = $plugin->get_lang('CourseListOnSale'); | ||
$templateName = $plugin->get_lang('BuyCourses'); | ||
|
||
$tpl = new Template($templateName); | ||
$tpl->assign('isAdmin', $isAdmin); | ||
$tpl->assign('title', $title); | ||
$tpl->assign('BuySessions', $plugin->get_lang('BuySessions')); | ||
$tpl->assign('BuyCourses', $templateName); | ||
$tpl->assign('ConfigurationOfSessionsAndPrices', $plugin->get_lang('ConfigurationOfSessionsAndPrices')); | ||
$tpl->assign('ConfigurationOfCoursesAndPrices', $plugin->get_lang('ConfigurationOfCoursesAndPrices')); | ||
$tpl->assign('ConfigurationOfPayments', $plugin->get_lang('ConfigurationOfPayments')); | ||
$tpl->assign('OrdersPendingOfPayment', $plugin->get_lang('OrdersPendingOfPayment')); | ||
$listing_tpl = 'buycourses/view/index.tpl'; | ||
$content = $tpl->fetch($listing_tpl); | ||
$tpl->assign('content', $content); | ||
// If the user is NOT an administrator, redirect it to course/session buy list | ||
$isAdmin ? $tpl->display_one_col_template() : header('Location: src/list.php'); | ||
} |