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


PHP get_module_course_tbl函数代码示例

本文整理汇总了PHP中get_module_course_tbl函数的典型用法代码示例。如果您正苦于以下问题:PHP get_module_course_tbl函数的具体用法?PHP get_module_course_tbl怎么用?PHP get_module_course_tbl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: __construct

 public function __construct($courseId)
 {
     $tbl_cdb_names = get_module_course_tbl(array('qwz_exercise', 'qwz_tracking', 'qwz_tracking_questions', 'qwz_tracking_answers'), $courseId);
     $this->tbl_qwz_tracking = $tbl_cdb_names['qwz_tracking'];
     $this->tbl_qwz_tracking_questions = $tbl_cdb_names['qwz_tracking_questions'];
     $this->tbl_qwz_tracking_answers = $tbl_cdb_names['qwz_tracking_answers'];
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:7,代码来源:trackingManager.cnr.php

示例2: __construct

 public function __construct($userId = null, $courseId = null, $database = null)
 {
     $this->userId = $userId ? $userId : claro_get_current_user_id();
     $this->courseId = $courseId ? $courseId : claro_get_current_course_id();
     $this->database = $database ? $database : Claroline::getDatabase();
     $this->tbl = array_merge(get_module_main_tbl(array('rel_course_user')), get_module_course_tbl(array('group_team', 'group_rel_team_user')));
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:7,代码来源:mygroups.lib.php

示例3: isDocumentDownloadableInCourse

 protected function isDocumentDownloadableInCourse($requestedUrl)
 {
     if (claro_is_in_a_group()) {
         $groupContext = true;
         $courseContext = false;
         $is_allowedToEdit = claro_is_group_member() || claro_is_group_tutor() || claro_is_course_manager();
     } else {
         $groupContext = false;
         $courseContext = true;
         $courseUserData = claro_get_course_user_privilege($this->cid, $this->uid);
         $is_allowedToEdit = $courseUserData['is_courseAdmin'];
     }
     if ($courseContext) {
         $courseTblList = get_module_course_tbl(array('document'), $this->cid);
         $tbl_document = $courseTblList['document'];
         if (strtoupper(substr(PHP_OS, 0, 3)) == "WIN") {
             $modifier = '';
         } else {
             $modifier = 'BINARY ';
         }
         $sql = "SELECT visibility\n\t\t\tFROM `{$tbl_document}`\n\t\t\tWHERE {$modifier} path = '" . claro_sql_escape($requestedUrl) . "'";
         $docVisibilityStatus = claro_sql_query_get_single_value($sql);
         if (!is_null($docVisibilityStatus) && $docVisibilityStatus == 'i' && !$is_allowedToEdit) {
             return false;
         } else {
             return true;
         }
     } else {
         // ????
     }
 }
开发者ID:Okhoshi,项目名称:Claroline.REST-API-Plugin,代码行数:31,代码来源:downloader.cnr.php

示例4: __construct

 public function __construct($courseId, $database = null)
 {
     $this->database = $database ? $database : Claroline::getDatabase();
     $tbl_cdb_names = get_module_course_tbl(array('qwz_exercise', 'qwz_tracking', 'qwz_tracking_questions', 'qwz_tracking_answers'), $courseId);
     $this->tbl_qwz_tracking = $tbl_cdb_names['qwz_tracking'];
     $this->tbl_qwz_tracking_questions = $tbl_cdb_names['qwz_tracking_questions'];
     $this->tbl_qwz_tracking_answers = $tbl_cdb_names['qwz_tracking_answers'];
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:8,代码来源:track_exercise_reset.php

示例5: __construct

 public function __construct($courseId, $userId)
 {
     $this->courseId = $courseId;
     $this->userId = (int) $userId;
     $tbl_cdb_names = get_module_course_tbl(array('qwz_exercise', 'qwz_tracking'), $courseId);
     $this->tbl_qwz_exercise = $tbl_cdb_names['qwz_exercise'];
     $this->tbl_qwz_tracking = $tbl_cdb_names['qwz_tracking'];
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:8,代码来源:tracking.cnr.php

示例6: __construct

 public function __construct($assignement, $courseId = null, $database = null)
 {
     $this->database = $database ? $database : Claroline::getDatabase();
     $this->assignement = $assignement;
     $this->courseId = $courseId ? $courseId : claro_get_current_course_id();
     $this->tbl = array_merge(get_module_main_tbl(array('rel_course_user', 'user')), get_module_course_tbl(array('wrk_submission', 'group_team'), $this->courseId));
     $this->submissionTitleList = array();
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:8,代码来源:score.lib.php

示例7: answerMatching

 /**
  * constructor
  *
  * @author Sebastien Piraux <pir@cerdecam.be>
  * @param $questionId integer question that use this answer
  * @param $course_id to use the class when not in course context
  * @return string
  */
 public function answerMatching($questionId, $course_id = null)
 {
     $this->questionId = $questionId;
     $this->leftList = array();
     $this->rightList = array();
     $this->errorList = array();
     $tbl_cdb_names = get_module_course_tbl(array('qwz_answer_matching'), $course_id);
     $this->tblAnswer = $tbl_cdb_names['qwz_answer_matching'];
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:17,代码来源:answer_matching.class.php

示例8: __construct

 public function __construct($courseId, $groupId = null)
 {
     $this->courseId = $courseId;
     $this->groupId = $groupId;
     $tblNameList = array('chat');
     $tbl_chat_names = get_module_course_tbl($tblNameList, $this->courseId);
     $this->tblChatMsg = $tbl_chat_names['chat'];
     $tbl_mdb_names = claro_sql_get_main_tbl();
     $this->tblUser = $tbl_mdb_names['user'];
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:10,代码来源:chatMsgList.class.php

示例9: mergeCourseUsers

 public function mergeCourseUsers($uidToRemove, $uidToKeep, $courseId)
 {
     $moduleCourseTbl = get_module_course_tbl(array('wrk_submission'), $courseId);
     $sql = "UPDATE `{$moduleCourseTbl['wrk_submission']}`\n                SET   user_id = " . (int) $uidToKeep . "\n                WHERE user_id = " . (int) $uidToRemove;
     if (!claro_sql_query($sql)) {
         Console::error("Cannot update wrk_submission from -{$uidToRemove} to +{$uidToKeep} in {$courseId}");
         return false;
     } else {
         return true;
     }
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:11,代码来源:mergeuser.cnr.php

示例10: getResourceList

 public function getResourceList(ResourceLocator $locator)
 {
     $tbl = get_module_course_tbl(array('announcement'), $locator->getCourseId());
     $sql = "SELECT `id`, `title`, `visibility`\n" . "FROM `{$tbl['announcement']}`";
     $res = Claroline::getDatabase()->query($sql);
     $resourceList = new LinkerResourceIterator();
     foreach ($res as $annoucement) {
         $annoucementLoc = new ClarolineResourceLocator($locator->getCourseId(), 'CLANN', (int) $annoucement['id']);
         $annoucementResource = new LinkerResource(empty($annoucement['title']) ? get_lang('Untitled') : $annoucement['title'], $annoucementLoc, true, $annoucement['visibility'] == 'HIDE' ? false : true, false);
         $resourceList->addResource($annoucementResource);
     }
     return $resourceList;
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:13,代码来源:linker.cnr.php

示例11: getResourceList

 public function getResourceList(ResourceLocator $locator)
 {
     $tbl = get_module_course_tbl(array('calendar_event'), $locator->getCourseId());
     $sql = "SELECT `id`, `titre`, `day`, `visibility`\n" . "FROM `{$tbl['calendar_event']}`";
     $res = Claroline::getDatabase()->query($sql);
     $resourceList = new LinkerResourceIterator();
     foreach ($res as $event) {
         $eventLoc = new ClarolineResourceLocator($locator->getCourseId(), 'CLCAL', (int) $event['id']);
         $eventResource = new LinkerResource(empty($event['titre']) ? $event['day'] : $event['titre'], $eventLoc, true, $event['visibility'] == 'HIDE' ? false : true, false);
         $resourceList->addResource($eventResource);
     }
     return $resourceList;
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:13,代码来源:linker.cnr.php

示例12: __construct

 /**
  * constructor
  *
  * @author Sebastien Piraux <pir@cerdecam.be>
  * @param $questionId integer question that use this answer
  * @param $multipleAnswer boolean true if several answer can be checked by user
  * @param $course_id to use the class when not in course context
  * @return string
  */
 public function __construct($questionId, $multipleAnswer = false, $course_id = null)
 {
     $this->questionId = (int) $questionId;
     $this->multipleAnswer = (bool) $multipleAnswer;
     $this->answerList = array();
     // add 2 empty answers as minimum requested number of answers
     $this->addAnswer();
     $this->addAnswer();
     $this->response = array();
     $this->errorList = array();
     $tbl_cdb_names = get_module_course_tbl(array('qwz_answer_multiple_choice'), $course_id);
     $this->tblAnswer = $tbl_cdb_names['qwz_answer_multiple_choice'];
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:22,代码来源:answer_multiplechoice.class.php

示例13: __construct

 /**
  * constructor
  *
  * @author Sebastien Piraux <pir@cerdecam.be>
  * @param $questionId integer question that use this answer
  * @param $course_id to use the class when not in course context
  * @return string
  */
 public function __construct($questionId, $course_id = null)
 {
     $this->questionId = (int) $questionId;
     $this->id = -1;
     $this->trueFeedback = '';
     $this->trueGrade = 0;
     $this->falseFeedback = '';
     $this->falseGrade = 0;
     $this->correctAnswer = '';
     $this->response = '';
     $this->errorList = array();
     $tbl_cdb_names = get_module_course_tbl(array('qwz_answer_truefalse'), $course_id);
     $this->tblAnswer = $tbl_cdb_names['qwz_answer_truefalse'];
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:22,代码来源:answer_truefalse.class.php

示例14: getResourceList

 public function getResourceList(ResourceLocator $locator)
 {
     $tbl = get_module_course_tbl(array('wrk_assignment'), $locator->getCourseId());
     $resourceList = new LinkerResourceIterator();
     if (!$locator->hasResourceId()) {
         $sql = "SELECT `title`, `visibility`, `id`\n" . "FROM `{$tbl['wrk_assignment']}`\n";
         $res = Claroline::getDatabase()->query($sql);
         foreach ($res as $assig) {
             $loc = new ClarolineResourceLocator($locator->getCourseId(), 'CLWRK', (int) $assig['id']);
             $resource = new LinkerResource($assig['title'], $loc, true, $assig['visibility'] == 'VISIBLE', false);
             $resourceList->addResource($resource);
         }
     }
     return $resourceList;
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:15,代码来源:linker.cnr.php

示例15: mergeCourseUsers

 public function mergeCourseUsers($uidToRemove, $uidToKeep, $courseId)
 {
     $tblList[] = 'lp_module';
     $tblList[] = 'lp_learnPath';
     $tblList[] = 'lp_rel_learnPath_module';
     $tblList[] = 'lp_asset';
     $tblList[] = 'lp_user_module_progress';
     $moduleCourseTbl = get_module_course_tbl($tblList, $courseId);
     // Update lp_user_module_progress
     $sql = "UPDATE `{$moduleCourseTbl['lp_user_module_progress']}`\n                SET   user_id = " . (int) $uidToKeep . "\n                WHERE user_id = " . (int) $uidToRemove;
     if (!claro_sql_query($sql)) {
         Console::error("Cannot update lp_user_module_progress from -{$uidToRemove} to +{$uidToKeep} in {$courseId}");
         return false;
     }
     return true;
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:16,代码来源:mergeuser.cnr.php


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