Example #1
0
    }
}
if ($bulkoperations) {
    echo '<form action="action_redir.php" method="post" id="participantsform">';
    echo '<div>';
    echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
    echo '<input type="hidden" name="returnto" value="' . s($PAGE->url->out(false)) . '" />';
}
if ($mode === MODE_USERDETAILS) {
    // Print simple listing.
    if ($totalcount < 1) {
        echo $OUTPUT->heading(get_string('nothingtodisplay'));
    } else {
        if ($totalcount > $perpage) {
            $firstinitial = $table->get_initial_first();
            $lastinitial = $table->get_initial_last();
            $strall = get_string('all');
            $alpha = explode(',', get_string('alphabet', 'langconfig'));
            // Bar of first initials.
            echo '<div class="initialbar firstinitial">' . get_string('firstname') . ' : ';
            if (!empty($firstinitial)) {
                echo '<a href="' . $baseurl->out() . '&amp;sifirst=">' . $strall . '</a>';
            } else {
                echo '<strong>' . $strall . '</strong>';
            }
            foreach ($alpha as $letter) {
                if ($letter == $firstinitial) {
                    echo ' <strong>' . $letter . '</strong>';
                } else {
                    echo ' <a href="' . $baseurl->out() . '&amp;sifirst=' . $letter . '">' . $letter . '</a>';
                }