Usar el paginado de moodle

Re: Usar el paginado de moodle

de Raul Garcia Canet -
Número de respuestas: 0
Hola jonathan,

Disculpa por el retraso, no había visto el mensaje.

No se si entiendo tu pregunta:
¿Tienes un arreglo hecho con los usuarios?, ¿pero con que datos de los usuarios, sus id, sus nombres...?

Creo que eso va a ser algo más complicado.
Echa un vistazo en el fichero /moodle/user/index.php, ha cia la línea: 615 (depende de la versión de moodle), empieza así:

if ($fullmode) { // Print simple listing
if ($totalcount < 1) {
print_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'));

 // Bar of first initials

echo '<div class="initialbar firstinitial">'.get_string('firstname').' : ';
if(!empty($firstinitial)) {
echo '<a href="'.$baseurl.'&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.'&amp;sifirst='.$letter.'">'.$letter.'</a>';
}
}
echo '</div>';


Y termina en (línea 654 aprox) con:

echo '</div>';
print_paging_bar($matchcount, intval($table->get_page_start() / $perpage), $perpage, $baseurl.'&amp;', 'spage');


Este código escribe las dos líneas del abecedario que aparecen en el listado de participantes, esas que ponen:

Nombre : Todos A B C D E F G H I J K L M N Ñ O P Q R S T U V W X Y Z
Apellido : Todos A B C D E F G H I J K L M N Ñ O P Q R S T U V W X Y Z


Quizás esto te ayude a montar lo que necesitas.
Siento no poder ayudarte más, pero sin saber como tienes el arreglo es un poco difícil.

Hasta pronto,
Salu2
J. Raul (juagarc) guay