本文整理汇总了PHP中get_module_course_tbl函数的典型用法代码示例。如果您正苦于以下问题:PHP get_module_course_tbl函数的具体用法?PHP get_module_course_tbl怎么用?PHP get_module_course_tbl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_module_course_tbl函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 <[email protected]>
* @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 <[email protected]>
* @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 <[email protected]>
* @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
示例16: mergeCourseUsers
public function mergeCourseUsers($uidToRemove, $uidToKeep, $courseId)
{
$moduleCourseTbl = get_module_course_tbl(array('wiki_pages', 'wiki_pages_content'), $courseId);
// Update wiki_pages
$sql = "UPDATE `{$moduleCourseTbl['wiki_pages']}`\n SET owner_id = " . (int) $uidToKeep . "\n WHERE owner_id = " . (int) $uidToRemove;
if (!claro_sql_query($sql)) {
Console::error("Cannot update wiki_pages from -{$uidToRemove} to +{$uidToKeep} in {$courseId}");
return false;
}
// Update wiki_pages_content
$sql = "UPDATE `{$moduleCourseTbl['wiki_pages_content']}`\n SET editor_id = " . (int) $uidToKeep . "\n WHERE editor_id = " . (int) $uidToRemove;
if (!claro_sql_query($sql)) {
Console::error("Cannot update wiki_pages_content from -{$uidToRemove} to +{$uidToKeep} in {$courseId}");
return false;
}
return true;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:17,代码来源:mergeuser.cnr.php
示例17: __construct
/**
*
* @param Claro_Course $course
* @param mixed $database Database_Connection instance or null, if null, the default database connection will be used
*/
public function __construct($course, $database = null, $result = null)
{
$this->course = $course;
$this->database = $database ? $database : Claroline::getDatabase();
$this->tableNames = get_module_main_tbl(array('rel_course_user'));
$this->tableNames = array_merge($this->tableNames, get_module_course_tbl(array('bb_rel_topic_userstonotify', 'group_team', 'userinfo_content', 'group_rel_team_user', 'tracking_event'), $this->course->courseId));
$this->result = $result ? $result : new Claro_BatchRegistrationResult();
}
开发者ID:rhertzog,项目名称:lcs,代码行数:13,代码来源:userlist.lib.php
示例18: __construct
/**
* constructor
*
* @author Sebastien Piraux <[email protected]>
* @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;
// directly fill with an example
$this->answerText = get_lang('[British people] live in [United Kingdom].');
$this->answerList = array();
$this->gradeList = array();
$this->wrongAnswerList = array();
$this->type = TEXTFIELD_FILL;
$this->step = 1;
$this->response = array();
$this->errorList = array();
$tbl_cdb_names = get_module_course_tbl(array('qwz_answer_fib'), $course_id);
$this->tblAnswer = $tbl_cdb_names['qwz_answer_fib'];
}
开发者ID:rhertzog,项目名称:lcs,代码行数:24,代码来源:answer_fib.class.php
示例19: getResourceList
/**
* Provide the list of available resources for a resource
*
* @para ResourceLocator $locator The resource locator.
* @return LinkerResourceIterator Resource list as an iterator
*/
public function getResourceList(ResourceLocator $locator)
{
$tbl_cdb_names = get_module_course_tbl(array('lp_learnPath'), $locator->getCourseId());
$tblPath = $tbl_cdb_names['lp_learnPath'];
$resourceList = new LinkerResourceIterator();
$sql = "SELECT `learnPath_id` AS `id`, `name`, `visibility`\n FROM `" . $tblPath . "`\n ORDER BY `name` ASC";
$pathList = claro_sql_query_fetch_all_rows($sql);
foreach ($pathList as $path) {
$fileLoc = new ClarolineResourceLocator($locator->getCourseId(), 'CLLNP', $path['id']);
$fileResource = new LinkerResource($path['name'], $fileLoc, true, $path['visibility'] == 'SHOW' ? true : false, false);
$resourceList->addResource($fileResource);
}
return $resourceList;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:20,代码来源:linker.cnr.php
示例20: getResourceList
public function getResourceList(ResourceLocator $locator)
{
$groupId = null;
if ($locator->inGroup()) {
$groupData = claro_get_group_data(array(CLARO_CONTEXT_COURSE => $locator->getCourseId(), CLARO_CONTEXT_GROUP => $locator->getGroupId()));
$groupId = $locator->getGroupId();
}
$path = $this->getPath($locator);
if (!$this->isPathNavigable($path)) {
throw new Exception("{$path} does not exists or is not a directory");
} else {
$tbl = get_module_course_tbl(array('document'), $locator->getCourseId());
$fileProperties = array();
if (!$locator->inGroup()) {
$sql = "SELECT `path`, `visibility`, `comment`\n" . "FROM `{$tbl['document']}`\n" . "WHERE 1";
$res = Claroline::getDatabase()->query($sql);
foreach ($res as $row) {
$fileProperties[$row['path']] = $row;
}
}
$it = new DirectoryIterator($path);
$dirList = array();
$fileList = array();
foreach ($it as $file) {
if ($file->isDir() && $file->isDot()) {
continue;
}
$relativePath = str_replace('\\', '/', str_replace($file->getPath(), '', $file->getPathname()));
if ($locator->hasResourceId()) {
$relativePath = '/' . ltrim(ltrim($locator->getResourceId(), '/') . '/' . ltrim($relativePath, '/'), '/');
}
if ($file->isDir()) {
$dirList[] = $relativePath;
} elseif ($file->isFile()) {
$fileList[] = $relativePath;
}
}
natcasesort($dirList);
natcasesort($fileList);
$resourceList = new LinkerResourceIterator();
foreach ($dirList as $relativePath) {
$isVisible = true;
if (array_key_exists($relativePath, $fileProperties)) {
$isVisible = $fileProperties[$relativePath]['visibility'] != 'i' ? true : false;
}
$resourceList->addResource($this->createResourceLocator($locator->getCourseId(), $relativePath, $isVisible, true, $groupId));
}
foreach ($fileList as $relativePath) {
$isVisible = true;
if (array_key_exists($relativePath, $fileProperties)) {
$isVisible = $fileProperties[$relativePath]['visibility'] != 'i' ? true : false;
}
$resourceList->addResource($this->createResourceLocator($locator->getCourseId(), $relativePath, $isVisible, false, $groupId));
}
return $resourceList;
}
}
开发者ID:rhertzog,项目名称:lcs,代码行数:57,代码来源:linker.cnr.php
注:本文中的get_module_course_tbl函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论