示例#1
0
 * This page provides the Administration -> ... -> Theme selector UI.
 *
 * @package core
 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
require_once dirname(__FILE__) . '/../../config.php';
require_once $CFG->libdir . '/adminlib.php';
require_once $CFG->dirroot . '/blocks/webgd_community/commons/TableResouces.php';
require_once $CFG->dirroot . '/blocks/webgd_community/lib/class/dao/WebgdCommunityDao.php';
require_once $CFG->dirroot . '/blocks/webgd_community/menus/Commons.php';
require_once $CFG->dirroot . '/blocks/webgd_community/lib/class/ImageResources.php';
require_once $CFG->dirroot . '/blocks/webgd_community/lib/class/CssResources.php';
require_login(1);
global $USER, $DB, $CFG;
$PAGE->set_url('/course/index.php');
$PAGE->set_context(context_system::instance());
$PAGE->set_pagelayout('standard');
$PAGE->requires->css(CssResources::LIST_HOME_COMMUNITY);
echo $OUTPUT->header('themeselector');
$webgdCommunityDao = new WebgdCommunityDao();
if ($listCommunity = $webgdCommunityDao->getListMyCommunityByUser($USER->id)) {
    echo '<div class="lista_home">';
    echo '<span class="titulo_list">' . $OUTPUT->heading('Minhas Comunidades') . '</span>';
    foreach ($listCommunity as $community) {
        Commons::printListMyCommunity($community);
    }
    echo '<div>';
} else {
    echo get_string('nenhumaComunidadeRegistrada', 'block_webgd_community');
}
echo $OUTPUT->footer();