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


PHP question_preload_questions函数代码示例

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


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

示例1: preload_questions

 public function preload_questions()
 {
     if (empty($this->questionids)) {
         throw new moodle_quiz_exception($this, 'noquestions', $this->edit_url());
     }
     $this->questions = question_preload_questions($this->questionids, 'qqi.grade AS maxgrade, qqi.id AS instance', '{quiz_question_instances} qqi ON qqi.quiz = :quizid AND q.id = qqi.question', array('quizid' => $this->quiz->id));
     $this->number_questions();
 }
开发者ID:arshanam,项目名称:Moodle-ITScholars-LMS,代码行数:8,代码来源:attemptlib.php

示例2: preload_questions

 /**
  * Load just basic information about all the questions in this quiz.
  */
 public function preload_questions()
 {
     $this->questions = question_preload_questions(null, 'slot.maxmark, slot.id AS slotid, slot.slot, slot.page', '{quiz_slots} slot ON slot.quizid = :quizid AND q.id = slot.questionid', array('quizid' => $this->quiz->id), 'slot.slot');
 }
开发者ID:elie89,项目名称:moodle,代码行数:7,代码来源:attemptlib.php

示例3: question_load_questions

/**
 * Load a set of questions, given a list of ids. The $join and $extrafields arguments can be used
 * together to pull in extra data. See, for example, the usage in mod/quiz/attempt.php, and
 * read the code below to see how the SQL is assembled. Throws exceptions on error.
 *
 * @param array $questionids array of question ids.
 * @param string $extrafields extra SQL code to be added to the query.
 * @param string $join extra SQL code to be added to the query.
 * @param array $extraparams values for any placeholders in $join.
 * You are strongly recommended to use named placeholder.
 *
 * @return array question objects.
 */
function question_load_questions($questionids, $extrafields = '', $join = '')
{
    $questions = question_preload_questions($questionids, $extrafields, $join);
    // Load the question type specific information
    if (!get_question_options($questions)) {
        return 'Could not load the question options';
    }
    return $questions;
}
开发者ID:tyleung,项目名称:CMPUT401MoodleExams,代码行数:22,代码来源:questionlib.php


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