当前位置: 首页>>代码示例>>PHP>>正文


PHP EfrontLesson::getStudentUsers方法代码示例

本文整理汇总了PHP中EfrontLesson::getStudentUsers方法的典型用法代码示例。如果您正苦于以下问题:PHP EfrontLesson::getStudentUsers方法的具体用法?PHP EfrontLesson::getStudentUsers怎么用?PHP EfrontLesson::getStudentUsers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EfrontLesson的用法示例。


在下文中一共展示了EfrontLesson::getStudentUsers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: EfrontLesson

}
/* -------------------------------------------------------End of Contact part--------------------------------------------------------- */
/* -------------------------------------------------------Lesson information part--------------------------------------------------------- */
if (isset($_GET['ctg']) && $_GET['ctg'] == 'lesson_info') {
    //The user asked to display information on a lesson
    //session_start();			//Isn't needed here if the head session_start() is in place
    if (!$smarty->is_cached('index.tpl', $cacheId) || !$GLOBALS['configuration']['smarty_caching']) {
        include "directions_tree.php";
        try {
            if (isset($_GET['lessons_ID'])) {
                if (isset($lessons[$_GET['lessons_ID']]) && $lessons[$_GET['lessons_ID']] instanceof EfrontLesson) {
                    $smarty->assign("T_HAS_LESSON", $lessons[$_GET['lessons_ID']]->lesson['has_lesson']);
                }
                $lesson = new EfrontLesson($_GET['lessons_ID']);
                $lesson->lesson['price_string'] = formatPrice($lesson->lesson['price'], array($lesson->options['recurring'], $lesson->options['recurring_duration']), true);
                $lesson->lesson['num_students'] = sizeof($lesson->getStudentUsers());
                $lesson->lesson['seats_remaining'] = $lesson->lesson['max_users'] - $lesson->lesson['num_students'];
                $lesson->lesson['seats_remaining'] >= 0 or $lesson->lesson['seats_remaining'] = 0;
                $smarty->assign("T_LESSON", $lesson);
                $lessonInformation = $lesson->getInformation();
                $content = new EfrontContentTree($lesson);
                if (sizeof($content->tree) > 0) {
                    $smarty->assign("T_CONTENT_TREE", $content->toHTML(false, 'dhtml_content_tree', array('noclick' => 1)));
                }
                $lessonInfo = new LearningObjectInformation(unserialize($lesson->lesson['info']));
                $smarty->assign("T_LESSON_INFO", $lessonInfo);
                $additionalInfo = $lesson->getInformation();
                $smarty->assign("T_ADDITIONAL_LESSON_INFO", $additionalInfo);
                if ($lesson->lesson['course_only']) {
                    $smarty->assign("T_LESSON_COURSES", $lesson->getCourses());
                    if (isset($_GET['from_course']) && $_GET['from_course']) {
开发者ID:bqq1986,项目名称:efront,代码行数:31,代码来源:index.php

示例2: EfrontLesson

 $languages = EfrontSystem::getLanguages(true);
 if (isset($_GET['lessons_ID']) && eF_checkParameter($_GET['lessons_ID'], 'id')) {
     $lesson = new EfrontLesson($_GET['lessons_ID']);
     $lessonInformation = $lesson->getInformation();
     //$lessonInformation['language'] = $languages[$lesson -> lesson['languages_NAME']];
     if ($lessonInformation['professors']) {
         foreach ($lessonInformation['professors'] as $value) {
             $professorsString[] = formatLogin($value['login']);
         }
         $lessonInformation['professors'] = implode(", ", $professorsString);
     }
     $lesson->lesson['price'] ? $priceString = formatPrice($lesson->lesson['price'], array($lesson->options['recurring'], $lesson->options['recurring_duration']), true) : ($priceString = false);
     $lessonInformation['price_string'] = $priceString;
     if ($lesson->lesson['max_users']) {
         $lessonInformation['max_users'] = $lesson->lesson['max_users'];
         $lessonInformation['seats_remaining'] = $lesson->lesson['max_users'] - sizeof($lesson->getStudentUsers());
         $lessonInformation['seats_remaining'] >= 0 or $lessonInformation['seats_remaining'] = 0;
     }
     //    if (!$lessonInformation['price']) {
     //        unset($lessonInformation['price_string']);
     //    }
     try {
         if ($_GET['from_course'] && eF_checkParameter($_GET['from_course'], 'id')) {
             $course = new EfrontCourse($_GET['from_course']);
             $schedule = $course->getLessonScheduleInCourse($lesson);
             if ($schedule['start_date'] || $schedule['end_date']) {
                 $lessonInformation['from_timestamp'] = $schedule['start_date'];
                 $lessonInformation['to_timestamp'] = $schedule['end_date'];
             } else {
                 $lessonInformation['from_timestamp'] = $schedule['active_in_lesson'] + 24 * 60 * 60 * $schedule['start_period'];
                 $lessonInformation['to_timestamp'] = $lessonInformation['from_timestamp'] + 24 * 60 * 60 * $schedule['end_period'];
开发者ID:jiangjunt,项目名称:efront_open_source,代码行数:31,代码来源:ask_information.php


注:本文中的EfrontLesson::getStudentUsers方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。