コード例 #1
0
ファイル: entrylist_format.php プロジェクト: nmicha/moodle
function glossary_show_entry_entrylist($course, $cm, $glossary, $entry, $mode = '', $hook = '', $printicons = 1, $aliases = true)
{
    global $USER, $OUTPUT;
    $return = false;
    echo '<table class="glossarypost entrylist" cellspacing="0">';
    echo '<tr valign="top">';
    echo '<td class="entry">';
    if ($entry) {
        glossary_print_entry_approval($cm, $entry, $mode);
        $anchortagcontents = glossary_print_entry_concept($entry, true);
        $link = new moodle_url('/mod/glossary/showentry.php', array('courseid' => $course->id, 'eid' => $entry->id, 'displayformat' => 'dictionary'));
        $anchor = html_writer::link($link, $anchortagcontents);
        echo "<div class=\"concept\">{$anchor}</div> ";
        echo '</td><td align="right" class="entrylowersection">';
        if ($printicons) {
            glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode, $hook, 'print');
        }
        if (!empty($entry->rating)) {
            echo '<br />';
            echo '<span class="ratings">';
            $return = glossary_print_entry_ratings($course, $entry);
            echo '</span>';
        }
        echo '<br />';
    } else {
        echo '<div style="text-align:center">';
        print_string('noentry', 'glossary');
        echo '</div>';
    }
    echo '</td></tr>';
    echo "</table>\n";
    return $return;
}
コード例 #2
0
function glossary_show_entry_entrylist($course, $cm, $glossary, $entry, $mode = '', $hook = '', $printicons = 1, $ratings = NULL, $aliases = true)
{
    global $USER;
    $return = false;
    echo '<table class="glossarypost entrylist" cellspacing="0">';
    echo '<tr valign="top">';
    echo '<td class="entry">';
    if ($entry) {
        glossary_print_entry_approval($cm, $entry, $mode);
        echo "<span class=\"concept\"><a href=\"showentry.php?courseid={$course->id}&amp;eid={$entry->id}&amp;displayformat=dictionary\" target=\"_blank\" onClick=\"return openpopup('/mod/glossary/showentry.php?courseid={$course->id}&amp;eid={$entry->id}&amp;displayformat=dictionary', 'entry', 'menubar=0,location=0,scrollbars,resizable,width=600,height=450', 0);\">";
        glossary_print_entry_concept($entry);
        echo '</a></span> ';
        echo '</td><td align="right" class="entrylowersection">';
        if ($printicons) {
            glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode, $hook, 'print');
        }
        if ($ratings) {
            echo '<br />';
            echo '<span class="ratings">';
            $return = glossary_print_entry_ratings($course, $entry, $ratings);
            echo '</span>';
        }
        echo '<br />';
    } else {
        echo '<div style="text-align:center">';
        print_string('noentry', 'glossary');
        echo '</div>';
    }
    echo '</td></tr>';
    echo "</table>\n";
    return $return;
}
コード例 #3
0
ファイル: entrylist_format.php プロジェクト: vuchannguyen/web
function glossary_show_entry_entrylist($course, $cm, $glossary, $entry, $mode = '', $hook = '', $printicons = 1, $aliases = true)
{
    global $USER, $OUTPUT;
    $return = false;
    echo '<table class="glossarypost entrylist" cellspacing="0">';
    echo '<tr valign="top">';
    echo '<td class="entry">';
    if ($entry) {
        glossary_print_entry_approval($cm, $entry, $mode);
        $anchortagcontents = glossary_print_entry_concept($entry, true);
        $link = "/mod/glossary/showentry.php?courseid={$course->id}&eid={$entry->id}&displayformat=dictionary";
        $action = new popup_action('click', $link . '&popup=1', 'entry', array('title' => 'entry', 'width' => 600, 'height' => 450));
        $anchor = $OUTPUT->action_link($link, $anchortagcontents, $action);
        echo "<div class=\"concept\">{$anchor}</div> ";
        echo '</td><td align="right" class="entrylowersection">';
        if ($printicons) {
            glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode, $hook, 'print');
        }
        if (!empty($entry->rating)) {
            echo '<br />';
            echo '<span class="ratings">';
            $return = glossary_print_entry_ratings($course, $entry);
            echo '</span>';
        }
        echo '<br />';
    } else {
        echo '<div style="text-align:center">';
        print_string('noentry', 'glossary');
        echo '</div>';
    }
    echo '</td></tr>';
    echo "</table>\n";
    return $return;
}
コード例 #4
0
ファイル: lib.php プロジェクト: rolandovanegas/moodle
/**
 * @param object $course
 * @param object $cm
 * @param object $glossary
 * @param object $entry
 * @param string $mode
 * @param object $hook
 * @param bool $printicons
 * @param bool $aliases
 * @return void
 */
function  glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $aliases=true) {
    if ($aliases) {
        $aliases = glossary_print_entry_aliases($course, $cm, $glossary, $entry, $mode, $hook,'html');
    }
    $icons   = '';
    if ($printicons) {
        $icons   = glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode, $hook,'html');
    }
    if ($aliases || $icons || !empty($entry->rating)) {
        echo '<table>';
        if ( $aliases ) {
            echo '<tr valign="top"><td class="aliases">' .
                  get_string('aliases','glossary').': '.$aliases . '</td></tr>';
        }
        if ($icons) {
            echo '<tr valign="top"><td class="icons">'.$icons.'</td></tr>';
        }
        if (!empty($entry->rating)) {
            echo '<tr valign="top"><td class="ratings">';
            glossary_print_entry_ratings($course, $entry);
            echo '</td></tr>';
        }
        echo '</table>';
    }
}