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


PHP _tidy_question函数代码示例

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


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

示例1: get_question_options

/**
 * Updates the question objects with question type specific
 * information by calling {@link get_question_options()}
 *
 * Can be called either with an array of question objects or with a single
 * question object.
 *
 * @param mixed $questions Either an array of question objects to be updated
 *         or just a single question object
 * @return bool Indicates success or failure.
 */
function get_question_options(&$questions)
{
    if (is_array($questions)) {
        // deal with an array of questions
        foreach ($questions as $i => $notused) {
            if (!_tidy_question($questions[$i])) {
                return false;
            }
        }
        return true;
    } else {
        // deal with single question
        return _tidy_question($questions);
    }
}
开发者ID:e-rasvet,项目名称:reader,代码行数:26,代码来源:questionlib.php

示例2: get_question_options

/**
 * Updates the question objects with question type specific
 * information by calling {@link get_question_options()}
 *
 * Can be called either with an array of question objects or with a single
 * question object.
 *
 * @param mixed $questions Either an array of question objects to be updated
 *         or just a single question object
 * @param boolean $loadtags load the question tags from the tags table. Optional, default false.
 * @return bool Indicates success or failure.
 */
function get_question_options(&$questions, $loadtags = false)
{
    if (is_array($questions)) {
        // deal with an array of questions
        foreach ($questions as $i => $notused) {
            _tidy_question($questions[$i], $loadtags);
        }
    } else {
        // deal with single question
        _tidy_question($questions, $loadtags);
    }
    return true;
}
开发者ID:tyleung,项目名称:CMPUT401MoodleExams,代码行数:25,代码来源:questionlib.php


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