From c238e1e2ab0f1c0f88527ec19f468213bdf658f1 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Mon, 11 Feb 2013 09:52:35 +1300 Subject: [PATCH] MDL-37907 Participants layout - move checkbox to first column --- user/index.php | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/user/index.php b/user/index.php index 39aeac28a20..06af50dfdcb 100644 --- a/user/index.php +++ b/user/index.php @@ -303,10 +303,19 @@ } /// Define a table showing a list of users in the current role selection + $tablecolumns = array(); + $tableheaders = array(); + if ($bulkoperations && $mode === MODE_BRIEF) { + $tablecolumns[] = 'select'; + $tableheaders[] = get_string('select'); + } + $tablecolumns[] = 'userpic'; + $tablecolumns[] = 'fullname'; - $tablecolumns = array('userpic', 'fullname'); $extrafields = get_extra_user_fields($context); - $tableheaders = array(get_string('userpic'), get_string('fullnameuser')); + $tableheaders[] = get_string('userpic'); + $tableheaders[] = get_string('fullnameuser'); + if ($mode === MODE_BRIEF) { foreach ($extrafields as $field) { $tablecolumns[] = $field; @@ -326,7 +335,7 @@ $tableheaders[] = get_string('lastaccess'); } - if ($bulkoperations) { + if ($bulkoperations && $mode === MODE_USERDETAILS) { $tablecolumns[] = 'select'; $tableheaders[] = get_string('select'); } @@ -728,7 +737,12 @@ $profilelink = ''.fullname($user).''; } - $data = array ($OUTPUT->user_picture($user, array('size' => 35, 'courseid'=>$course->id)), $profilelink); + $data = array(); + if ($bulkoperations) { + $data[] = ''; + } + $data[] = $OUTPUT->user_picture($user, array('size' => 35, 'courseid'=>$course->id)); + $data[] = $profilelink; if ($mode === MODE_BRIEF) { foreach ($extrafields as $field) { @@ -766,9 +780,6 @@ } } - if ($bulkoperations) { - $data[] = ''; - } $table->add_data($data); } }