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


PHP CCourse::GetCourseContent方法代码示例

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


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

示例1: GetDataWoCache

 protected static function GetDataWoCache($courseId)
 {
     $rsContent = CCourse::GetCourseContent($courseId, array(), array('LESSON_ID', 'NAME'));
     $arContents = array();
     while ($arContent = $rsContent->GetNext()) {
         $arContents[] = $arContent;
     }
     return $arContents;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:9,代码来源:clearncacheoflessontreecomponent.php

示例2: array

 // Resolve links "?COURSE_ID={SELF}". Don't relay on it, this behaviour
 // can be changed in future without any notifications.
 if (isset($arChapter['DETAIL_TEXT'])) {
     $arChapter['DETAIL_TEXT'] = CLearnHelper::PatchLessonContentLinks($arChapter['DETAIL_TEXT'], $arParams['COURSE_ID']);
 }
 if (isset($arChapter['PREVIEW_TEXT'])) {
     $arChapter['PREVIEW_TEXT'] = CLearnHelper::PatchLessonContentLinks($arChapter['PREVIEW_TEXT'], $arParams['COURSE_ID']);
 }
 // Self test page URL
 $arChapter["SELF_TEST_URL"] = CComponentEngine::MakePathFromTemplate($arParams["SELF_TEST_TEMPLATE"], array("LESSON_ID" => $arParams["CHAPTER_ID"], "SELF_TEST_ID" => $arParams["CHAPTER_ID"], "COURSE_ID" => $arParams["COURSE_ID"]));
 //Self test exists?
 $rsQuestion = CLQuestion::GetList(array(), array("LESSON_ID" => $arParams["CHAPTER_ID"], "ACTIVE" => "Y", "SELF" => "Y"));
 $arChapter["SELF_TEST_EXISTS"] = (bool) $rsQuestion->Fetch();
 $arResult = array("COURSE" => $arCourse, "CHAPTER" => $arChapter, "CONTENTS" => array());
 //Included chapters and lessons
 $rsContent = CCourse::GetCourseContent($arParams["COURSE_ID"], array());
 $foundChapter = false;
 while ($arContent = $rsContent->GetNext()) {
     if ($foundChapter) {
         if ($arContent["DEPTH_LEVEL"] <= $baseDepthLevel) {
             break;
         }
         $arContent["DEPTH_LEVEL"] -= $baseDepthLevel;
         if ($arContent["TYPE"] == "CH") {
             $arContent["URL"] = CComponentEngine::MakePathFromTemplate($arParams["CHAPTER_DETAIL_TEMPLATE"], array("CHAPTER_ID" => '0' . $arContent["ID"], "COURSE_ID" => $arParams["COURSE_ID"]));
         } else {
             $arContent["URL"] = CComponentEngine::MakePathFromTemplate($arParams["LESSON_DETAIL_TEMPLATE"], array("LESSON_ID" => $arContent["ID"], "COURSE_ID" => $arParams["COURSE_ID"]));
         }
         $arResult["CONTENTS"][] = $arContent;
     }
     if ($arContent["ID"] == $arParams["CHAPTER_ID"] && $arContent["TYPE"] == "CH") {
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:component.php

示例3: ShowError

     ShowError(GetMessage("LEARNING_COURSE_DENIED"));
     return;
 }
 //Images
 $arCourse["PREVIEW_PICTURE_ARRAY"] = CFile::GetFileArray($arCourse["PREVIEW_PICTURE"]);
 // Resolve links "?COURSE_ID={SELF}". Don't relay on it, this behaviour
 // can be changed in future without any notifications.
 if (isset($arCourse['DETAIL_TEXT'])) {
     $arCourse['DETAIL_TEXT'] = CLearnHelper::PatchLessonContentLinks($arCourse['DETAIL_TEXT'], $arParams["COURSE_ID"]);
 }
 if (isset($arCourse['PREVIEW_TEXT'])) {
     $arCourse['PREVIEW_TEXT'] = CLearnHelper::PatchLessonContentLinks($arCourse['PREVIEW_TEXT'], $arParams["COURSE_ID"]);
 }
 //arResult
 $arResult = array("COURSE" => $arCourse, "CONTENTS" => array());
 $rsContent = CCourse::GetCourseContent($arParams["COURSE_ID"], array("DETAIL_TEXT", "DETAIL_TEXT_TYPE", "DETAIL_PICTURE", "PREVIEW_PICTURE"));
 while ($arContent = $rsContent->GetNext()) {
     $arContent["DETAIL_PICTURE_ARRAY"] = CFile::GetFileArray($arContent["DETAIL_PICTURE"]);
     $arContent["PREVIEW_PICTURE_ARRAY"] = CFile::GetFileArray($arContent["PREVIEW_PICTURE"]);
     // Resolve links "?COURSE_ID={SELF}". Don't relay on it, this behaviour
     // can be changed in future without any nitifications.
     if (isset($arContent['DETAIL_TEXT'])) {
         $arContent['DETAIL_TEXT'] = CLearnHelper::PatchLessonContentLinks($arContent['DETAIL_TEXT'], $arParams["COURSE_ID"]);
     }
     if (isset($arContent['PREVIEW_TEXT'])) {
         $arContent['PREVIEW_TEXT'] = CLearnHelper::PatchLessonContentLinks($arContent['PREVIEW_TEXT'], $arParams["COURSE_ID"]);
     }
     $arResult["CONTENTS"][] = $arContent;
 }
 unset($rsContent);
 unset($arContent);
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php


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