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


PHP glossary_get_user_entries函数代码示例

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


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

示例1: glossary_user_complete

/**
 * Print a detailed representation of what a  user has done with
 * a given particular instance of this module, for user activity reports.
 *
 * @global object
 * @param object $course
 * @param object $user
 * @param object $mod
 * @param object $glossary
 */
function glossary_user_complete($course, $user, $mod, $glossary) {
    global $CFG, $OUTPUT;
    require_once("$CFG->libdir/gradelib.php");

    $grades = grade_get_grades($course->id, 'mod', 'glossary', $glossary->id, $user->id);
    if (!empty($grades->items[0]->grades)) {
        $grade = reset($grades->items[0]->grades);
        echo $OUTPUT->container(get_string('grade').': '.$grade->str_long_grade);
        if ($grade->str_feedback) {
            echo $OUTPUT->container(get_string('feedback').': '.$grade->str_feedback);
        }
    }

    if ($entries = glossary_get_user_entries($glossary->id, $user->id)) {
        echo '<table width="95%" border="0"><tr><td>';
        foreach ($entries as $entry) {
            $cm = get_coursemodule_from_instance("glossary", $glossary->id, $course->id);
            glossary_print_entry($course, $cm, $glossary, $entry,"","",0);
            echo '<p>';
        }
        echo '</td></tr></table>';
    }
}
开发者ID:rolandovanegas,项目名称:moodle,代码行数:33,代码来源:lib.php

示例2: glossary_user_complete

function glossary_user_complete($course, $user, $mod, $glossary)
{
    /// Print a detailed representation of what a  user has done with
    /// a given particular instance of this module, for user activity reports.
    global $CFG;
    require_once "{$CFG->libdir}/gradelib.php";
    $grades = grade_get_grades($course->id, 'mod', 'glossary', $glossary->id, $user->id);
    if (!empty($grades->items[0]->grades)) {
        $grade = reset($grades->items[0]->grades);
        echo '<p>' . get_string('grade') . ': ' . $grade->str_long_grade . '</p>';
        if ($grade->str_feedback) {
            echo '<p>' . get_string('feedback') . ': ' . $grade->str_feedback . '</p>';
        }
    }
    if ($entries = glossary_get_user_entries($glossary->id, $user->id)) {
        echo '<table width="95%" border="0"><tr><td>';
        foreach ($entries as $entry) {
            $cm = get_coursemodule_from_instance("glossary", $glossary->id, $course->id);
            glossary_print_entry($course, $cm, $glossary, $entry, "", "", 0);
            echo '<p>';
        }
        echo '</td></tr></table>';
    }
}
开发者ID:nadavkav,项目名称:MoodleTAO,代码行数:24,代码来源:lib.php

示例3: glossary_user_complete

/**
 * Print a detailed representation of what a  user has done with
 * a given particular instance of this module, for user activity reports.
 *
 * @global object
 * @param object $course
 * @param object $user
 * @param object $mod
 * @param object $glossary
 */
function glossary_user_complete($course, $user, $mod, $glossary)
{
    global $CFG;
    if ($entries = glossary_get_user_entries($glossary->id, $user->id)) {
        echo '<table width="95%" border="0"><tr><td>';
        foreach ($entries as $entry) {
            $cm = get_coursemodule_from_instance("glossary", $glossary->id, $course->id);
            glossary_print_entry($course, $cm, $glossary, $entry, "", "", 0);
            echo '<p>';
        }
        echo '</td></tr></table>';
    }
}
开发者ID:ajv,项目名称:Offline-Caching,代码行数:23,代码来源:lib.php


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